Roundup Robot added the comment:
New changeset 0d84855861ff by Antoine Pitrou in branch '3.4':
Issue #20639: calling Path.with_suffix('') allows removing the suffix again.
http://hg.python.org/cpython/rev/0d84855861ff
--
nosy: +python-dev
___
Python
Antoine Pitrou added the comment:
Sorry for the delay! The patch is now applied. Thank you for contributing!
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Thank you! Unfortunately, it is too late for 3.4, but I will make sure the fix
is included in 3.4.1 (and 3.5).
--
nosy: +serhiy.storchaka
stage: - patch review
___
Python tracker rep...@bugs.python.org
July Tikhonov added the comment:
Proposed patch attached.
--
Added file: http://bugs.python.org/file34100/pathlib-with_suffix.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20639
___
New submission from July Tikhonov:
The changeset ef2b2ddd27c8 restricted the argument of Path.with_suffix() too
much, and caused some strange behavior.
Case 1: removing suffix completely is disallowed now.
The following code worked before the fix:
pathlib.PurePath('a', 'b.c').with_suffix('')