-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
unittest.mock: Regression with create_autospec and dataclasses in 3.14.0b2 #135368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @ncoghlan and @ericvsmith |
We might need to revert the change, it seems to be rather hard and the fix is not obvious, at least for me now :( |
@sobolevn - #124429 was your PR so I hope you can dig into this... I'd probably tackle this as follows:
If they fail, #124429 should probably be reverted for now, andthe old PR plus new tests put on a branch somewhere that a suitably motivated contributor could pick up. If a fix can be created, then a new PR should go up containing the additional tests we missed first time round along with the commit for the fix. Hopefully this all makes sense? |
Yes, I will surely work on this. If I can find the solution - I will create a PR with the fix. Otherwise, I propose to revert #124429 |
Start with the missing tests first plz, they'll be a valuable artefact whatever the outcome :-) |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
Furthermore the resulting mock doesn't have attributes present on a dataclass instance, like
__annotations__
,__class__
,__dataclass_fields__
,__dataclass_params__
.Likely related to #124429. /CC @sobolevn
CPython versions tested on:
3.14
Operating systems tested on:
macOS
Linked PRs
instance=True
#135421The text was updated successfully, but these errors were encountered: