| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
… be removed without forcibly re-importing them.
… undocumented `usefrozen` argument and correct the signature as `deprecated` and `usefrozen` are keyword only arguments.
Documentation build overview38 files changed · ± 38 modified ± Modified |
Sorry, something went wrong.
|
This PR needs to be updated to test the compression modules directly rather than through shutil due to the changes in shutil that make it import the internal modules directly now. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This adds import _bz2; _bz2 to bz2.py which has the effect of making the import eager even under the 'all' lazy imports mode.
Fixes the issue where bz2 would always be reported as supported by shutil under lazy_imports=all even if it was unavailable. This should also fix this same logic where it's reused in other places (such as test_support).
I think it may make sense to add a SUPPORTED_MODULES attribute to compression that lists which modules are available by checking the internal modules directly, but that can be done on top of this.
The 'import' change that added all of the import codeowners as reviewers:
In order to test that a fresh shutil would correctly identify 'bz2' as unavailable if _bz2 is blocked I needed to add an argument to test.support.import_helpers.import_fresh_module to allow bz2 to be cleared without requiring it successfully re-import. This is the new optional cleared argument.
This new argument is documented, along with the previously undocumented 'usefrozen' argument and the signature in the documentation now correctly identifies the 'deprecated' argument as keyword-only.