Skip to content

bpo-33175: dataclasses should look up __set_name__ on class, not instance#6305

Merged
ericvsmith merged 1 commit into
python:masterfrom
ericvsmith:bpo-33175-special-method-lookup
Mar 29, 2018
Merged

bpo-33175: dataclasses should look up __set_name__ on class, not instance#6305
ericvsmith merged 1 commit into
python:masterfrom
ericvsmith:bpo-33175-special-method-lookup

Conversation

@ericvsmith

@ericvsmith ericvsmith commented Mar 29, 2018

Copy link
Copy Markdown
Member

@ericvsmith

Copy link
Copy Markdown
Member Author

@JelleZijlstra, can you take a look?

@@ -0,0 +1,2 @@
In dataclasses, Field.__set_name__ now looks up the __set_name__ special

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this need a NEWS entry if there was no release with the buggy code? (I'm mostly curious; you'll know the norms better than I do.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I thought about this, but unfortunately I think it does need the NEWS blurb. Ned has already cut 3.7.0b3, so the bug will be in that release. Thanks again for catching this.

@ericvsmith
ericvsmith merged commit 5219952 into python:master Mar 29, 2018
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @ericvsmith for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@ericvsmith
ericvsmith deleted the bpo-33175-special-method-lookup branch March 29, 2018 15:07
@bedevere-bot

Copy link
Copy Markdown

GH-6309 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 29, 2018
…ance (pythonGH-6305)

(cherry picked from commit 5219952)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Mar 29, 2018
…ance (GH-6305)

(cherry picked from commit 5219952)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants