Navigation Menu

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

Invalid cross device link in Lib/test/support/import_helper.py #90836

Closed
notarealdeveloper mannequin opened this issue Feb 7, 2022 · 3 comments
Closed

Invalid cross device link in Lib/test/support/import_helper.py #90836

notarealdeveloper mannequin opened this issue Feb 7, 2022 · 3 comments
Labels
3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@notarealdeveloper
Copy link
Mannequin

notarealdeveloper mannequin commented Feb 7, 2022

BPO 46678
Nosy @brettcannon, @miss-islington, @notarealdeveloper
PRs
  • bpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py #31204
  • [3.10] bpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH-31204) #31207
  • 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 = None
    closed_at = <Date 2022-02-08.21:04:21.625>
    created_at = <Date 2022-02-07.20:30:36.219>
    labels = ['type-bug', 'tests', '3.10', '3.11']
    title = 'Invalid cross device link in Lib/test/support/import_helper.py'
    updated_at = <Date 2022-02-08.21:04:21.625>
    user = 'https://github.com/notarealdeveloper'

    bugs.python.org fields:

    activity = <Date 2022-02-08.21:04:21.625>
    actor = 'brett.cannon'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-02-08.21:04:21.625>
    closer = 'brett.cannon'
    components = ['Tests']
    creation = <Date 2022-02-07.20:30:36.219>
    creator = 'notarealdeveloper'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46678
    keywords = ['patch']
    message_count = 3.0
    messages = ['412791', '412802', '412871']
    nosy_count = 3.0
    nosy_names = ['brett.cannon', 'miss-islington', 'notarealdeveloper']
    pr_nums = ['31204', '31207']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue46678'
    versions = ['Python 3.10', 'Python 3.11']

    @notarealdeveloper
    Copy link
    Mannequin Author

    notarealdeveloper mannequin commented Feb 7, 2022

    In Lib/test/support/import_helper.py, the function make_legacy_pyc makes a call to os.rename which can fail when the source and target live on different devices. This happens (for example) when PYTHONPYCACHEPREFIX is set to a directory on a different device from where temporary files are stored. Replacing os.rename with shutil.move fixes it. Will submit a PR.

    @notarealdeveloper notarealdeveloper mannequin added 3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Feb 7, 2022
    @miss-islington
    Copy link
    Contributor

    New changeset da576e0 by Jason Wilkes in branch 'main':
    bpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH-31204)
    da576e0

    @brettcannon
    Copy link
    Member

    New changeset c2735b7 by Miss Islington (bot) in branch '3.10':
    bpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH-31204) (GH-31207)
    c2735b7

    @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
    3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants