Uh oh!
There was an error while loading. Please reload this page.
Update os.path.isdir on Windows Python3.12+ - #10751
Conversation
afafed0 to
9de14ddCompare
This comment has been minimized.
This comment has been minimized.
ebc8fb4 to
06d0e14Compare06d0e14 to
b82ffc2CompareAccording to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
JelleZijlstra
commented
Sep 23, 2023
This feels unfortunate and maybe should be fixed in CPython instead. Or perhaps the parameter should be made positional-only. |
Yeah, I think one of the two would be the better fix. Kinda the point of Here I think the best solution might be to raise this with CPython. Since the ntpath implementation is new, it seems unlikely to me that they intended to give it a different parameter name to the posix implementation. |
aminalaee
commented
Sep 23, 2023
Yeah I think if this was not intentional in CPython, there's still time to change it. I will open an issue now. |
JelleZijlstra
commented
Sep 29, 2023
The fix was merged into CPython and is planned to go into 3.12 eventually, so I think we shouldn't change anything here. Thanks for uncovering this issue! |
Following #10748 (comment)
cc @AlexWaygood
Ref: https://github.com/python/cpython/blame/b28ffaa193efc66f46ab90d383279174a11a11d7/Modules/clinic/posixmodule.c.h#L1989
Seems like
os.path.isdirhas different signatureos.path.isdir(path)compared toos.path.isdir(s)in netpath.py, not sure if this was intentional in CPython.