◐ Shell
clean mode source ↗

GH-101362: Omit path anchor from `pathlib.PurePath()._parts` by barneygale · Pull Request #102476 · python/cpython

Improve performance of path construction by skipping the addition of the
path anchor (`drive + root`) to the internal `_parts` list. This change
allows us to simplify the implementations of `joinpath()`, `name`,
`parent`, and `parents` a little. The public `parts` tuple is unaffected.

@bedevere-bot mentioned this pull request

Mar 6, 2023

AlexWaygood

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

Apr 11, 2023
…ythonGH-102476)

Improve performance of path construction by skipping the addition of the path anchor (`drive + root`) to the internal `_parts` list. Rename this attribute to `_tail` for clarity.

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

Apr 18, 2023
…ythonGH-102476)

Improve performance of path construction by skipping the addition of the path anchor (`drive + root`) to the internal `_parts` list. Rename this attribute to `_tail` for clarity.

anjakefala added a commit to saulpw/visidata that referenced this pull request

Jun 27, 2023
`pathlib.Path._parts` has been removed in Python 3.12:
python/cpython#102476

Switch to pathlib.Path.parts which is a tuple.

Closes #1934

anjakefala added a commit to saulpw/visidata that referenced this pull request

Jun 27, 2023
`pathlib.Path._parts` has been removed in Python 3.12:
python/cpython#102476

Switch to pathlib.Path.parts which is a tuple.

Closes #1934

anjakefala added a commit to saulpw/visidata that referenced this pull request

Jul 16, 2023
`pathlib.Path._parts` has been removed in Python 3.12:
python/cpython#102476

Switch to pathlib.Path.parts which is a tuple.

Closes #1934

anjakefala added a commit to saulpw/visidata that referenced this pull request

Jul 17, 2023
`pathlib.Path._parts` has been removed in Python 3.12:
python/cpython#102476

Switch to pathlib.Path.parts which is a tuple.

Closes #1934

anjakefala added a commit to saulpw/visidata that referenced this pull request

Jul 17, 2023
`pathlib.Path._parts` has been removed in Python 3.12:
python/cpython#102476

Switch to pathlib.Path.parts which is a tuple.

Closes #1934