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: Invalid cross device link in Lib/test/support/import_helper.py
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, miss-islington, notarealdeveloper
Priority: normal Keywords: patch

Created on 2022-02-07 20:30 by notarealdeveloper, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 31204 merged notarealdeveloper, 2022-02-07 21:00
PR 31207 merged miss-islington, 2022-02-08 01:09
Messages (3)
msg412791 - (view) Author: Jason Wilkes (notarealdeveloper) * Date: 2022-02-07 20:30
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.
msg412802 - (view) Author: miss-islington (miss-islington) Date: 2022-02-08 01:09
New changeset da576e08296490e94924421af71001bcfbccb317 by Jason Wilkes in branch 'main':
bpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH-31204)
https://github.com/python/cpython/commit/da576e08296490e94924421af71001bcfbccb317
msg412871 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2022-02-08 21:04
New changeset c2735b75afd530631efde4ddd3cb24bbdc285559 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)
https://github.com/python/cpython/commit/c2735b75afd530631efde4ddd3cb24bbdc285559
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90836
2022-02-08 21:04:21brett.cannonsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-02-08 21:04:12brett.cannonsetnosy: + brett.cannon
messages: + msg412871
2022-02-08 01:09:27miss-islingtonsetmessages: + msg412802
2022-02-08 01:09:24miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request29378
2022-02-07 21:00:00notarealdevelopersetkeywords: + patch
stage: patch review
pull_requests: + pull_request29374
2022-02-07 20:30:36notarealdevelopercreate