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.

Title: test_startup_imports of test_site fails on OS X due to new import of enum in re
Type: Stage: resolved
Components: macOS Versions: Python 3.7
Status: closed Resolution: fixed
Dependencies: 19325 Superseder:
Assigned To: ned.deily Nosy List: ned.deily, python-dev, ronaldoussoren
Priority: Keywords:

Created on 2016-09-12 04:14 by ned.deily, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2927 merged ned.deily, 2017-07-28 06:43
Messages (4)
msg275945 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016-09-12 04:14
Issue28082, for 3.6.0b1, modified the re module to use enum.IntFlag.  As described in Issue19325, on interpreter startup imports sysconfig which, on OS X, imports _osx_support which imports, among other things, re.  Now that re imports enum, a number of collections modules are also imported at startup on OS X which can have a negative performance impact.  test_startup_imports of test_site was designed to catch situations like this ... and does.

For 3.6.0b1, I'm going to skip the failing part of the test on OS X only.  For 3.6.0b2, I'll plan to revive languishing Issue19325 to at least try to remove the usage of re and then re-enable the skipped test.
msg275950 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-12 04:26
New changeset 9f0016055820 by Ned Deily in branch 'default':
Issue #28095: Temporarily disable part of test_startup_imports on OS X.
msg299372 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2017-07-28 07:02
New changeset c22bd58d933efaec26d1f77f263b2845473b7e15 by Ned Deily in branch 'master':
bpo-28095: Re-enable temporarily disabled part of test_startup_imports on macOS (#2927)
msg299373 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2017-07-28 07:11
The changes for bpo-29585 to speed up startup removed the import of _osx_support, and of re, from so the disabled test does not fail in 3.7 and is now re-enabled.  It's not appropriate to try to backport the startup speedup changes to 3.6, so the disabled portion of the test remains disabled on 3.6.x macOS.
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72282
2017-07-28 07:11:45ned.deilysetstatus: open -> closed
priority: deferred blocker ->
versions: - Python 3.6
messages: + msg299373

resolution: fixed
stage: needs patch -> resolved
2017-07-28 07:02:13ned.deilysetmessages: + msg299372
2017-07-28 06:43:24ned.deilysetpull_requests: + pull_request2978
2016-09-12 04:27:58ned.deilysetdependencies: + _osx_support imports many modules
2016-09-12 04:26:59python-devsetnosy: + python-dev
messages: + msg275950
2016-09-12 04:14:30ned.deilycreate