Skip to content

gh-135368: Fix mocks on dataclass specs with instance=True #135421

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jun 12, 2025

cc @ncoghlan, @cdce8p

This brings back two features mentioned in #135368

  • __class__
  • __dataclass_*__ features

Basically, the fix is rather obvious: we just set the proper fields.

__annotations__ has changed due to __annotate__ function, this is not our fault :)

I also have a revert PR ready, if this one is not good enough.

Refs #124429

@python-cla-bot
Copy link

python-cla-bot bot commented Jun 12, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@cdce8p
Copy link
Contributor

cdce8p commented Jun 12, 2025

The following commit authors need to sign the Contributor License Agreement:

Not fully sure what's going on there as I've singed the CLA already. There are a handful of merged PRs from me with the same Github user email, e.g. #130191.

--
This PR should probably also get the backport 3.14 label.

@sobolevn sobolevn added the needs backport to 3.14 bugs and security fixes label Jun 12, 2025
@zware
Copy link
Member

zware commented Jun 12, 2025

Not fully sure what's going on there as I've singed the CLA already. There are a handful of merged PRs from me with the same Github user email, e.g. #130191.

Because of the way GitHub messes with authorship on merges, the CLA also needs to be signed for the noted address (I believe there's an option to tie it to a real address for CLA purposes, but this is an area I'm not that familiar with).

@cdce8p
Copy link
Contributor

cdce8p commented Jun 12, 2025

Because of the way GitHub messes with authorship on merges, the CLA also needs to be signed for the noted address (I believe there's an option to tie it to a real address for CLA purposes, but this is an area I'm not that familiar with).

Just clicked on the link above and signed it again although I can even see the Legacy PSF Contributor Agreement there too. Oh well 🤷🏻‍♂️ Should be all good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants