8000 GH-100942: Fix incorrect cast in property_copy(). by rhettinger · Pull Request #100965 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-100942: Fix incorrect cast in property_copy(). #100965

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

Merged
merged 2 commits into from
Jan 12, 2023

Conversation

rhettinger
Copy link
Contributor
@rhettinger rhettinger commented Jan 12, 2023

Copy link
Member
@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Oh, nice to see that my idea in #100955 was correct.
I will close mine, since you probably haven't seen it :)

pass

p = property.__new__(pro)
p.__set_name__(A, 1)
Copy link
Member

Choose a reason for hiding this comment

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

This line is not really required. Segfault happens and without it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer to leave it because it covers an additional code path that could fail and it is an accurate record of how the issue was discovered.

@sobolevn sobolevn added type-crash A hard crash of the interpreter, possibly with a core dump and removed type-bug An unexpected behavior, bug, or error labels Jan 12, 2023
@rhettinger rhettinger merged commit 94fc770 into python:main Jan 12, 2023
@miss-islington
Copy link
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington
Copy link
Contributor

Sorry, @rhettinger, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 94fc7706b7bc3d57cdd6d15bf8e8c4499ae53a69 3.11

@miss-islington
Copy link
Contributor

Sorry @rhettinger, I had trouble checking out the 3.10 backport branch.
Please retry by removing and re-adding the "needs backport to 3.10" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 94fc7706b7bc3d57cdd6d15bf8e8c4499ae53a69 3.10

@rhettinger
Copy link
Contributor Author

@sobolevn Would you like to take care of the backport. This PR won't apply cleanly and needs to be recreated for 3.11 and prior.

@sobolevn
Copy link
Member

Yeah, why not :)
Will do soon!

sobolevn pushed a commit to sobolevn/cpython that referenced this pull request Jan 13, 2023
…nGH-100965).

(cherry picked from commit 94fc770)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
@bedevere-bot
Copy link

GH-101008 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jan 13, 2023
sobolevn pushed a commit to sobolevn/cpython that referenced this pull request Jan 13, 2023
…nGH-100965).

(cherry picked from commit 94fc770)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
@bedevere-bot
Copy link

GH-101009 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jan 13, 2023
@sobolevn
Copy link
Member

Done!

kumaraditya303 pushed a commit that referenced this pull request Jan 15, 2023
…#101008)

(cherry picked from commit 94fc770)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
kumaraditya303 pushed a commit that referenced this pull request Jan 15, 2023
…#101009)

(cherry picked from commit 94fc770)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0