]> granicus.if.org Git - python/commitdiff
Issue #14061: Misc fixes and cleanups in archiving code in shutil.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 16 Dec 2016 17:00:55 +0000 (19:00 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 16 Dec 2016 17:00:55 +0000 (19:00 +0200)
Imporoved the documentation and tests for make_archive() and unpack_archive().
Improved error handling when corresponding compress module is not available.
Brake circular dependency between shutil and tarfile modules.

1  2 
Doc/library/shutil.rst
Lib/shutil.py
Lib/test/test_shutil.py

Simple merge
diff --cc Lib/shutil.py
Simple merge
index 46e2c57746d2887050133bebe0615c0d185d8f83,709feebf017a25f3e8a259624420f75bfb86981c..2ad3a21c86d2c1bd2813219c2ee3a1a907905b43
@@@ -22,20 -23,7 +23,8 @@@ import zipfil
  import warnings
  
  from test import support
 -from test.support import TESTFN, check_warnings, captured_stdout
 +from test.support import (TESTFN, check_warnings, captured_stdout,
-                           requires_zlib, android_not_root)
- try:
-     import bz2
-     BZ2_SUPPORTED = True
- except ImportError:
-     BZ2_SUPPORTED = False
- try:
-     import lzma
-     LZMA_SUPPORTED = True
- except ImportError:
-     LZMA_SUPPORTED = False
++                          android_not_root)
  
  TESTFN2 = TESTFN + "2"