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-118033: Fix__weakref__ not set for generic dataclasses#118099

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
sobolevn merged 6 commits intopython:mainfromsobolevn:issue-118033
May 9, 2024

Conversation

sobolevn
Copy link
Member

@sobolevnsobolevn commentedApr 19, 2024
edited by bedevere-appbot
Loading

Looks like that classes with__weakrefoffset__ == 0 does not need to add__weakref__ slot to existing super ones.

@sobolevn
Copy link
MemberAuthor

sobolevn commentedApr 19, 2024
edited
Loading

No, this is not correct, we also need to check__dictoffset__ as well. For__dict__ case.

@sobolevn
Copy link
MemberAuthor

Ubuntu failures are not related, there are some network problems right now

Copy link
Member

@carljmcarljm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think this fix is correct; some suggestions and a question.

@sobolevnsobolevn requested a review fromcarljmMay 4, 2024 09:05
Copy link
Member

@carljmcarljm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This looks fine to me. Sorry I didn't see the notification sooner that you requested another review!

I still think the best version of this might look at__weakrefoffset__ and__dictrefoffset__ always to decide on those two slots, but I agree that's an edge case and can be handled separately; this is still a clear improvement and fixes the original bug.

@sobolevnsobolevn added needs backport to 3.12only security fixes needs backport to 3.13bugs and security fixes labelsMay 9, 2024
@sobolevnsobolevnenabled auto-merge (squash)May 9, 2024 08:09
@sobolevnsobolevndisabled auto-mergeMay 9, 2024 08:35
@sobolevnsobolevnenabled auto-merge (squash)May 9, 2024 08:35
@sobolevnsobolevn merged commitfa9b9cb intopython:mainMay 9, 2024
@miss-islington-app
Copy link

Thanks@sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 9, 2024
…ythonGH-118099)(cherry picked from commitfa9b9cb)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 9, 2024
…ythonGH-118099)(cherry picked from commitfa9b9cb)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-app
Copy link

GH-118821 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 9, 2024
@bedevere-app
Copy link

GH-118822 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelMay 9, 2024
sobolevn added a commit that referenced this pull requestMay 9, 2024
…H-118099) (#118821)gh-118033: Fix `__weakref__` not set for generic dataclasses (GH-118099)(cherry picked from commitfa9b9cb)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
sobolevn added a commit that referenced this pull requestMay 9, 2024
…H-118099) (#118822)gh-118033: Fix `__weakref__` not set for generic dataclasses (GH-118099)(cherry picked from commitfa9b9cb)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@carljmcarljmcarljm approved these changes

@ericvsmithericvsmithAwaiting requested review from ericvsmithericvsmith is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@sobolevn@carljm

[8]ページ先頭

©2009-2025 Movatter.jp