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

bpo-40050: Fix importlib._bootstrap_external #19135

Merged
merged 1 commit into from
Mar 24, 2020
Merged

bpo-40050: Fix importlib._bootstrap_external #19135

merged 1 commit into from
Mar 24, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 24, 2020

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

@vstinner
Copy link
Member Author

vstinner commented Mar 24, 2020

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 <shihai1992@gmail.com>
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 <vstinner@python.org>
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".

(...)

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".
@vstinner vstinner merged commit 83d46e0 into python:master Mar 24, 2020
@vstinner vstinner deleted the importlib_builtins branch March 24, 2020 17:03
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.

5 participants