Skip to content

gh-140971: Document pathlib.PurePath("") meaning and bool value - #157293

Merged
terryjreedy merged 7 commits into
python:mainfrom
terryjreedy:emptypathdoc
Sep 22, 2026
Merged

terryjreedy merged 7 commits into
python:mainfrom
terryjreedy:emptypathdoc

Conversation

@terryjreedy

@terryjreedy terryjreedy commented Sep 11, 2026

Copy link
Copy Markdown
Member

pathlib.PurePath() and pathlib.PurePath('') both mean the current working directory and both have boolean value True.

Patch implements suggestion in
#140993 (comment).

Co-authored-by: LiuQhahah liuqiang9596@gmail.com

pathlib.PurePath() and pathlib.PurePath('') both mean the
current working directory and both have boolean value True.

Patch implements suggestion in
python#140993 (comment).
---

Co-authored-by: LiuQhahah <liuqiang9596@gmail.com>
@terryjreedy

Copy link
Copy Markdown
Member Author

@StanFromIreland Please check that co-author note is correct. Add to commit message if too terse.

@read-the-docs-community

read-the-docs-community Bot commented Sep 11, 2026

Copy link
Copy Markdown

@terryjreedy terryjreedy added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Sep 11, 2026

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, this slipped my mind.

Comment thread Doc/library/pathlib.rst Outdated
Comment thread Doc/library/pathlib.rst Outdated
Comment thread Doc/library/pathlib.rst Outdated
Comment thread Doc/library/pathlib.rst Outdated
Comment thread Doc/library/pathlib.rst Outdated
@terryjreedy

Copy link
Copy Markdown
Member Author

@StanFromIreland Thank you for further improvement. Ready for re-review.

@terryjreedy
terryjreedy merged commit c36aa09 into python:main Sep 22, 2026
35 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Sep 22, 2026
@bedevere-app

bedevere-app Bot commented Sep 22, 2026

Copy link
Copy Markdown

GH-157943 is a backport of this pull request to the 3.15 branch.

@miss-islington-app

Copy link
Copy Markdown

Sorry, @terryjreedy, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker c36aa097768eb78cce371d975d173bd04060db56 3.13

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 22, 2026
@bedevere-app

bedevere-app Bot commented Sep 22, 2026

Copy link
Copy Markdown

GH-157944 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 22, 2026
@terryjreedy
terryjreedy deleted the emptypathdoc branch September 22, 2026 11:38
@terryjreedy terryjreedy removed the needs backport to 3.13 bugs and security fixes label Sep 22, 2026
@terryjreedy

Copy link
Copy Markdown
Member Author

Skip 3.13 backport.

terryjreedy added a commit that referenced this pull request Sep 22, 2026
GH-157293) (#157944)

gh-140971: Document pathlib.PurePath("") meaning and bool value (GH-157293)

pathlib.PurePath() and pathlib.PurePath('') both mean the
current working directory and both have boolean value True.

Patch implements suggestion in
#140993 (comment).
---------
(cherry picked from commit c36aa09)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: LiuQhahah <liuqiang9596@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants