GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-108303: Remove `Lib/test/shadowed_super.py` by sobolevn · Pull Request #114372 · python/cpython

Conversation

@sobolevn

@sobolevn sobolevn commented Jan 21, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

  • Issue: Move test files into test subdirectories #108303

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sobolevn
pythongh-108303: Remove Lib/test/shadowed_super.py
c46a151
@sobolevn
sobolevn requested a review from vstinner January 21, 2024 07:58
@sobolevn
sobolevn requested a review from tiran as a code owner January 21, 2024 07:58
@bedevere-app bedevere-app Bot added the awaiting review label Jan 21, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Jan 21, 2024
Move test files into test subdirectories #108303
Closed
@sobolevn sobolevn added skip news needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jan 21, 2024
vstinner
vstinner reviewed Jan 22, 2024
View reviewed changes
Comment thread Lib/test/test_super.py
)
with import_helper.ready_to_import(name="shadowed_super", source=source):
import shadowed_super
self.assertEqual(shadowed_super.C().method(), "truly super")

@vstinner vstinner Jan 22, 2024

Copy link
Copy Markdown
Member

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sobolevn reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@sobolevn
Unload import
b7c8540
vstinner
vstinner approved these changes Jan 22, 2024
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jan 22, 2024
@vstinner
vstinner merged commit 2ef520e into python:main Jan 22, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Jan 22, 2024
@miss-islington-app

miss-islington-app Bot commented Jan 22, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 22, 2024
@sobolevn @miss-islington
pythongh-108303: Remove Lib/test/shadowed_super.py (pythonGH-114372)
afc7551
Move code into Lib/test/test_super.py.
(cherry picked from commit 2ef520e)

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

miss-islington-app Bot commented Jan 22, 2024

Copy link
Copy Markdown

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned vstinner Jan 22, 2024
@bedevere-app

bedevere-app Bot commented Jan 22, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@miss-islington @sobolevn
[3.12] gh-108303: Remove Lib/test/shadowed_super.py (GH-114372) (#1…
954bbcc
…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

vstinner commented Jan 22, 2024

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@sobolevn @aisk
pythongh-108303: Remove Lib/test/shadowed_super.py (python#114372)
90ad2f3
Move code into Lib/test/test_super.py.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@sobolevn @Glyphack
pythongh-108303: Remove Lib/test/shadowed_super.py (python#114372)
bec6ea5
Move code into Lib/test/test_super.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
@tiran tiran Awaiting requested review from tiran

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@vstinner vstinner

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@sobolevn @vstinner
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.