-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-103272: add regression test for getattr that raises #103336
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, thanks for narrowing this down!
I think we can make the test case slightly simpler to make it clearer what's getting tested:
class A:
def __getattr__(self, name):
raise ValueError
@property
def foo(self):
return self.__getattr__("asdf")
A().foo
And maybe rename the test to test_getattr_raises
or something
I've got the revert merged, now this test must pass :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Misc/NEWS.d/next/Tests/2023-04-07-07-56-39.gh-issue-103272.QosA_L.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats on your first CPython PR 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again, this is great!
Thanks @sunmy2019 for the PR, and @hauntsaninja for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
…ythonGH-103336) (cherry picked from commit 5d7d86f) Co-authored-by: sunmy2019 <[email protected]>
GH-103351 is a backport of this pull request to the 3.11 branch. |
(cherry picked from commit 5d7d86f) Co-authored-by: sunmy2019 <[email protected]>
Add test case taken from gh-103272 for #103332.