Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntpath module must not be available on POSIX platforms #83500

Closed
opensource-assist mannequin opened this issue Jan 13, 2020 · 3 comments
Closed

ntpath module must not be available on POSIX platforms #83500

opensource-assist mannequin opened this issue Jan 13, 2020 · 3 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@opensource-assist
Copy link
Mannequin

opensource-assist mannequin commented Jan 13, 2020

BPO 39319
Nosy @eryksun, @opensource-assist

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2020-01-13.12:18:10.006>
created_at = <Date 2020-01-13.10:58:01.750>
labels = ['invalid', 'type-bug', 'library', '3.9']
title = 'ntpath module must not be available on POSIX platforms'
updated_at = <Date 2020-01-13.20:59:14.368>
user = 'https://github.com/opensource-assist'

bugs.python.org fields:

activity = <Date 2020-01-13.20:59:14.368>
actor = 'opensource-assist'
assignee = 'none'
closed = True
closed_date = <Date 2020-01-13.12:18:10.006>
closer = 'eryksun'
components = ['Library (Lib)']
creation = <Date 2020-01-13.10:58:01.750>
creator = 'opensource-assist'
dependencies = []
files = []
hgrepos = []
issue_num = 39319
keywords = []
message_count = 3.0
messages = ['359897', '359900', '359934']
nosy_count = 2.0
nosy_names = ['eryksun', 'opensource-assist']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue39319'
versions = ['Python 3.9']

@opensource-assist
Copy link
Mannequin Author

opensource-assist mannequin commented Jan 13, 2020

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.

@opensource-assist opensource-assist mannequin added type-bug An unexpected behavior, bug, or error interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.9 only security fixes stdlib Python modules in the Lib dir and removed interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Jan 13, 2020
@eryksun
Copy link
Contributor

eryksun commented Jan 13, 2020

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".

@eryksun eryksun closed this as completed Jan 13, 2020
@eryksun eryksun added invalid type-bug An unexpected behavior, bug, or error labels Jan 13, 2020
@eryksun eryksun closed this as completed Jan 13, 2020
@eryksun eryksun added invalid type-bug An unexpected behavior, bug, or error labels Jan 13, 2020
@opensource-assist
Copy link
Mannequin Author

opensource-assist mannequin commented Jan 13, 2020

@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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant