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

test_startup_imports of test_site fails on OS X due to new import of enum in re #72282

Closed
ned-deily opened this issue Sep 12, 2016 · 4 comments
Closed
Assignees
Labels

Comments

@ned-deily
Copy link
Member

BPO 28095
Nosy @ronaldoussoren, @ned-deily
PRs
  • bpo-28095: Re-enable temporarily disabled part of test_startup_import… #2927
  • Dependencies
  • bpo-19325: _osx_support imports many modules
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/ned-deily'
    closed_at = <Date 2017-07-28.07:11:45.562>
    created_at = <Date 2016-09-12.04:14:30.094>
    labels = ['OS-mac', '3.7']
    title = 'test_startup_imports of test_site fails on OS X due to new import of enum in re'
    updated_at = <Date 2017-07-28.07:11:45.560>
    user = 'https://github.com/ned-deily'

    bugs.python.org fields:

    activity = <Date 2017-07-28.07:11:45.560>
    actor = 'ned.deily'
    assignee = 'ned.deily'
    closed = True
    closed_date = <Date 2017-07-28.07:11:45.562>
    closer = 'ned.deily'
    components = ['macOS']
    creation = <Date 2016-09-12.04:14:30.094>
    creator = 'ned.deily'
    dependencies = ['19325']
    files = []
    hgrepos = []
    issue_num = 28095
    keywords = []
    message_count = 4.0
    messages = ['275945', '275950', '299372', '299373']
    nosy_count = 3.0
    nosy_names = ['ronaldoussoren', 'ned.deily', 'python-dev']
    pr_nums = ['2927']
    priority = None
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue28095'
    versions = ['Python 3.7']

    @ned-deily
    Copy link
    Member Author

    bpo-28082, for 3.6.0b1, modified the re module to use enum.IntFlag. As described in bpo-19325, on interpreter startup site.py 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 bpo-19325 to at least try to remove the usage of re and then re-enable the skipped test.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 12, 2016

    New changeset 9f0016055820 by Ned Deily in branch 'default':
    Issue bpo-28095: Temporarily disable part of test_startup_imports on OS X.
    https://hg.python.org/cpython/rev/9f0016055820

    @ned-deily
    Copy link
    Member Author

    New changeset c22bd58 by Ned Deily in branch 'master':
    bpo-28095: Re-enable temporarily disabled part of test_startup_imports on macOS (bpo-2927)
    c22bd58

    @ned-deily
    Copy link
    Member Author

    The changes for bpo-29585 to speed up startup removed the import of _osx_support, and of re, from site.py 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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant