[issue19792] pathlib does not support symlink in Windows XP
Mark Lawrence added the comment: I've read the entire issue and don't believe there's anything to be done here. Plus the originator says in msg204557 But anyway feel free to close this ticket. -- components: +Windows nosy: +BreamoreBoy, steve.dower, zach.ware ___ 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
[issue19792] pathlib does not support symlink in Windows XP
Steve Dower added the comment: Sounds good to me. -- resolution: - wont fix status: open - closed ___ 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
[issue19792] pathlib does not support symlink in Windows XP
Brian Curtin added the comment: If a platform does not actually support symlinks, and XP does not actually support symlinks for any usual definition of an operating system supporting a feature, then I'm not sure why pathlib is doing something wrong to make it work more reasonably in that case. os.symlink is a NotImplementedError on Windows versions prior to Vista because the Windows API doesn't support CreateSymbolicLink. It doesn't make sense to just let the code try to run for all versions on all platforms but be wrapped in a try/catch block for the NotImplementedError. -- ___ 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
[issue19792] pathlib does not support symlink in Windows XP
Antoine Pitrou added the comment: The 2.7-compatible version of pathlib explains why the code is structured this way: if sys.getwindowsversion()[:2] = (6, 0) and sys.version_info = (3, 2): from nt import _getfinalpathname else: supports_symlinks = False _getfinalpathname = None In the stdlib version, I removed the `sys.version_info = (3, 2)` and so it may look like as easy to rely on os.symlink raising NotImplementedError. That would make merging back more difficult, though, so I'd rather keep it like that. -- ___ 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
[issue19792] pathlib does not support symlink in Windows XP
Antoine Pitrou added the comment: 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've never heard of third-party driver for symlink link support before (granted, I'm not a Windows user). I'm willing to bet that this is a niche situation indeed, so I'm not very warm for tweaking pathlib around it. -- nosy: +brian.curtin, tim.golden ___ 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
[issue19792] pathlib does not support symlink in Windows XP
Brian Curtin added the comment: If users want to do that hack to get symlinks on XP, they should probably just manage doing so on their own. It's not something we'd take care of installing and running via our installer, so I don't think pathlib should be changed to work for it. -- ___ 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
[issue19792] pathlib does not support symlink in Windows XP
Vajrasky Kok added the comment: I agree we should not go extra mile to add feature for Windows XP, a 12 year old software and soon to be put down a couple months forward. But in this case, Antoine goes extra mile to prevent symbolic link support in Windows XP. And it's not just him that has this kind of reasoning. Django developers put this code which is similar with pathlib. django/contrib/staticfiles/management/commands/collectstatic.py if self.symlink: if sys.platform == 'win32': raise CommandError(Symlinking is not supported by this platform (%s). % sys.platform) if not self.local: raise CommandError(Can't symlink to a remote destination.) I opened this ticket because I am curious why developers go extra mile to prevent symbolic link support in certain platform. Why not just let os.symlink does the job and propagate the error from there? What is the virtue of not letting os.symlink decides who gets the symbolic link support? Surely in Windows XP (without 3rd party driver) os.symlink will throws exception and how that differs from throwing exception in pathlib library? But anyway feel free to close this ticket. I think I'll just copy Antoine's checking in solving this Django's bug: https://code.djangoproject.com/ticket/21482 -- ___ 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
[issue19792] pathlib does not support symlink in Windows XP
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