◐ Shell
clean mode source ↗

bpo-43757: make pathlib use os.path.realpath() to resolve all symlinks in a path by barneygale · Pull Request #25264 · python/cpython

eryksun

eryksun

barneygale

@barneygale barneygale changed the title WIP: bpo-43757: make pathlib use os.path.realpath() to resolve all symlinks in a path bpo-43757: make pathlib use os.path.realpath() to resolve all symlinks in a path

Apr 8, 2021

zooba

eryksun

…s in a path

Removes a pathlib-specific implementation of `realpath()` that's mostly
copied from `ntpath` and `posixpath`.
… when a new `strict=True` keyword-only argument is passed.

kfollstad added a commit to kfollstad/cpython that referenced this pull request

May 6, 2021
Bug was fixed by pythonGH-25264 which, for other reasons, moved to a system
independent resolve. Adds tests for verifying resolve() on cases other
than for symlinks. New cases include relative and absolute paths with
and without dotted (./..) paths. Also renames test helper function to
avoid name overloading and adds new REL_PATH test constant.

This was referenced

May 15, 2021

This was referenced

Aug 10, 2024

ambv pushed a commit to ambv/cpython that referenced this pull request

Jun 2, 2025
… a path (pythonGH-25264)

Also adds a new "strict" argument to realpath() to avoid changing the default behaviour of pathlib while sharing the implementation.

ambv pushed a commit to ambv/cpython that referenced this pull request

Jun 2, 2025
… a path (pythonGH-25264)

Also adds a new "strict" argument to realpath() to avoid changing the default behaviour of pathlib while sharing the implementation.

ambv pushed a commit to ambv/cpython that referenced this pull request

Jun 2, 2025
… a path (pythonGH-25264)

Also adds a new "strict" argument to realpath() to avoid changing the default behaviour of pathlib while sharing the implementation.

(cherry-picked from commit baecfbd)

ambv pushed a commit to ambv/cpython that referenced this pull request

Jun 2, 2025
…nks in a path (pythonGH-25264)

Also adds a new "strict" argument to realpath() to avoid changing the default behaviour of pathlib while sharing the implementation.

(cherry-picked from commit baecfbd)

ambv added a commit that referenced this pull request

Jun 2, 2025
…nks in a path (GH-25264) (GH-135035)

Also adds a new "strict" argument to realpath() to avoid changing the default behaviour of pathlib while sharing the implementation.

(cherry-picked from commit baecfbd)

Co-authored-by: Barney Gale <barney.gale@gmail.com>