This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_import.py leaks on 2.7
Type: Stage: resolved
Components: Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, eric.snow, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-12-03 21:32 by benjamin.peterson, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_import-leak-2.7.patch serhiy.storchaka, 2016-12-03 21:45 review
Messages (3)
msg282305 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2016-12-03 21:32
It looks like the test if not the fix for #15578 reveals a reference leak somewhere in the import system:

$ ./python Lib/test/regrtest.py -R :: test_import
[1/1] test_import
beginning 9 repetitions
123456789
.........
test_import leaked [1, 1, 1, 1] references, sum=4
Warning -- sys.path was modified by test_import
1 test failed:
    test_import
[57131 refs]
msg282306 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-03 21:45
Following patch fixes a warning. I didn't run the test in debug mode, but suppose that the leak also is fixed.
msg282322 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-04 07:17
New changeset 6e9939e1f933 by Benjamin Peterson in branch '2.7':
simplify cleanup of test_replace_parent_in_sys_modules (closes #28862)
https://hg.python.org/cpython/rev/6e9939e1f933
History
Date User Action Args
2022-04-11 14:58:40adminsetgithub: 73048
2016-12-04 07:17:13python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg282322

resolution: fixed
stage: patch review -> resolved
2016-12-03 21:45:09serhiy.storchakasetfiles: + test_import-leak-2.7.patch

nosy: + serhiy.storchaka
messages: + msg282306

keywords: + patch
stage: patch review
2016-12-03 21:32:18benjamin.petersoncreate