]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40275: More lazy imports in test.support (GH-20131)
authorHai Shi <shihai1992@gmail.com>
Mon, 18 May 2020 22:02:57 +0000 (06:02 +0800)
committerGitHub <noreply@github.com>
Mon, 18 May 2020 22:02:57 +0000 (00:02 +0200)
commita3ec3ad9e20e7d9ed148d4cfbd22aebec608b42a
treebece391e5fb7dfc20ddb2d2e30d63ca5d4662996
parentced4e5c22756fde3e97327642c159f6699815caa
bpo-40275: More lazy imports in test.support (GH-20131)

Make the the following imports lazy in test.support:

* bz2
* gzip
* lzma
* resource
* zlib

The following test.support decorators now need to be called
with parenthesis:

* @support.requires_bz2
* @support.requires_gzip
* @support.requires_lzma
* @support.requires_zlib

For example, "@requires_zlib" becomes "@requires_zlib()".
Lib/test/support/__init__.py
Lib/test/test_importlib/test_zip.py
Lib/test/test_logging.py
Lib/test/test_shutil.py
Lib/test/test_tarfile.py
Lib/test/test_venv.py
Lib/test/test_zipapp.py
Lib/test/test_zipfile.py
Lib/test/test_zipfile64.py
Lib/test/test_zipimport.py