[issue46733] pathlib.Path methods can raise NotImplementedError

Eryk Sun report at bugs.python.org
Tue Feb 15 20:49:24 EST 2022


Eryk Sun <eryksun at gmail.com> added the comment:

> I'm planning to learn more heavily on posixpath + ntpath in 
> pathlib once bpo-44136 is done. I think that would be a good 
> time to introduce is_mount() support on Windows.

In the long run, it would be better to migrate the implementations in the other direction. Rewrite genericpath, ntpath, posixpath, and parts of shutil to use PurePath and Path objects. Using path objects instead of generic strings should improve the implementation of os.path and shutil, in addition to ensuring consistency with pathlib. However, that's a long-term goal that doesn't preclude using os.path and shutil as needed now, such as relying on os.path.ismount().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46733>
_______________________________________


More information about the Python-bugs-list mailing list