This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Antony.Lee
Recipients Antony.Lee
Date 2014-09-09.16:24:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Currently, pathlib contains the following check for the OS in the import section:

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

I would like to suggest to switch this on testing for the value of `` (as `PurePath.__new__` does), or possibly testing whether `sys.getwindowsversion` exists: the `nt` module is not publicly defined, so it wouldn't be unreasonable to have a file named `` on an Unix system (where this shouldn't cause any problems), in which case importing `pathlib` raises an AttributeError at the `getwindowsversion` line.
Date User Action Args
2014-09-09 16:24:51Antony.Leesetrecipients: + Antony.Lee
2014-09-09 16:24:51Antony.Leesetmessageid: <>
2014-09-09 16:24:51Antony.Leelinkissue22370 messages
2014-09-09 16:24:51Antony.Leecreate