Skip to content
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-103329: Add regression test for PropertyMock with side effect #103358

Merged
merged 3 commits into from
Apr 8, 2023

Conversation

freakboy3742
Copy link
Contributor

@freakboy3742 freakboy3742 commented Apr 8, 2023

#102213 introduced an optimisation to __getattr__ that had some unexpected side effects, one of which was a change in behavior of PropertyMock when the property has a side effect.

This change was reverted in #103332; This PR adds a regression test to ensure that PropertyMock behavior is preserved. It also enhances the test of the return value for PropertyMock.

Fixes #103329.

@carljm
Copy link
Member

carljm commented Apr 8, 2023

Thanks @freakboy3742! (Also, hello!)

@freakboy3742
Copy link
Contributor Author

@carljm 👋

@carljm carljm added the needs backport to 3.11 only security fixes label Apr 8, 2023
@carljm carljm merged commit 26c6598 into python:main Apr 8, 2023
@miss-islington
Copy link
Contributor

Thanks @freakboy3742 for the PR, and @carljm for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 8, 2023
pythonGH-103358)

(cherry picked from commit 26c6598)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
@bedevere-bot
Copy link

GH-103364 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 Apr 8, 2023
@freakboy3742 freakboy3742 deleted the propertymock_sideeffect branch April 8, 2023 02:09
miss-islington added a commit that referenced this pull request Apr 8, 2023
…103358)

(cherry picked from commit 26c6598)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.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.

3.12.0a7 changes behavior of PropertyMock
4 participants