-
-
Notifications
You must be signed in to change notification settings - Fork 32k
pathlib.PurePath.with_stem('')
promotes file extension to stem
#114610
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
Labels
3.11
only security fixes
3.12
only security fixes
3.13
bugs and security fixes
topic-pathlib
type-bug
An unexpected behavior, bug, or error
Comments
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Jan 26, 2024
…e extensions Raise `ValueError` if `with_stem('')` is called on a path with a file extension. Paths may only have an empty stem if they also have an empty suffix.
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Jan 26, 2024
…handling of stems Raise `ValueError` if `with_suffix('.ext')` is called on a path without a stem. Paths may only have a non-empty suffix if they also have a non-empty stem. ABC-only bugfix; no effect on public classes.
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Jan 28, 2024
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Jan 30, 2024
barneygale
added a commit
that referenced
this issue
Jan 30, 2024
…ng of stems (#114613) Raise `ValueError` if `with_suffix('.ext')` is called on a path without a stem. Paths may only have a non-empty suffix if they also have a non-empty stem. ABC-only bugfix; no effect on public classes.
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Jan 30, 2024
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
…handling of stems (python#114613) Raise `ValueError` if `with_suffix('.ext')` is called on a path without a stem. Paths may only have a non-empty suffix if they also have a non-empty stem. ABC-only bugfix; no effect on public classes.
barneygale
added a commit
that referenced
this issue
Feb 24, 2024
…nsions (#114612) Raise `ValueError` if `with_stem('')` is called on a path with a file extension. Paths may only have an empty stem if they also have an empty suffix.
woodruffw
pushed a commit
to woodruffw-forks/cpython
that referenced
this issue
Mar 4, 2024
…e extensions (python#114612) Raise `ValueError` if `with_stem('')` is called on a path with a file extension. Paths may only have an empty stem if they also have an empty suffix.
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
…e extensions (python#114612) Raise `ValueError` if `with_stem('')` is called on a path with a file extension. Paths may only have an empty stem if they also have an empty suffix.
LukasWoodtli
pushed a commit
to LukasWoodtli/cpython
that referenced
this issue
Jan 22, 2025
…e extensions (python#114612) Raise `ValueError` if `with_stem('')` is called on a path with a file extension. Paths may only have an empty stem if they also have an empty suffix.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.11
only security fixes
3.12
only security fixes
3.13
bugs and security fixes
topic-pathlib
type-bug
An unexpected behavior, bug, or error
Bug report
The
with_stem()
call should raiseValueError
, as it's impossible for a filename to have an empty stem and a non-empty suffix.Linked PRs
pathlib.PurePath.with_stem('')
handling of file extensions #114612pathlib._abc.PurePathBase.with_suffix('.ext')
handling of stems #114613The text was updated successfully, but these errors were encountered: