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 4-launchpad-kalvdans-no-ip-org, Jim Fasarakis-Hilliard, barneygale, brett.cannon, docs@python, eryksun, methane, pitrou, serhiy.storchaka
Date 2021-05-15.22:19:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621117178.47.0.325972540017.issue29688@roundup.psfhosted.org>
In-reply-to
Content
New PR up here: https://github.com/python/cpython/pull/26153

The correspondence between `pathlib` and `os.path` is as follows:


- `Path.resolve()` is roughly `os.path.realpath()`
- `Path.absolute()` is roughly `os.path.abspath()`

Differences:

- `resolve()` always raises RuntimeError on symlink loops, whereas `realpath()` either raises OSError or nothing depending on *strict*.
- `absolute()` doesn't normalize the path, whereas `abspath()` does. Normalizing without resolving symlinks can change the meaning of the path, so pathlib does the better thing here.
History
Date User Action Args
2021-05-15 22:19:38barneygalesetrecipients: + barneygale, brett.cannon, pitrou, methane, docs@python, serhiy.storchaka, eryksun, Jim Fasarakis-Hilliard, 4-launchpad-kalvdans-no-ip-org
2021-05-15 22:19:38barneygalesetmessageid: <1621117178.47.0.325972540017.issue29688@roundup.psfhosted.org>
2021-05-15 22:19:38barneygalelinkissue29688 messages
2021-05-15 22:19:38barneygalecreate