-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Closed
Copy link
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
For source file with relative path "path/to/file.py" it creates file with incorrect path "/absolute/path/to/path/to/file.pyc" instead of "path/to/file.pyc".
- it adds the directory path to the source file twice.
- it seems that returning an absolute path is unnecessary.
Surprisingly, the broken version works in all existing tests. Either they only use the source file path without directory, or absolute path, or the test is indifferent to the compiled file path. But it did not work in #124799 which created independent set of tests for running compiled files.
Linked PRs
- gh-124842: Fix test.support.import_helper.make_legacy_pyc() #124843
- [3.13] gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843) #124853
- [3.12] gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843) #124854
- Revert 'gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843)' #124868
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error