New submission from Vajrasky Kok:

In Lib/pathlib.py, we got this "problematic" code:

     if sys.getwindowsversion()[:2] >= (6, 0):
         from nt import _getfinalpathname
     else:
         supports_symlinks = False
         _getfinalpathname = None

This code means if the windows version is less than Windows NT 6, then we 
disable symlink support.

http://en.wikipedia.org/wiki/Windows_NT_6.0

Windows NT 6.0 includes Vista, Server 2008. In other word, Windows XP is less 
than Windows NT 6.0.

Actually, we can add symbolic link support for Windows XP.
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html#symboliclinksforwindowsxp

Attached the patch to add symbolic link support for Windows XP in pathlib.

Actually, if this ticket is made invalid, I don't care anyway. Windows XP will 
"die" on 8th April 2014.

http://windows.microsoft.com/en-us/windows/end-support-help

Also, how many people uses pathlib in Python 3.4 in Windows XP with third-party 
drivers enabling symbolic link support? Should be small.

I am interested in this problem because I have the same problem in Django.
https://code.djangoproject.com/ticket/21482
On the proposed pull request, I let the os.symlink takes care whether we have 
symbolic link support or not.

But I may "copy" Antoine's approach to Django's bug.

----------
components: Library (Lib)
files: add_symlink_support_for_windows_xp.patch
keywords: patch
messages: 204458
nosy: pitrou, vajrasky
priority: normal
severity: normal
status: open
title: pathlib does not support symlink in Windows XP
type: behavior
versions: Python 3.4
Added file: 
http://bugs.python.org/file32851/add_symlink_support_for_windows_xp.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19792>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to