Closed as not planned
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