Skip to content

gh-108303: Remove Lib/test/shadowed_super.py #114372

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 22, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jan 21, 2024

This support file was only used in a single test, there's no point in using it, really.
It can be replaced with a simple script.

""",
)
with import_helper.ready_to_import(name="shadowed_super", source=source):
import shadowed_super
self.assertEqual(shadowed_super.C().method(), "truly super")
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to unload the module explicitly after its usage? Use unload() of import_helper.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@vstinner vstinner merged commit 2ef520e into python:main Jan 22, 2024
@miss-islington-app
Copy link

Thanks @sobolevn for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 22, 2024
Move code into Lib/test/test_super.py.
(cherry picked from commit 2ef520e)

Co-authored-by: Nikita Sobolev <[email protected]>
@miss-islington-app
Copy link

Sorry, @sobolevn and @vstinner, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2ef520ebecf5544ba792266a5dbe4d53653a4a03 3.11

@bedevere-app
Copy link

bedevere-app bot commented Jan 22, 2024

GH-114433 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Jan 22, 2024
vstinner pushed a commit that referenced this pull request Jan 22, 2024
…14433)

gh-108303: Remove `Lib/test/shadowed_super.py` (GH-114372)

Move code into Lib/test/test_super.py.
(cherry picked from commit 2ef520e)

Co-authored-by: Nikita Sobolev <[email protected]>
@vstinner vstinner removed the needs backport to 3.11 only security fixes label Jan 22, 2024
@vstinner
Copy link
Member

There is no need to backport to 3.11: Lib/test/shadowed_super.py doesn't exist in the 3.11 branch.

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants