[issue41718] test.regrtest has way too many imports

2021-03-23 Thread STINNER Victor
STINNER Victor added the comment: Ok, the most important changes have been merged. Thanks everyone who helped on this large project! See also my summary email on python-dev: https://mail.python.org/archives/list/python-...@python.org/thread/I3OQTA3F66NQUN7CH2NHC5XZTO24QCIK/ --

[issue41718] test.regrtest has way too many imports

2021-03-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset cd27af70d58161c59072e27a10e0e63dcbf0bccb by Victor Stinner in branch 'master': bpo-41718: Update runpy startup time What's New (GH-24998) https://github.com/python/cpython/commit/cd27af70d58161c59072e27a10e0e63dcbf0bccb --

[issue41718] test.regrtest has way too many imports

2021-03-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23756 pull_request: https://github.com/python/cpython/pull/24998 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset bd9154a495434464283f74b660160f89930cd791 by Victor Stinner in branch 'master': bpo-41718: runpy now imports pkgutil in functions (GH-24996) https://github.com/python/cpython/commit/bd9154a495434464283f74b660160f89930cd791 --

[issue41718] test.regrtest has way too many imports

2021-03-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23754 pull_request: https://github.com/python/cpython/pull/24996 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset d72e8d487553c103bf2742e229f8266b515fd951 by Victor Stinner in branch 'master': bpo-41718: subprocess imports grp and pwd on demand (GH-24987) https://github.com/python/cpython/commit/d72e8d487553c103bf2742e229f8266b515fd951 --

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: len(sys.modules) of msg376374 test_sys_modules: * Python 3.6: 184 * Python 3.7: 183 * Python 3.8: 221 * Python 3.9: 233 * master: 131 The master branch imports 102 less modules than Python 3.9 (233 => 131)! Almost the half. asyncio, logging,

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9feae41c4f04ca27fd2c865807a5caeb50bf4fc4 by Victor Stinner in branch 'master': bpo-41718: libregrtest avoids importing datetime (GH-24985) https://github.com/python/cpython/commit/9feae41c4f04ca27fd2c865807a5caeb50bf4fc4 --

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23747 pull_request: https://github.com/python/cpython/pull/24987 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23745 pull_request: https://github.com/python/cpython/pull/24985 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 30793e81bd90f3346e962435d49073bc588f067c by Victor Stinner in branch 'master': bpo-41718: Disable support.testresult XML output by default (GH-24982) https://github.com/python/cpython/commit/30793e81bd90f3346e962435d49073bc588f067c --

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0473fb222956063814b6beb5fd401f9eeaa8a56a by Victor Stinner in branch 'master': bpo-41718: libregrtest runtest avoids import_helper (GH-24983) https://github.com/python/cpython/commit/0473fb222956063814b6beb5fd401f9eeaa8a56a --

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23743 pull_request: https://github.com/python/cpython/pull/24983 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23742 pull_request: https://github.com/python/cpython/pull/24982 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 10417dd15f135c179cf4234d1abe506915d802ff by Victor Stinner in branch 'master': bpo-41718: Reduce libregrtest runtest imports (GH-24980) https://github.com/python/cpython/commit/10417dd15f135c179cf4234d1abe506915d802ff --

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23741 pull_request: https://github.com/python/cpython/pull/24981 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23740 pull_request: https://github.com/python/cpython/pull/24980 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2021-03-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 532e063fc2bf9e6e80550670ddc5dc5d2b1d2450 by Victor Stinner in branch 'master': bpo-41718: regrtest saved_test_environment avoids imports (GH-24934) https://github.com/python/cpython/commit/532e063fc2bf9e6e80550670ddc5dc5d2b1d2450 --

[issue41718] test.regrtest has way too many imports

2021-03-19 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "You could save/restore this data only when corresponded modules was imported, like it was done in clear_caches() in refleak.py." That's a very good idea! I implemented it in PR 24934. But I modified runtest() to use *two* saved_test_environment

[issue41718] test.regrtest has way too many imports

2021-03-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23695 pull_request: https://github.com/python/cpython/pull/24934 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2020-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > > Yes, but they should be imported after running the test. Note that the > default value in the example was changed from None to set(). -- ___ Python tracker

[issue41718] test.regrtest has way too many imports

2020-09-06 Thread STINNER Victor
STINNER Victor added the comment: > You could save/restore this data only when corresponded modules was imported, > like it was done in clear_caches() in refleak.py. It was my first idea, but some large modules like multiprocessing and asyncio are only imported by tested when the test file

[issue41718] test.regrtest has way too many imports

2020-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You could save/restore this data only when corresponded modules was imported, like it was done in clear_caches() in refleak.py. For example: # Same for Process objects def get_multiprocessing_process__dangling(self): multiprocessing_process

[issue41718] test.regrtest has way too many imports

2020-09-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: On Windows with current master, the baseline for running anything with 1 import (">>> import sys; len(sys.modules)") is 35 imported modules. Adding "import unittest" increases this to 80. What slightly puzzles me is that running --- import unittest

[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +pablogsal, zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor
STINNER Victor added the comment: In general, it's nice to have the following 4 checks: * multiprocessing.process._dangling * asyncio.events._event_loop_policy * urllib.requests._url_tempfiles * urllib.requests._opener The problem is that because of these checks, **any** unit test file of

[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor
STINNER Victor added the comment: With PR 22089, test_sys_modules.py of msg376374 imports 152 imports rather than 233. It's better than Python 2.7 which imports 170 modules! -- ___ Python tracker

[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +21175 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22089 ___ Python tracker ___

[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor
STINNER Victor added the comment: If I hack test.libregrtest.runtest to not import test.libregrtest.save_env, test_sys_modules imports only 148 instead of 233 modules. -- ___ Python tracker

[issue41718] test.regrtest has way too many imports

2020-09-04 Thread STINNER Victor
New submission from STINNER Victor : Follow-up of bpo-40275. While investigating a crash on AIX (bpo-40068), I noticed that test_threading crashed because the test imports the logging module, and the logging has a bug on AIX on fork. I created an issue to reduce the number of imports made by