Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

May 16, 2012, 1:09 PM

Post #1 of 22 (1166 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

Changes by Ross Lagerwall <rosslagerwall [at] gmail>:


----------
nosy: +rosslagerwall

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 25, 2012, 9:54 PM

Post #2 of 22 (1158 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Larry Hastings <larry [at] hastings> added the comment:

Here's my first pass at a patch. For this patch,
I took the proposal to its logical extreme: I removed
every function in os that was both mildly redundant
with an existing function *and* has been added since
3.2, and moved that functionality to the equivalent
existing function, making it accessible with the use
of keyword-only parameters.

Specifically:

This function has been removed, and instead
| this parameter has been added to
| | this function
| | |
v v v
-------------------------------------
faccessat dir_fd access
faccessat effective_ids access
faccessat follow_symlinks access
fchmodat dir_fd chmod
fchmodat follow_symlinks chmod
fchownat dir_fd chown
fchownat follow_symlinks chown
fexecve fd execve
fgetxattr fd getxattr
flistdir fd listdir
flistxattr fd listxattr
fremovexattr fd removexattr
fsetxattr fd setxattr
fstatat dir_fd stat
futimens fd utime
futimes fd utime
futimesat dir_fd utime
lgetxattr follow_symlinks getxattr
linkat dst_dir_fd link
linkat src_dir_fd link
linkat follow_symlinks link
llistxattr follow_symlinks listxattr
lremovexattr follow_symlinks removexattr
lsetxattr follow_symlinks setxattr
lutimes follow_symlinks utime
mkdirat dir_fd mkdir
mkfifoat dir_fd mkfifoat
mknodat dir_fd mknod
open dir_fd openat
readlinkat dir_fd readlink
renameat dst_dir_fd rename
renameat src_dir_fd rename
symlinkat dir_fd symlink
unlinkat dir_fd unlink
unlinkat remove_directory unlink
utimensat dir_fd utime
utimensat follow_symlinks utime

Additionally, we *could* deprecate this function,
| as I have added this parameter
| | to this function:
| | |
v v v
--------------------------------------
fchdir fd chdir
fchmod fd chmod
fstat fd stat
fstatvfs fd statvfs
lchflags follow_symlinks chflags
lchmod follow_symlinks chmod
fchown fd chown
lchown follow_symlinks chown
lstat follow_symlinks stat

I doubt we'll ever deprecate those functions.
This patch does not deprecate those functions.
I don't propose deprecating those functions.


Notes:

* What do you do on platforms where the functionality isn't available?
I believe it's better to always accept parameters, but throw a
NotImplementedError if the functionality they represent is
unavailable on the current platform. Adding and removing
parameters based on the current platform... that way lies madness.
(It's like scrollbars that pop in and out of existance depending
on whether or not you need them. Better that the scrollbars are
always there, and simply disabled when the content fits in the
current window. Users like a stable foundation under their feet.)

* The patch is... pretty big. But you can divide-and-conquer it
into a series of self-contained parts. First I add path_converter,
then I modify existing functions / remove new functions. Each of
those can be reviewed in isolation.

Also, the new implementations generally follow the same pattern:
initialize
call PyArg_ParseTupleAndKeywords
error out early if user asks for functionality
unavailable on the current platform
ensure that combinations of parameters
(dir_fd, fd, follow_symlinks) are permitted
do actual work, turning on/off advanced functionality
based on configure ifdefs (HAVE_FCHOWNAT etc)
if error, raise exception
compute return value
exit:
cleanup all path variables
return return_value

Here's a list of all the functions I added arguments to:
access chdir chflags chmod chown execve getxattr link listdir
listxattr mkdir mkfifo mknod open readlink removexattr rename
setxattr stat statvfs symlink unlink utime

* The one new bit of technology: a PyArg_ParseTuple "converter"
function called path_converter. Here's its documentation:

/*
* A PyArg_ParseTuple "converter" function
* that handles filesystem paths in the manner
* preferred by the os module.
*
* path_converter accepts (Unicode) strings and their
* subclasses, and bytes and their subclasses. What
* it does with the argument depends on the platform:
*
* * On Windows, if we get a (Unicode) string we
* extract the wchar_t * and return it; if we get
* bytes we extract the char * and return that.
*
* * On all other platforms, strings are encoded
* to bytes using PyUnicode_FSConverter, then we
* extract the char * from the bytes object and
* return that.
*
* Input fields:
* path.nullable
* If nonzero, the path is permitted to be None.
* path.function_name
* If non-NULL, path_converter will use that as the name
* of the function in error messages.
* (If path.argument_name is NULL it omits the function name.)
* path.argument_name
* If non-NULL, path_converter will use that as the name
* of the parameter in error messages.
* (If path.argument_name is NULL it uses "path".)
*
* Output fields:
* path.wide
* Points to the path if it was expressed as Unicode
* and was not encoded. (Only used on Windows.)
* path.narrow
* Points to the path if it was expressed as bytes,
* or it was Unicode and was encoded to bytes.
* path.length
* The length of the path in characters.
* path.object
* The original object passed in.
* path.cleanup
* For internal use only. May point to a temporary object.
* (Pay no attention to the man behind the curtain.)
*
* At most one of path.wide or path.narrow will be non-NULL.
* If path was None and path.nullable was set,
* both path.wide and path.narrow will be NULL,
* and path.length will be 0.
*
* path_converter takes care to not write to the path_t
* unless it's successful. However it must reset the
* "cleanup" field each time it's called.
*
* Use as follows:
* path_t path;
* memset(&path, 0, sizeof(path));
* PyArg_ParseTuple(args, "O&", path_converter, &path);
* // ... use values from path ...
* path_cleanup(&path);
*
* (Note that if PyArg_Parse fails you don't need to call
* path_cleanup(). However it is safe to do so.)
*/
typedef struct {
char *function_name;
char *argument_name;
int nullable;
wchar_t *wide;
char *narrow;
Py_ssize_t length;
PyObject *object;
PyObject *cleanup;
} path_t;

I assert path_converter is Very Useful. It nearly always
reduced the argument processing from three code paths
(two for Windows, one for everyone else) to one. Even if
the rest of the patch isn't accepted I'm sure we'll keep
path_converter.

* In a lot of places I combined together several functions, or
several large blobs of #ifdef'd code, into one large
slightly-shaggy function. Like, Windows code is now often
streamlined in, instead of being a big separate #ifdef. And
instead of three passes at decoding arguments (one for Windows
wide, one for Windows narrow, one for everyone else) there is
generally just one. (Thanks, path_converter!) Again, even
if we don't keep the extra keyword arguments / functionality,
I'm hoping at least some of that cleanup will survive.

* utime is the whale. It obviates *five* other functions
(futimens, futimes, futimesat, lutimes, and utimensat).
I spent a fair amount of time refactoring it. It's so complex,
it was hard to make it anything like readable. I like to
think I reached a local maximum of readability given what I had
to work with, and I like to think that the resulting dog's
breakfast is less unreadable than the previous iteration. Anyway
I'm definitely open to suggestions on how to restructure it
further to enhance readability.

* The tests used to use e.g. hasattr(os, 'futimes') and the like to
determine what functionality was available. In order to LBYL,
I had to resort to e.g. sysconfig.get_config_var('HAVE_FUTIMES').
If users need to LBYL here too, well, it's kind of a problem.
(I hope function signature objects solve this--we're talking
about it.)

* On a very related topic: os.openat() is one of the functions I
removed. And then we have this in Lib/os.py:
if _exists('openat'):
def fwalk(...)
Since I removed os.openat completely, we could longer tell
whether or not the functionality is available. And I couldn't
use my sysconfig.get_config_var trick because it's os.py and
we're bootstrapping the interpreter. So I went with a dirty
hack--uh, I mean, practicality beats purity. posixmodule.c
conditionally exposes a symbol called _HAVE_OPENAT if openat()
is available, and fwalk() is now gated on that.

* A minor semantic change: symlink() now accepts the same arguments
everywhere. Previously it had an extra optional argument only on
Windows ("target_is_directory"). Non-Windows now accepts that too
and ignores it, in much the same way that os.mkdir ignores the mode
on Windows. Also, os.symlink now accepts byte strings for the
paths on Windows. (Even though we'll remove byte string paths
in 3.4, yes?)

* The patch is still sloppy:
* The docstrings are incomplete.
* I haven't touched the docs at all.
* There are > 80 col lines.
Clearly I'll clean up this stuff if the patch has a shot at
going in.

I do think it's an improvement. But I won't check any part of it
in without some consensus (or BFDL ruling).

I look forward to your feedback!

----------
assignee: -> larry
keywords: +patch
stage: -> patch review
Added file: http://bugs.python.org/file25716/larry.os.keyword.arguments.collapse.1.diff

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 4, 2012, 9:15 AM

Post #3 of 22 (1149 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Larry Hastings <larry [at] hastings> added the comment:

Second pass at my patch. Incorporates suggestions from Serhiy's review--thanks, Serhiy!

Still not ready for checkin. > 80 col lines, no docs, docstrings are messy. But code is ready for (further) review. Code passes regression test suite without errors.

----------
Added file: http://bugs.python.org/file25818/larry.os.keyword.arguments.collapse.2.diff

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 4, 2012, 9:52 AM

Post #4 of 22 (1149 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Serhiy Storchaka <storchaka [at] gmail> added the comment:

Well, I'm going to ignore the long lines and documentation. The patch is
really big and impressive.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 4, 2012, 9:54 AM

Post #5 of 22 (1150 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Larry Hastings <larry [at] hastings> added the comment:

I'm not sure that "long" and "impressive" are words that go together when describing a patch ;-)

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 6, 2012, 9:24 AM

Post #6 of 22 (1149 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Changes by Yury Selivanov <yselivanov [at] gmail>:


----------
nosy: +Yury.Selivanov

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 7, 2012, 6:30 PM

Post #7 of 22 (1151 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Larry Hastings <larry [at] hastings> added the comment:

Here's a nice fresh minor update.

Notes on this third patch:

* The docstrings are now done.

* I discovered that fchmodat() doesn't actually support
AT_SYMLINK_NOFOLLOW! glibc documents using the flag, then
comically notes that it doesn't actually work. Specifying
it results in ENOTSUP every time. os.chmod() now accomodates
this; it throws NotImplementedError if it detects this situation.
However it should also Just Work once glibc supports it.

* While editing the docstrings, I noticed that several of them
had old-style octal constants ;-) I fixed 'em.

* I added support for the remove_dir argument to unlink/remove
on Windows. I also made it work on non-Windows even when
unlinkat() is not available.

----------
Added file: http://bugs.python.org/file25863/larry.os.keyword.arguments.collapse.3.diff

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 8, 2012, 12:02 PM

Post #8 of 22 (1149 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Larry Hastings <larry [at] hastings> added the comment:

BTW: If PEP 362 is accepted, and this patch makes it for 3.3 (both of which I think will happen), I'll hand-code signatures for the functions that may throw NotImplementedError so users can use "is_implemented" to LBYL.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 8, 2012, 7:46 PM

Post #9 of 22 (1149 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Guido van Rossum <guido [at] python> added the comment:

I haven't read the code, but from Larry's description this looks great to me. It's amazing how many extra functions were added to the os module since 3.2! I also agree that the redundant functions that existed in 3.2 should stay and I don't see it's fair to deprecate them. I do hope that not too many people have written code based on the 3.3 alphas using all those extra functions, but I suppose they will get what they paid for.

Everything else Larry wrote also sounds reasonable to me.

----------
nosy: +gvanrossum

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 8, 2012, 7:52 PM

Post #10 of 22 (1148 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA [at] GMail> added the comment:

Previously existing redundant functions could be deprecated in documentation.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 8, 2012, 9:23 PM

Post #11 of 22 (1149 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Larry Hastings <larry [at] hastings> added the comment:

> Previously existing redundant functions could be
> deprecated in documentation.

As in, don't start a "deprecation cycle" (warning in 3.3, deprecated in 3.4, gone in 3.5), just document "consider using this other function instead"? That's probably worth doing. I wouldn't use the word "deprecated" though, I'd just suggest a "see also".

Maybe we could remove the redundant functions in 4.0. I'll put it on my wishlist :)

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 21, 2012, 1:24 AM

Post #12 of 22 (1133 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Larry Hastings <larry [at] hastings> added the comment:

New patch! What's new:

* The big change: I removed the "fd=" parameters. Now, functions that
accept either a path or a file descriptor simply take either as their
"path" argument. I ran it by Guido and he thought it sounded fine,
so I tried it--and I think it's a definite improvement. (Thanks to
Jim Jewett for suggesting it--tbh I'd considered it before, but
looking at it through fresh eyes helped!)

* Also new in this patch: you can now LBYL for the fd, dir_fd, and
follow_symlinks parameters. Just check to see if the function is
in os.supports_<name of parameter>. For example:
if os.chown in os.supports_dir_fd:
os.chown(path, dir_fd=whatnot)

* The third big bit of news: the patch works under Windows!

* I attempted to support Mac OS X 10.3, specifically the weak linking
to statvfs, fstatvfs, and lchown. However I don't have a Mac (much
less one running 10.3) so I can't test this.

I *think* the docstrings are all fixed. The only thing I know that
needs to be done are the docs (and Misc/NEWS).

I really wanna get this in before the feature freeze. I promise to
support it through the betas... can I puh-leez check it in?

----------
Added file: http://bugs.python.org/file26063/larry.os.keyword.arguments.collapse.4.diff

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 22, 2012, 3:48 AM

Post #13 of 22 (1134 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Larry Hastings <larry [at] hastings> added the comment:

Fifth iteration of my patch. Everything is done, and I really think it's ready to be checked in.

* The documentation is done, including Misc/NEWS.
* All the code is now < 80 columns.
* The docstrings have been double- and triple-checked.
* It passes all regression tests on Linux 64-bit; it processes the
regression test suite identically to trunk on Windows 32-bit.

----------
Added file: http://bugs.python.org/file26080/larry.os.keyword.arguments.collapse.5.diff

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 22, 2012, 12:22 PM

Post #14 of 22 (1131 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Serhiy Storchaka <storchaka [at] gmail> added the comment:

> > http://bugs.python.org/review/14626/diff/5182/Doc/library/os.rst#newcode1210
> Doc/library/os.rst:1210: using it will raise a
> :exc:`NotImplementedError`.
> Same as above: would it make sense to ignore the arg if follow_symlinks
> is not supported, but the fact is irrelevant because the system doesn't
> support symlinks at all?

And what if the system supports symlink and doesn't support
at-functions, follow_symlinks=False and file is not symlink. Should it
be NotImplementedError?

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 22, 2012, 4:30 PM

Post #15 of 22 (1128 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 27f9c26fdd8b by Larry Hastings in branch 'default':
Issue #14626: Large refactoring of functions / parameters in the os module.
http://hg.python.org/cpython/rev/27f9c26fdd8b

----------
nosy: +python-dev

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 22, 2012, 5:02 PM

Post #16 of 22 (1130 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 04fd8f77a58e by Larry Hastings in branch 'default':
Issue #14626: Fix buildbot issues on FreeBSD (AMD64). (Fingers crossed.)
http://hg.python.org/cpython/rev/04fd8f77a58e

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 22, 2012, 5:07 PM

Post #17 of 22 (1130 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset e1e0eeb07398 by Larry Hastings in branch 'default':
Issue #14626: Fix buildbot issue on x86 Tiger 3.x.
http://hg.python.org/cpython/rev/e1e0eeb07398

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 22, 2012, 7:51 PM

Post #18 of 22 (1129 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 66f7377547d5 by Larry Hastings in branch 'default':
Issue #14626: Fix buildbot issue on OpenIndiana 3.x machines. (Hopefully.)
http://hg.python.org/cpython/rev/66f7377547d5

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 23, 2012, 3:37 AM

Post #19 of 22 (1143 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

27f9c26fdd8b broke test_shutil on the Windows buildbots:


======================================================================
FAIL: test_basic (test.test_shutil.TestWhich)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py", line 1146, in test_basic
self.assertEqual(rv, self.temp_file.name)
AssertionError: None != 'c:\\users\\db3l\\appdata\\local\\temp\\tmpxqw4gu\\tmp7ugfmm.exe'

======================================================================
FAIL: test_full_path_short_circuit (test.test_shutil.TestWhich)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py", line 1152, in test_full_path_short_circuit
self.assertEqual(self.temp_file.name, rv)
AssertionError: 'c:\\users\\db3l\\appdata\\local\\temp\\tmpmwer14\\tmpeacfbz.exe' != None

======================================================================
FAIL: test_non_matching_mode (test.test_shutil.TestWhich)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py", line 1158, in test_non_matching_mode
self.assertIsNone(rv)
AssertionError: 'c:\\users\\db3l\\appdata\\local\\temp\\tmp7n6ojp\\tmp5tt9pa.exe' is not None

======================================================================
FAIL: test_pathext_checking (test.test_shutil.TestWhich)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py", line 1181, in test_pathext_checking
self.assertEqual(self.temp_file.name, rv)
AssertionError: 'c:\\users\\db3l\\appdata\\local\\temp\\tmpipmbe3\\tmpx43hex.exe' != None

======================================================================
FAIL: test_relative (test.test_shutil.TestWhich)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_shutil.py", line 1166, in test_relative
self.assertEqual(rv, os.path.join(tail_dir, self.file))
AssertionError: None != 'tmpcluw7l\\tmp6sy_py.exe'

----------
nosy: +pitrou
priority: normal -> release blocker

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 23, 2012, 9:49 AM

Post #20 of 22 (1131 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

The `rmdir` argument to unlink() looks completely crazy to me. Instead rmdir() should be called when one wants to rmdir() a fd.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 23, 2012, 10:15 AM

Post #21 of 22 (1131 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Georg Brandl <georg [at] python> added the comment:

I agree with Antoine. I've opened #15154 to track this.

----------
nosy: +georg.brandl

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 23, 2012, 1:41 PM

Post #22 of 22 (1132 views)
Permalink
[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count [In reply to]

Georg Brandl <georg [at] python> added the comment:

The Windows buildbots are now content; closing.

----------
resolution: -> fixed
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.