GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — [3.14] gh-141276: Avoid compiling zipimport source in get_filename (GH-153799) by itamaro · Pull Request #161504 · python/cpython Conversation
Contributor
Co-authored-by: Harjoth Khara [email protected]
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…ame (pythonGH-153799) `zipimporter.get_filename()` compiled source modules just to work out the module's file name. `find_spec()` calls it through `spec_from_loader()`, so importing a source module from a ZIP archive compiled it twice and emitted every `SyntaxWarning` twice. `get_filename()` now returns before reading or compiling the source. As a result, a `SyntaxError` in a zipped source module is now raised by `exec_module()` rather than by `find_spec()` or `get_filename()`, and the source isn't compiled twice during import, which matches the filesystem-based loaders. (cherry picked from commit 230917f)
itamaro
requested review from
brettcannon,
ericsnowcurrently,
ncoghlan and
warsaw
as code owners
This was referenced
|
There was an error while loading. Please reload this page.
Documentation build overview
327 files changed ·
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.