[issue13772] listdir() doesn't work with non-trivial symlinks

2013-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset c8212fca8747 by Victor Stinner in branch 'default': Issue #13772: Use syntax for literal wchar_t character http://hg.python.org/cpython/rev/c8212fca8747 -- ___ Python tracker

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset e024236ea253 by Victor Stinner in branch 'default': Issue #13772: Fix a compiler warning on Windows http://hg.python.org/cpython/rev/e024236ea253 New changeset d9f3ea27f826 by Victor Stinner in branch 'default': Issue #13772: Mark helper functions a

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-06-04 Thread Jason R. Coombs
Jason R. Coombs added the comment: @Victor Stinner Thanks for fixing this. You're absolutely right. -- ___ Python tracker ___ ___ Pyt

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-06-04 Thread STINNER Victor
STINNER Victor added the comment: @Jason R. Coombs: Can you please review my following commit? It looks like you made a copy/paste failure in _check_dirA() :-) > New changeset c351591f1f63 by Victor Stinner in branch 'default': > Issue #13772: fix _check_dirA(): call *A() functions, not *W() fu

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset c351591f1f63 by Victor Stinner in branch 'default': Issue #13772: fix _check_dirA(): call *A() functions, not *W() functions http://hg.python.org/cpython/rev/c351591f1f63 -- ___ Python tracker

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset f431cd0edd85 by Victor Stinner in branch 'default': Issue #13772: Fix compiler warnings on Windows http://hg.python.org/cpython/rev/f431cd0edd85 -- ___ Python tracker

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 29a2557d693e by Jason R. Coombs in branch '3.3': Issue #13772: Restored directory detection of targets in `os.symlink` on Windows, which was temporarily removed in Python 3.2.3 due to an incomplete implementation. The implementation now works even

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-05-27 Thread Jason R. Coombs
Jason R. Coombs added the comment: Ugh. So it seems the 3.3 implementation of win_symlink, which is now been renamed to posix_symlink, is now much more complicated. Not only does it handle symlink arguments on Unix platforms, providing abstraction for a couple of underlying system calls, but t

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-05-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: Since there's been no additional criticism or discussion on this matter, I'll plan to commit the proposed patch to restore target directory detection. Since the functionality was removed in a bugfix release, it should be acceptable to restore it in a bugfix r

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-02-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks for the suggestions. > Antoine Pitrou added the comment: > > From an implementation standpoint, I would indeed prefer the path handling > functions to be written in Python. Is there an example of how a function like win32_symlink could call into ntpath

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-02-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm not super-confident about the implementation of the > path-manipulation functions, and I would prefer to use the Python > implementations of the path-manipulation (dirname and join) instead. > If there are any suggestions in this regard, I'd appreciate them

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-02-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: Please disregard the patch 8bf88b31ebb7. Antoine, Brian, or anyone else - would you please review the attached patch (b744517b90bc.diff)? It adds a test for creating directory symlinks that are non-local (don't depend on the current directory for reference),

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-02-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: I tried the create-patch function, but it didn't work against bitbucket (produced an empty diff). So I'm attaching a diff explicitly. -- Added file: http://bugs.python.org/file29246/8bf88b31ebb7.diff ___ Python trac

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-02-26 Thread Jason R. Coombs
Changes by Jason R. Coombs : Added file: http://bugs.python.org/file29245/8bf88b31ebb7.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-02-26 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- hgrepos: +177 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-02-26 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- hgrepos: -176 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-02-26 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- hgrepos: +176 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue13772] listdir() doesn't work with non-trivial symlinks

2013-02-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've started work on restoring the directory detection in my bitbucket repo (https://bitbucket.org/jaraco/cpython-issue13772). I have added a regression test to capture the basic failure (where the link is not created in the current working directory) as well

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-07-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le jeudi 26 juillet 2012 à 19:12 +, Jason R. Coombs a écrit : > Without the directory feature, many uses of os.symlink are not > portable and will fail (with ugly results) on Windows. The target_is_directory argument is supposed to be "supported" (i.e. igno

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-07-26 Thread Jason R. Coombs
Jason R. Coombs added the comment: I apologize I missed this issue when it arose, so my comments come late. The reason for inferring the directory status of the targets was so that use of os.symlink(link, target) would behave much the same on Unix as on Windows for the most common use cases.

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be fixed now! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 839fa289e226 by Antoine Pitrou in branch '3.2': Issue #13772: In os.symlink() under Windows, do not try to guess the link http://hg.python.org/cpython/rev/839fa289e226 New changeset a7406565ef1c by Antoine Pitrou in branch 'default': Issue #13772:

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-23 Thread Brian Curtin
Brian Curtin added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Another issue with the detection scheme is that it's not atomic: there can be a race condition between the GetFileAttributesExW() and CreateSymbolicLinkW() calls. I propose applying the following patch to 3.2 and 3.3 (+ doc fix, not included in the patch).

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > As such, the documentation for symlink where it states the optional > > `target_is_directory=False` argument should be automatically detect > > whether the source is a file or directory does not hold true. > > I don't know if auto-detection is a good idea.

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-11 Thread Santoso Wijaya
Santoso Wijaya added the comment: I agree that it's probably not a good idea. Windows users should be aware of symlink limitation on the platform to begin with, IMHO. Besides, keeping the detection behaviour in light of this defect would be adding unnecessary complexity to the code. Currently

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I think this is because "Lib\\bar" is NOT being created as a directory > symlink, but rather as a regular one. Ha! I didn't even know about that option. Thanks for noticing. > As such, the documentation for symlink where it states the optional > `target_is_d

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-11 Thread Santoso Wijaya
Santoso Wijaya added the comment: Confirmed (on latest py33 build): >>> os.listdir('Lib\\bar')[:4] Traceback (most recent call last): File "", line 1, in NotADirectoryError: [Error 267] The directory name is invalid: 'Lib\\bar\\*.*' [61658 refs] ... after manually deleting the file-symlink

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-11 Thread Santoso Wijaya
Santoso Wijaya added the comment: I think this is because "Lib\\bar" is NOT being created as a directory symlink, but rather as a regular one. As such, the documentation for symlink where it states the optional `target_is_directory=False` argument should be automatically detect whether the s

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-11 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-11 Thread Antoine Pitrou
New submission from Antoine Pitrou : Note how _getfinalpathname works and calling listdir on the final path name also works: >>> os.symlink(".\\test", "Lib\\bar") >>> os.listdir("Lib\\bar")[:4] Traceback (most recent call last): File "", line 1, in NotADirectoryError: [Error 267] The directo