FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-150167: Prevent successful import of `bz2` under lazy_imports=all if `_bz2` is unavailable by DavidCEllis · Pull Request #157321 · python/cpython · GitHub

Repository navigation

gh-150167: Prevent successful import of bz2 under lazy_imports=all if _bz2 is unavailable - #157321

Open
DavidCEllis wants to merge 2 commits into
python:mainfrom
DavidCEllis:fix-lazy-all-archive-missing
Open

DavidCEllis wants to merge 2 commits into
python:mainfrom
DavidCEllis:fix-lazy-all-archive-missing

Conversation

DavidCEllis commented Sep 11, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Adds import _bz2; _bz2 to bz2.py which has the effect of making the import eager even under the 'all' lazy imports mode.

The import-ability of bz2 is used in some places to detect if the format is supported. The other compression formats all already use the relevant internal module at module level but bz2 does not.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stdlib Standard Library Python modules in the Lib/ directory topic-lazy-imports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL