Issue #14626: Large refactoring of functions / parameters in the os module.

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.
This commit is contained in:
Larry Hastings 2012-06-22 16:30:09 -07:00
parent f0f4742b49
commit 9cf065cfdc
9 changed files with 3413 additions and 3041 deletions

View file

@ -1703,8 +1703,8 @@ def can_xattr():
try:
# TESTFN & tempfile may use different file systems with
# different capabilities
os.fsetxattr(tmp_fp, b"user.test", b"")
os.fsetxattr(fp.fileno(), b"user.test", b"")
os.setxattr(tmp_fp, b"user.test", b"")
os.setxattr(fp.fileno(), b"user.test", b"")
# Kernels < 2.6.39 don't respect setxattr flags.
kernel_version = platform.release()
m = re.match("2.6.(\d{1,2})", kernel_version)