This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barneygale
Recipients barneygale
Date 2022-02-12.19:35:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644694513.05.0.985214969865.issue46733@roundup.psfhosted.org>
In-reply-to
Content
The docs for NotImplementedError say:

> In user defined base classes, abstract methods should raise this exception when they require derived classes to override the method, or while the class is being developed to indicate that the real implementation still needs to be added.

pathlib's use of NotImplementedError appears to be more broad. It can be raised in the following circumstances:

1. When attempting to construct a WindowsPath from a non-Windows system, and vice-versa. This is the only case where NotImplementedError is mentioned in the pathlib docs (in a repl example)
2. In glob() and rglob() when an absolute path is supplied as a pattern
3. In owner() if the pwd module isn't available
4. In group() if the grp module isn't available
5. In readlink() if os.readlink() isn't available
6. In symlink_to() if os.symlink() isn't available
7. In hardlink_to() if os.hardlink() isn't available
8. In WindowsPath.is_mount(), unconditionally

I suspect there are better choices for exception types in all these cases.
History
Date User Action Args
2022-02-12 19:35:13barneygalesetrecipients: + barneygale
2022-02-12 19:35:13barneygalesetmessageid: <1644694513.05.0.985214969865.issue46733@roundup.psfhosted.org>
2022-02-12 19:35:13barneygalelinkissue46733 messages
2022-02-12 19:35:12barneygalecreate