Skip to content

bpo-34931: [doc] clarify behavior of os.path.splitext() on paths with multiple leading periods #30347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 3, 2022

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Jan 3, 2022

@mhsmith
Copy link
Member

mhsmith commented Jan 3, 2022

Suggest changing "basename" to "root" for consistency with the rest of this function's documentation, and to avoid confusion with the unrelated basename function.

@serhiy-storchaka
Copy link
Member

Concur with @mhsmith. It is not even correct in case of multi-component path (the basename of 'include/stdio.h' is 'stdio.h', but splitext() returns ('include/stdio', '.h')).

See also my comments on BPO.

@iritkatriel iritkatriel merged commit 51700bf into python:main Jan 3, 2022
@miss-islington
Copy link
Contributor

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@iritkatriel iritkatriel deleted the bpo-34931 branch January 3, 2022 20:10
@bedevere-bot
Copy link

GH-30368 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jan 3, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 3, 2022
… multiple leading periods (pythonGH-30347)

(cherry picked from commit 51700bf)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@bedevere-bot
Copy link

GH-30369 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jan 3, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 3, 2022
… multiple leading periods (pythonGH-30347)

(cherry picked from commit 51700bf)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
iritkatriel added a commit that referenced this pull request Jan 3, 2022
… multiple leading periods (GH-30347) (GH-30368)

(cherry picked from commit 51700bf)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
iritkatriel added a commit that referenced this pull request Jan 3, 2022
… multiple leading periods (GH-30347) (GH-30369)

(cherry picked from commit 51700bf)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.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
None yet
Development

Successfully merging this pull request may close these issues.

6 participants