| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Patch by Atsuo Ishimoto.
|
|
|
|
|
|
|
| |
- Loosen up test as Fedora has implicit xattrs
- Actually test the destination for xattrs
Should make Fedora buildbot green again.
|
|
|
|
| |
new parameters in os and shutil functions. Patch by Serhiy Storchaka.
|
| |
|
| |
|
|
|
|
| |
Also added several regression tests.
|
|
|
|
| |
behind.
|
| |
|
| |
|
|
|
|
| |
store it as a function attribute
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
It is used automatically on platforms supporting the necessary os.openat() and
os.unlinkat() functions. Main code by Martin von Löwis.
|
| |
|
|
|
|
|
|
|
|
|
| |
Many functions now support "dir_fd" and "follow_symlinks" parameters;
some also support accepting an open file descriptor in place of of a path
string. Added os.support_* collections as LBYL helpers. Removed many
functions only previously seen in 3.3 alpha releases (often starting with
"f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka;
implemented by Larry Hastings.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Patch by Hynek Schlawack.
|
|
|
|
| |
support chflag operations. (Patch by Hynek Schlawack)
|
| |
|
|
|
|
|
| |
os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
Patch by Zbigniew Jędrzejewski-Szmek.
|
|
|
|
|
|
| |
and the source is a symlink, shutil.move() now recreates a symlink on the
destination instead of copying the file contents.
Patch by Jonathan Niehof and Hynek Schlawack.
|
| |
|
|
|
|
|
|
|
|
|
| |
(copyfile, copymode, copystat, copy, copy2).
When that parameter is true, symlinks aren't dereferenced and the operation
instead acts on the symlink itself (or creates one, if relevant).
Patch by Hynek Schlawack.
|
|
|
|
| |
test it
|
|
|
|
| |
also specifying their names.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tests now have two convenience functions to wrap os.path.join, open
and read or write instead of four or six slightly different functions.
The new functions accept a tuple of path segments but not a list
anymore, as it makes no sense to use a list here; I have also removed
the default value for the contents in write_file, as I find it better to
have the contents at the call site.
For simple open then read/write calls, I have left the usual idiom (with
open + read/write), as it is short and readable enough.
I’ve also changed some convoluted cleanup code to just use rmtree, and
removed dubious LBYL os.path.exists checks. The tests still pass on my
machine, and leave no file in $TMP. test_shutil is not as clean as it
could be, but I’ll stop here.
Initial patch provided by Hynek Schlawack, in preparation for a new
feature with new tests in #12715.
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
We don't need to create a temporary buffered binary or text file object just to
create an empty file.
Replace also os.fdopen(handle).close() by os.close(handle).
|
|/ |
|
|\ |
|
| |
| |
| |
| | |
shutil.move (case insensitive file systems only)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85503 | antoine.pitrou | 2010-10-15 00:11:44 +0200 (ven., 15 oct. 2010) | 2 lines
More proper closing of files
........
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r80833 | tarek.ziade | 2010-05-06 00:27:31 +0200 (Thu, 06 May 2010) | 9 lines
Merged revisions 80830 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80830 | tarek.ziade | 2010-05-06 00:15:31 +0200 (Thu, 06 May 2010) | 1 line
Fixed #4265: shutil.copyfile() was leaking file descriptors when disk fills
........
................
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r76103 | antoine.pitrou | 2009-11-04 01:57:15 +0100 (mer., 04 nov. 2009) | 9 lines
Merged revisions 76101 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76101 | antoine.pitrou | 2009-11-04 01:50:26 +0100 (mer., 04 nov. 2009) | 3 lines
Make test_shutil clean up after itself
........
................
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://svn.python.org/python/branches/py3k
........
r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line
convert old fail* assertions to assert*
........
|
| | |
|
| | |
|
| |
| |
| |
| | |
when the user doesn't hold the symbolic link privilege rather than hiding it.
|
| | |
|
| |
| |
| |
| | |
even where os.symlink is not supported.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege
is an account privilege that is required to be held by the user. Not only
must the privilege be enabled for the account, the activated privileges for
the currently running application must be adjusted to enable the requested
privilege.
Rather than exposing an additional function to be called prior to the user's
first os.symlink call, we handle the AdjustTokenPrivileges Windows API call
internally and only expose os.symlink when the privilege escalation was
successful.
Due to the change of only exposing os.symlink when it's available, we can
go back to the original test skipping methods of checking via `hasattr`.
|