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 — bpo-40050: Fix importlib._bootstrap_external by vstinner · Pull Request #19135 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Mar 24, 2020 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Remove two unused imports: _thread and _weakref. Avoid creating a new
winreg builtin module if it's already available in sys.modules.

The winreg module is now stored as "winreg" rather than "_winreg".

https://bugs.python.org/issue40050

Sorry, something went wrong.

Uh oh!

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

All reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Mar 24, 2020
@bedevere-bot bedevere-bot added the awaiting core review label Mar 24, 2020
@vstinner

vstinner commented Mar 24, 2020 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

I tested manually that test_importlib no longer leaks with this PR if I reapply commit 8334f30:

$ ./python -m test -R 3:3 test_importlib 
(...)
beginning 6 repetitions
123456
......
(...)
Tests result: SUCCESS

$ git log

commit b7acc84ec0ba3dd092b0a5f879559fc1df0b5d7b (HEAD -> importlib_builtins)
Author: Hai Shi <[email protected]>
Date:   Fri Mar 20 16:16:45 2020 +0800

    [bpo-1635741](https://bugs.python.org/issue1635741): Port _weakref extension module to multiphase initialization (PEP 489) (GH-19084)

commit ee7422bfa01164e4077140333eabe663b6aab5e9 (origin/importlib_builtins)
Author: Victor Stinner <[email protected]>
Date:   Tue Mar 24 15:54:39 2020 +0100

    [bpo-40050](https://bugs.python.org/issue40050): Fix importlib._bootstrap_external
    
    Remove two unused imports: _thread and _weakref. Avoid creating a new
    winreg builtin module if it's already available in sys.modules.
    
    The winreg module is now stored as "winreg" rather than "_winreg".

(...)
All reactions

Sorry, something went wrong.

Uh oh!

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

corona10
corona10 reviewed Mar 24, 2020
View reviewed changes
Comment thread Lib/importlib/_bootstrap_external.py Resolved

Uh oh!

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

@vstinner
bpo-40050: Fix importlib._bootstrap_external
6cc525e
Remove two unused imports: _thread and _weakref. Avoid creating a new
winreg builtin module if it's already available in sys.modules.

The winreg module is now stored as "winreg" rather than "_winreg".
corona10
corona10 approved these changes Mar 24, 2020
View reviewed changes
@vstinner
vstinner merged commit 83d46e0 into python:master Mar 24, 2020
@bedevere-bot bedevere-bot removed the awaiting core review label Mar 24, 2020
@vstinner
vstinner deleted the importlib_builtins branch March 24, 2020 17:03
brettcannon
brettcannon reviewed Mar 24, 2020
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2020-03-24-16-17-20.bpo-40050.6GrOlz.rst Resolved

Uh oh!

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

@kylotan kylotan mannequin mentioned this pull request Sep 19, 2022
Py_Finalize() doesn't clear all Python objects at exit #44470
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@brettcannon brettcannon brettcannon left review comments
@corona10 corona10 corona10 approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

5 participants

@vstinner @brettcannon @corona10 @the-knights-who-say-ni @bedevere-bot
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.