gh-103272: add regression test for getattr that raises#103336
Merged
hauntsaninja merged 6 commits intopython:mainfrom Apr 7, 2023
Merged
gh-103272: add regression test for getattr that raises#103336hauntsaninja merged 6 commits intopython:mainfrom
hauntsaninja merged 6 commits intopython:mainfrom
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
hauntsaninja
reviewed
Apr 7, 2023
Contributor
There was a problem hiding this comment.
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
Member
|
I've got the revert merged, now this test must pass :) |
sobolevn
reviewed
Apr 7, 2023
Misc/NEWS.d/next/Tests/2023-04-07-07-56-39.gh-issue-103272.QosA_L.rst
Outdated
Show resolved
Hide resolved
sobolevn
reviewed
Apr 7, 2023
sobolevn
approved these changes
Apr 7, 2023
Member
sobolevn
left a comment
There was a problem hiding this comment.
Congrats on your first CPython PR 🎉
hauntsaninja
approved these changes
Apr 7, 2023
Contributor
hauntsaninja
left a comment
There was a problem hiding this comment.
Thanks again, this is great!
Contributor
|
Thanks @sunmy2019 for the PR, and @hauntsaninja for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Apr 7, 2023
…ythonGH-103336) (cherry picked from commit 5d7d86f) Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
|
GH-103351 is a backport of this pull request to the 3.11 branch. |
miss-islington
added a commit
that referenced
this pull request
Apr 7, 2023
warsaw
pushed a commit
to warsaw/cpython
that referenced
this pull request
Apr 11, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add test case taken from gh-103272 for #103332.