Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-135368: Fix mocks on dataclass specs withinstance=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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
cjw296 merged 3 commits intopython:mainfromsobolevn:issue-135368-fix
Jun 14, 2025

Conversation

@sobolevn
Copy link
Member

@sobolevnsobolevn commentedJun 12, 2025
edited by bedevere-appbot
Loading

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-botbot commentedJun 12, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@cdce8p
Copy link
Contributor

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 backport3.14 label.

sobolevn reacted with heart emoji

@sobolevnsobolevn added the needs backport to 3.14bugs and security fixes labelJun 12, 2025
@zware
Copy link
Member

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).

sobolevn reacted with heart emoji

@cdce8p
Copy link
Contributor

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.

zware and sobolevn reacted with thumbs up emojizware reacted with rocket emoji

@cjw296cjw296 merged commitc8319a3 intopython:mainJun 14, 2025
45 checks passed
@miss-islington-app
Copy link

Thanks@sobolevn for the PR, and@cjw296 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJun 14, 2025
…ythonGH-135421)*pythongh-135368: Fix mocks on dataclass specs with `instance=True`* Extend dataclass mock_methods---------(cherry picked from commitc8319a3)Co-authored-by: sobolevn <mail@sobolevn.me>Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
@bedevere-app
Copy link

GH-135503 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJun 14, 2025
@cjw296
Copy link
Contributor

Did this need to go the 3.13 or earlier too?

@sobolevn
Copy link
MemberAuthor

Thank you! No,#124429 was never backported to 3.13, because it was a new feature.

sobolevn added a commit that referenced this pull requestJun 14, 2025
…H-135421) (#135503)gh-135368: Fix mocks on dataclass specs with `instance=True` (GH-135421)*gh-135368: Fix mocks on dataclass specs with `instance=True`* Extend dataclass mock_methods---------(cherry picked from commitc8319a3)Co-authored-by: sobolevn <mail@sobolevn.me>Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
lkollar pushed a commit to lkollar/cpython that referenced this pull requestJun 19, 2025
…ython#135421)*pythongh-135368: Fix mocks on dataclass specs with `instance=True`* Extend dataclass mock_methods---------Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull requestJul 12, 2025
…ython#135421)*pythongh-135368: Fix mocks on dataclass specs with `instance=True`* Extend dataclass mock_methods---------Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull requestAug 4, 2025
…ython#135421)*pythongh-135368: Fix mocks on dataclass specs with `instance=True`* Extend dataclass mock_methods---------Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull requestAug 19, 2025
…ython#135421)*pythongh-135368: Fix mocks on dataclass specs with `instance=True`* Extend dataclass mock_methods---------Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cjw296cjw296cjw296 approved these changes

+1 more reviewer

@cdce8pcdce8pcdce8p approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@sobolevn@cdce8p@zware@cjw296

[8]ページ先頭

©2009-2025 Movatter.jp