-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed as not planned
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesOS-windowstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
On macOS/Linux and Windows (before Python 3.12):
>>> import os
>>> os.path.exists.__name__
'exists'Since Python 3.12 on Windows:
>>> import os
>>> os.path.exists.__name__
'_path_exists'This was introduced in #101196 where optimized calls were made available on Windows.
Now, I will be honest that relying on the __name__ for os.path.exists is not great, but unfortunately I found this when running a test suite where we were relying on the __name__ being exists, which has been the case since at least Python 2.6 when I first took over maintenance of the project.
CPython versions tested on:
3.8, 3.9, 3.10, 3.11, 3.12
Operating systems tested on:
Linux, macOS, Windows
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesOS-windowstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error