This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author remi.lapeyre
Recipients JelleZijlstra, Jim Fasarakis-Hilliard, brett.cannon, jstasiak, pitrou, remi.lapeyre, serhiy.storchaka, uriyyo
Date 2020-05-21.11:56:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590062181.92.0.250179600427.issue29847@roundup.psfhosted.org>
In-reply-to
Content
PurePath subclasses cannot support kwargs as __new__() does not accept **kwargs:


>>> from pathlib import PurePath
>>> class MyPurePath(PurePath):
...     def __init__(self, *args, **kargs): pass
... 
>>> MyPurePath('foo', spam=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __new__() got an unexpected keyword argument 'spam'


The behaviour for this should probably be made the same for both Path and PurePath.
History
Date User Action Args
2020-05-21 11:56:21remi.lapeyresetrecipients: + remi.lapeyre, brett.cannon, pitrou, serhiy.storchaka, jstasiak, JelleZijlstra, Jim Fasarakis-Hilliard, uriyyo
2020-05-21 11:56:21remi.lapeyresetmessageid: <1590062181.92.0.250179600427.issue29847@roundup.psfhosted.org>
2020-05-21 11:56:21remi.lapeyrelinkissue29847 messages
2020-05-21 11:56:21remi.lapeyrecreate