[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-22 Thread STINNER Victor
STINNER Victor added the comment: It seems like Windows buildbots are back to green (fixed), thanks ;-) -- nosy: +vstinner ___ Python tracker ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Steve Dower added the comment: At this point, I'm inclined to say let's wait and see what the 3.8.0b4 feedback looks like. Given that WSL has been fudging the boundaries here and hasn't suffered as a result, I don't expect much of a problem (and this change does actually make realpath()

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Eryk Sun
Eryk Sun added the comment: >> We can find code that does `relpath(realpath(target), >> realpath(start))` to compute the relative path to target >> for a symlink. >> ... > I don't know how common this scenario is, but I can certainly > say that it's never worked on Windows. You'd also end

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Eryk Sun
Eryk Sun added the comment: > Aware code can handle it [the exception] by getting a real path and > taking appropriate measures. That should be "by getting a final path". -- ___ Python tracker

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Steve Dower added the comment: New changeset a50d2f7e199f3be60c70c1586ee60ec60bf36642 by Steve Dower in branch '3.8': bpo-9949: Call normpath() in realpath() and avoid unnecessary prefixes (GH-15376) https://github.com/python/cpython/commit/a50d2f7e199f3be60c70c1586ee60ec60bf36642

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Steve Dower added the comment: > We can find code that does `relpath(realpath(target), realpath(start))` to > compute the relative path to target for a symlink. > In other words, the caller wants a solidified form of `start` that can be > used to compute the path to a target for a relative

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Eryk Sun
Eryk Sun added the comment: I'm tentatively reopening this issue for you to consider the following point, Steve. A real path is not always the same as a final path. We can find code that does `relpath(realpath(target), realpath(start))` to compute the relative path to target for a symlink.

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +15087 pull_request: https://github.com/python/cpython/pull/15376 ___ Python tracker ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Steve Dower added the comment: New changeset 06be2c7f357d12249445e95def1fb708a087b357 by Steve Dower in branch 'master': bpo-9949: Call normpath() in realpath() and avoid unnecessary prefixes (GH-15369) https://github.com/python/cpython/commit/06be2c7f357d12249445e95def1fb708a087b357

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Steve Dower added the comment: And sorry, the test_ntpath traceback was half listed in Pablo's message, but was missing the critical lines :) -- ___ Python tracker ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Steve Dower added the comment: Okay, the venv break is related (and it should have broken more frequently). The new realpath() implementation leaves the \\?\ prefix behind if the path doesn't exist, since that's the error you get when the path is longer than MAX_PATH and you're on a system

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +15080 pull_request: https://github.com/python/cpython/pull/15369 ___ Python tracker ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Steve Dower added the comment: I suspect the relevant failure here (which is not listed in Pablo's post) is this one: == ERROR: test_realpath_curdir (test.test_ntpath.TestNtpath)

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Steve Dower added the comment: On it -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Change by Steve Dower : -- assignee: -> steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: There are multiple failures on several buildbots after commit 75e064962ee0e31ec19a8081e9d9cc957baf6415 was merged: BUILDBOT FAILURE REPORT === Builder name: AMD64 Windows7 SP1 3.x Builder url:

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread miss-islington
miss-islington added the comment: New changeset c30c869e8dec5eefdee7977943ffa11a8e3c8d75 by Miss Islington (bot) in branch '3.8': bpo-9949: Enable symlink traversal for ntpath.realpath (GH-15287) https://github.com/python/cpython/commit/c30c869e8dec5eefdee7977943ffa11a8e3c8d75 --

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread Steve Dower
Steve Dower added the comment: New changeset 75e064962ee0e31ec19a8081e9d9cc957baf6415 by Steve Dower in branch 'master': bpo-9949: Enable symlink traversal for ntpath.realpath (GH-15287) https://github.com/python/cpython/commit/75e064962ee0e31ec19a8081e9d9cc957baf6415 --

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +15078 pull_request: https://github.com/python/cpython/pull/15367 ___ Python tracker ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-16 Thread Steve Dower
Steve Dower added the comment: Another minor change worth calling out - I added a note to the docs that when a symlink cycle is detected, realpath() could return any member of the cycle, but does not guarantee which one. For our test cases it's generally stable enough, but if you change the

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-14 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-14 Thread Steve Dower
Steve Dower added the comment: FYI, there's been some discussion of this on issue37834, as the issues quickly became conflated. There's also issue14094 which is a dup of this one, but with a different patch. --- To move the relevant discussion here, my current PR is basically the tests

[issue9949] os.path.realpath on Windows does not follow symbolic links

2019-08-14 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +15011 pull_request: https://github.com/python/cpython/pull/15287 ___ Python tracker ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2018-01-23 Thread Étienne Dupuis
Étienne Dupuis added the comment: Referenced here: https://stackoverflow.com/questions/4640/python-os-path-realpath-for-symlink-in-windows. -- nosy: +Étienne Dupuis ___ Python tracker

[issue9949] os.path.realpath on Windows does not follow symbolic links

2017-07-04 Thread Ethan Smith
Changes by Ethan Smith : -- nosy: +Ethan Smith ___ Python tracker ___ ___ Python-bugs-list

[issue9949] os.path.realpath on Windows does not follow symbolic links

2016-09-09 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2016-09-09 Thread Christian Åkerström
Christian Åkerström added the comment: Any update on this? Would be great with a fix for python symlinks on Windows. -- nosy: +Christian Åkerström ___ Python tracker

[issue9949] os.path.realpath on Windows does not follow symbolic links

2015-12-12 Thread SilentGhost
Changes by SilentGhost : -- components: +Windows keywords: +needs review -patch nosy: +paul.moore, steve.dower versions: +Python 3.6 -Python 3.5 ___ Python tracker

[issue9949] os.path.realpath on Windows does not follow symbolic links

2015-02-09 Thread Daniel Harding
Daniel Harding added the comment: @Zach - thanks for the review. Sorry that it has taken a few months to pick this issue back up. Anyway, here is an updated patch. It is pretty different than the previous patch, to the point that I would consider it a completely new patch. Anyway, here's

[issue9949] os.path.realpath on Windows does not follow symbolic links

2014-10-10 Thread Zachary Ware
Zachary Ware added the comment: Daniel: It's taken two years, but I've reviewed your patch :). There are a few things that need to be addressed, but the basic change looks pretty good. If you're still interested in seeing this fixed, I look forward to reviewing an updated patch; otherwise,

[issue9949] os.path.realpath on Windows does not follow symbolic links

2014-10-01 Thread Thomas Kluyver
Changes by Thomas Kluyver tak...@gmail.com: -- nosy: +takluyver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9949 ___ ___ Python-bugs-list

[issue9949] os.path.realpath on Windows does not follow symbolic links

2014-07-23 Thread Atsuo Ishimoto
Changes by Atsuo Ishimoto ishim...@gembook.org: Removed file: http://bugs.python.org/file26487/issue9949.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9949 ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2014-07-23 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: I have unlinked my patch since it doesn't looks correct now. Sorry for disturbing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9949 ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2014-07-17 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9949 ___ ___ Python-bugs-list

[issue9949] os.path.realpath on Windows does not follow symbolic links

2014-07-16 Thread Mark Lawrence
Mark Lawrence added the comment: @Zach can you do a patch review on this as it's holding up #13837 ? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9949 ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2013-11-05 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +zach.ware stage: needs patch - patch review versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9949 ___

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-07-22 Thread Atsuo Ishimoto
Atsuo Ishimoto ishim...@gembook.org added the comment: Yet another patch to support symlink on Windows. -- nosy: +ishimoto Added file: http://bugs.python.org/file26487/issue9949.patch ___ Python tracker rep...@bugs.python.org

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-06-03 Thread Daniel Harding
Daniel Harding dhard...@gmail.com added the comment: The previous version of this patch did not handle bytes arguments correctly and could fail in conjunction with a non-ASCII compatible encoding. Also, if the result was a UNC path, it was not being handled correctly (the returned value

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-04-15 Thread Daniel Harding
Daniel Harding dhard...@gmail.com added the comment: I have attached a series of patches with (hopefully) provide more robust fix for this issue, against the Python 3.3 branch. It handles both bytes and str objects, paths that do not actually exist on the filesystem, and removal of the

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-04-15 Thread Daniel Harding
Daniel Harding dhard...@gmail.com added the comment: Uploading a new series of patches - they are all the same as the first set, except for 0006-Make-realpath-follow-symbolic-links-on-Windows.patch. I realized that I could use os.readlink to handle broken symbolic links, so I changed the

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-10 Thread Dave Burton
Dave Burton ncdave4l...@gmail.com added the comment: It seems that the nt module is implemented in the posixmodule.c source file, and the Python 3 version contains the posix__getfinalpathname entry point, but the Python 2 version does not. I presume that PyWin32 could also be used to work

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-10 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: file, and the Python 3 version contains the posix__getfinalpathname entry point, but the Python 2 version does not. I presume that PyWin32 could also be used to work around this. Too bad it isn't automatically included with Python:

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-10 Thread Dave Burton
Dave Burton ncdave4l...@gmail.com added the comment: Excellent! The ntpath.py change is nearly identical in Python 2.7 to the change for Python 3.2. The only difference is that instead of: +elif isinstance(path, bytes): +path = os.getcwdb() It is: +elif

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-09 Thread Dave Burton
Dave Burton ncdave4l...@gmail.com added the comment: This is a patch for the os.path.realpath() bug under Windows, http://bugs.python.org/issue9949 os.path.realpath on Windows does not follow symbolic links ntpath.diff fixes the realpath() function to resolve symbolic links

[issue9949] os.path.realpath on Windows does not follow symbolic links

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The issue #12799 has been marked as a duplicate of this issue: From a look at the code, realpath() does not seem to resolve symlinks under Windows, even though we have the _getfinalpathname function to do that. Please indulge with

[issue9949] os.path.realpath on Windows does not follow symbolic links

2010-09-25 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: In Lib/ntpath.py: # realpath is a no-op on systems without islink support realpath = abspath However, Windows Vista and newer support symbolic links and other Python methods support them. (noticed this through source code