Jelle Zijlstra
a12df7b7d4
bpo-30218: support path-like objects in shutil.unpack_archive() (GH-1367)
Thanks to Jelle Zijlstra for the patch.
9 years ago
Serhiy Storchaka
5affd23e6f
bpo-29762: More use "raise from None". ( #569 )
This hides unwanted implementation details from tracebacks.
9 years ago
Serhiy Storchaka
20cdffd830
Issue #14061 : Misc fixes and cleanups in archiving code in shutil.
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.
9 years ago
Serhiy Storchaka
666de77727
Issue #28488 : shutil.make_archive() no longer adds entry "./" to ZIP archive.
9 years ago
Martin Panter
0be894b2f6
Issue #27895 : Spelling fixes (Contributed by Ville Skyttä).
10 years ago
Raymond Hettinger
15f44ab043
Issue #27895 : Spelling fixes (Contributed by Ville Skyttä).
10 years ago
Martin Panter
eb9957065a
Issue #27626 : Spelling fixes in docs, comments and internal names
Based on patch by Ville Skyttä.
10 years ago
Serhiy Storchaka
d30829def2
Issue #26801 : shutil.get_terminal_size() now handles the case of stdout is
reopened on Windows. Added tests for fallbacks.
10 years ago
Victor Stinner
119ebb70e9
Fix shutil.get_terminal_size() error handling
Issue #26801 : Fix error handling in shutil.get_terminal_size(), catch
AttributeError instead of NameError. Patch written by Emanuel Barry.
test_shutil: skip the functional test using "stty size" command if
os.get_terminal_size() is missing.
10 years ago
Serhiy Storchaka
2504cecebd
Issue #24982 : shutil.make_archive() with the "zip" format now adds entries
for directories (including empty directories) in ZIP file.
Added test for comparing shutil.make_archive() with the "zip" command.
11 years ago
Raymond Hettinger
5b798abf5b
Issue #24878 : Add docstrings to selected namedtuples
11 years ago
Berker Peksag
5a294d822b
Issue #21697 : shutil.copytree() now correctly handles symbolic links that point to directories.
Patch by Eduardo Seabra and Thomas Kluyver.
11 years ago
Berker Peksag
884afd92f5
Issue #21775 : shutil.copytree(): fix crash when copying to VFAT
An exception handler assumed that that OSError objects always have a
'winerror' attribute. That is not the case, so the exception handler
itself raised AttributeError when run on Linux (and, presumably, any
other non-Windows OS).
Patch by Greg Ward.
11 years ago
Serhiy Storchaka
9a4fc19589
Issue #21280 : Fixed a bug in shutil.make_archive() when create an archive of
current directory in current directory.
11 years ago
Berker Peksag
8083cd6c3b
Issue #22665 : Add missing get_terminal_size and SameFileError to shutil.__all__.
11 years ago
Berker Peksag
3715da5c97
Issue #21391 : Use os.path.abspath in the shutil module.
12 years ago
Serhiy Storchaka
1121377cdb
Issue #5411 : Added support for the "xztar" format in the shutil module.
12 years ago
R David Murray
6ffface429
#19840 : Add copy_function to shutil.move.
Patch by Claudiu Popa.
12 years ago
Andrew Kuchling
a0934b2c1b
#20744 : don't try running an external 'zip' in shutil.make_archive()
Instead we'll just use the stdlib zipfile module. Patch by Derek Chiang
12 years ago
Serhiy Storchaka
3a308b9f37
Issue #19856 : shutil.move() failed to move a directory to other directory
on Windows if source name ends with os.altsep.
12 years ago
Benjamin Peterson
091d386f78
use with statement to ensure zipfile is always closed ( closes #20102 )
12 years ago
Victor Stinner
1d006a2c0e
Backout a1a05e2724dd: shutil.which(bytes) is a new feature and my patch does not work on Windows
12 years ago
Victor Stinner
fffb96ba66
Issue #18283 : shutil.which() now supports bytes argument, not only text argument.
12 years ago
Ezio Melotti
30b9d5d3af
#18705 : fix a number of typos. Patch by Févry Thibault.
13 years ago
Brett Cannon
cd171c8e92
Issue #18200 : Back out usage of ModuleNotFoundError (8d28d44f3a9a)
13 years ago
Brett Cannon
0a140668fa
Issue #18200 : Update the stdlib (except tests) to use
ModuleNotFoundError.
13 years ago
Barry Warsaw
618738b921
- Issue #17012 : shutil.which() no longer fallbacks to the PATH environment
variable if empty path argument is specified. Patch by Serhiy Storchaka.
13 years ago
Hynek Schlawack
0beab058dd
#17076 : Make copying of xattrs more permissive of missing FS support
Patch by Thomas Wouters.
13 years ago
Serhiy Storchaka
8bea200b98
Issue #16957 : shutil.which() no longer searches a bare file name in the
current directory on Unix and no longer searches a relative file path with
a directory part in PATH directories. Patch by Thomas Kluyver.
13 years ago
Serhiy Storchaka
014791f848
Issue #16993 : shutil.which() now preserves the case of the path and extension
on Windows.
13 years ago
Andrew Svetlov
2606a6f197
Issue #16719 : Get rid of WindowsError. Use OSError instead
Patch by Serhiy Storchaka.
13 years ago
Andrew Svetlov
ad28c7f9da
Issue #16706 : get rid of os.error
13 years ago
Andrew Svetlov
3438fa496d
Get rig of EnvironmentError ( #16705 )
13 years ago
Hynek Schlawack
4865376c44
Closes #1492704 : Make shutil.copyfile() raise a distinct SameFileError
Patch by Atsuo Ishimoto.
14 years ago
Georg Brandl
c8076dfa9d
Fix wrong way of adding Error information in shutil.copytree.
14 years ago
Georg Brandl
3196529f3c
Fix wrong way of adding Error information in shutil.copytree.
14 years ago
Hynek Schlawack
26fe37dd3f
#1492704 : Backout and wait for 3.4
14 years ago
Hynek Schlawack
77d3283370
#1492704 : Make shutil.copyfile() raise a distinct SameFileError
Patch by Atsuo Ishimoto.
14 years ago
Larry Hastings
b40380667c
Issue #15202 : Consistently use the name "follow_symlinks" for
new parameters in os and shutil functions. Patch by Serhiy Storchaka.
14 years ago
Larry Hastings
ad5ae0456e
- Issue #15238 : shutil.copystat now copies Linux "extended attributes".
14 years ago
Hynek Schlawack
d0f6e0a6e6
Check for all used fd-based functions in shutil.rmdir, closes #15218
14 years ago
Hynek Schlawack
9f558ccefd
#4489 : Use dir_fd in rmdir in _rmtree_safe_fd()
Now that rmdir supports dir_fd, we also use it. Attackers can't even delete
empty directories anymore.
14 years ago
Hynek Schlawack
a75cd1ce73
#4489 : Don't follow ever symlinks in rmtree
Also added several regression tests.
14 years ago
Hynek Schlawack
3b52778c74
#4489 Make fd based rmtree work on bytes
14 years ago
Philip Jenvey
88bc0d2640
small refactor and PEP8 line width/docstring
14 years ago
Hynek Schlawack
2100b42317
#4489 : Fix usage of fd-based functions to new api introduced earlier today
Also add an explicit test for safe implementation usage on supported platforms.
As a side effect, this commit adds a module-level attribute 'rmtree_is_safe'
which offers introspection whether the current rmtree implementation is safe
against symlink attacks.
14 years ago
Hynek Schlawack
67be92bed4
#4489 : Add a shutil.rmtree that isn't suspectible to symlink attacks
It is used automatically on platforms supporting the necessary os.openat() and
os.unlinkat() functions. Main code by Martin von Löwis.
14 years ago
Brian Curtin
dc00f1eba0
Fix #15148 . Capitalize PATH, hopefully leading to less confusion
14 years ago
Brian Curtin
2193536e79
Fix #15148 . Make the shutil.which docstring more thorough
14 years ago
Brian Curtin
e3f3940fc3
file was the old arg name from an earlier patch. command matches the implementation
14 years ago