New submission from John Engelke :
The text:
'If you want to walk an arbitrary filesystem path upwards, it is recommended to first call Path.resolve() so as to resolve symlinks and eliminate “..” components.'
should be moved or changed to
'If you want to walk a concrete path upwards, it is recommended to first call Path.resolve() so as to resolve symlinks and eliminate “..” components.'
Rationale: Wording is confusing as the resolve() method doesn't exist for PurePath, PurePosixPath nor PureWindowsPath. It's unclear that the method applies only to concrete implementations of the Path subclass.
This should be resolved by either altering the above text or (preferably) moving it to the concrete Path section.
NOTE: PurePath (PurePosixPath, PureWindowsPath) operations are described in docs as "purely computational" components that "don’t actually access a filesystem." https://docs.python.org/3.7/library/pathlib.html#pure-paths
----------
assignee: docs@python
components: Documentation
messages: 381848
nosy: docs@python, john.engelke
priority: normal
severity: normal
status: open
title: Reference to subclass method resolve() in PurePath docs
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker
https://bugs.python.org/issue42465
_______________________________________