Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
In Python 3.13b1 (compared to Python 3.12 and earlier), the behavior ofpathlib.Path.with_suffix(None) changed from raising an incidentalTypeError to removing the suffix. This casues acertain 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:
- Restore the previous behavior if it was unintended, or
- Updatethe doc that
Noneis 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