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.

classification
Title: ntpath module must not be available on POSIX platforms
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eryksun, opensource-assist
Priority: normal Keywords:

Created on 2020-01-13 10:58 by opensource-assist, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg359897 - (view) Author: Aurora (opensource-assist) * Date: 2020-01-13 10:58
According to https://docs.python.org/dev/library/undoc.html the 'ntpath' module is an "Implementation of os.path on Win32 and Win64 platforms".
Just like all other Windows-specific modules(like winreg),'ntpath' must not be available for use on a POSIX system like Linux.
I guess that 'posixpath' is also available on Windows, that if it is, it must not be available too.
msg359900 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2020-01-13 12:18
No, ntpath and posixpath are cross-platform. They are tested on all platforms, and the os.path documentation lists them and notes that "you can also import and use the individual modules if you want to manipulate a path that is always in one of the different formats".
msg359934 - (view) Author: Aurora (opensource-assist) * Date: 2020-01-13 20:59
@eryksun So modify the documentation to note that they're operable on both platforms.
I've seen that ntpath worked on my Linux system, but the documentation was misleading.
History
Date User Action Args
2022-04-11 14:59:25adminsetgithub: 83500
2020-01-13 20:59:14opensource-assistsetmessages: + msg359934
2020-01-13 12:18:10eryksunsetstatus: open -> closed

type: behavior

nosy: + eryksun
messages: + msg359900
resolution: not a bug
stage: resolved
2020-01-13 10:58:15opensource-assistsettype: behavior -> (no value)
components: + Library (Lib), - Interpreter Core
2020-01-13 10:58:01opensource-assistcreate