-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
pathlib.Path.with_suffix(None) became allowed in Python 3.13b1 #119113
Labels
Comments
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
May 17, 2024
…one)` Restore behaviour from 3.12 when `path.with_suffix(None)` is called.
barneygale
added a commit
that referenced
this issue
May 19, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 19, 2024
…(None)` (pythonGH-119124) Restore behaviour from 3.12 when `path.with_suffix(None)` is called. (cherry picked from commit 3c28510) Co-authored-by: Barney Gale <[email protected]>
barneygale
added a commit
that referenced
this issue
May 19, 2024
…x(None)` (GH-119124) (#119183) Restore behaviour from 3.12 when `path.with_suffix(None)` is called. (cherry picked from commit 3c28510) Co-authored-by: Barney Gale <[email protected]>
Thanks for reporting! Should be fixed in 3.13 beta 2. |
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
…(None)` (python#119124) Restore behaviour from 3.12 when `path.with_suffix(None)` is called.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug report
Bug description:
In Python 3.13b1 (compared to Python 3.12 and earlier), the behavior of
pathlib.Path.with_suffix(None)
changed from raising an incidentalTypeError
to removing the suffix. This casues a certain test in pytest to fail. I am going to fix pytest to not rely on this in any case, but I think pathlib should either:None
is now accepted. Currently it says " If the suffix is an empty string, the original suffix is removed".CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Linux
Linked PRs
TypeError
frompathlib.PurePath.with_suffix(None)
#119124TypeError
frompathlib.PurePath.with_suffix(None)
(GH-119124) #119183The text was updated successfully, but these errors were encountered: