[issue29847] Path takes and ignores **kwargs

2020-06-10 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- versions: +Python 3.10, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue29847] Path takes and ignores **kwargs

2020-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: 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 l

[issue29847] Path takes and ignores **kwargs

2020-04-21 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- nosy: +uriyyo nosy_count: 6.0 -> 7.0 pull_requests: +18959 pull_request: https://github.com/python/cpython/pull/19632 ___ Python tracker

[issue29847] Path takes and ignores **kwargs

2019-05-17 Thread Jason Saporta
Change by Jason Saporta : -- keywords: +patch pull_requests: +13309 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue29847] Path takes and ignores **kwargs

2019-05-17 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue29847] Path takes and ignores **kwargs

2017-03-22 Thread Brett Cannon
Brett Cannon added the comment: Then I vote for Serhiy's idea of simply raising an exception in the concrete subclasses when a keyword argument is given. -- ___ Python tracker _

[issue29847] Path takes and ignores **kwargs

2017-03-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The support of **kwargs in Path.__new__ is needed if you want to implement a > subclass of Path with __init__ accepting keyword arguments I don't remember exactly, but I think this was the intention indeed. There was originally an openat-using subclass, and

[issue29847] Path takes and ignores **kwargs

2017-03-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know whether it was the intension of Antoine or just an oversight. I don't know whether it is used in the wild. But we can at least raise a TypeError for concrete classes PosixPath and WindowsPath if ignoring keyword arguments is a problem. Many exte

[issue29847] Path takes and ignores **kwargs

2017-03-21 Thread Brett Cannon
Brett Cannon added the comment: Shoot, that's too bad. I guess we should document it then so people are aware that keyword arguments are ignored, else we will break subclasses. There's also an unfortunate difference between PurePath and Path as PurePath doesn't have this quirk. -- __

[issue29847] Path takes and ignores **kwargs

2017-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The support of **kwargs in Path.__new__ is needed if you want to implement a subclass of Path with __init__ accepting keyword arguments (and since Path constructor takes variable number of positional arguments, new arguments should be keyword-only). >>> imp

[issue29847] Path takes and ignores **kwargs

2017-03-20 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks, I'll add a PR. This doesn't need to be documented, right? -- ___ Python tracker ___ ___ Pyth

[issue29847] Path takes and ignores **kwargs

2017-03-20 Thread Brett Cannon
Brett Cannon added the comment: Yep, kwargs should be dropped since it isn't used or documented: https://docs.python.org/3/library/pathlib.html#pathlib.PurePath (probably just a hold-over from when it did in some earlier version of the code). -- components: +Library (Lib) nosy: +brett.

[issue29847] Path takes and ignores **kwargs

2017-03-19 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue29847] Path takes and ignores **kwargs

2017-03-18 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: pathlib.Path.__new__ takes **kwargs, but doesn't do anything with them (https://github.com/python/cpython/blob/master/Lib/pathlib.py#L979). This doesn't appear to be documented. This feature should presumably be either documented or removed (probably remove