[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2020-01-16 Thread Maor Kleinberger
Change by Maor Kleinberger : -- pull_requests: +17426 pull_request: https://github.com/python/cpython/pull/12361 ___ Python tracker ___

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2019-08-28 Thread Ned Deily
Ned Deily added the comment: The change was pushed for release in 3.8.0b4. I don't think we should backport it to 3.7 at this stage in its lifecycle as the old behavior has been around for a long time. Thanks, everyone! -- resolution: -> fixed stage: patch review -> resolved

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2019-08-28 Thread Ned Deily
Ned Deily added the comment: New changeset 4adcaf81513e57a2a4e278073a89efb1375af8df by Ned Deily (Miss Islington (bot)) in branch '3.8': bpo-34775: Return NotImplemented in PurePath division. (GH-9509) (GH-15172)

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2019-08-07 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +14904 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/15172 ___ Python tracker

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2019-08-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4c69be22df3852f17873a74d015528d9a8ae92d6 by Serhiy Storchaka (aiudirog) in branch 'master': bpo-34775: Return NotImplemented in PurePath division. (GH-9509) https://github.com/python/cpython/commit/4c69be22df3852f17873a74d015528d9a8ae92d6

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2018-09-23 Thread Roger Aiudi
Roger Aiudi added the comment: Using your above example, my use case is returning an instance of Spam instead of PurePath from the division operation. The Spam class would have extra properties and methods for dealing with a substructure of our file system that can exist in different

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2018-09-23 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2018-09-23 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report and for the PR. Could you give us a little bit more information about your use case? Couldn't you make the class you want to use implement the __fspath__ protocol? import pathlib as p class Spam: def __fspath__(self):

[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2018-09-23 Thread Roger Aiudi
New submission from Roger Aiudi : PurePath.__truediv__ and __rtruediv__ raise a TypeError when passed something which is not an instance of string or PurePath. This prevents creating any sort of compatible class that doesn't inherit from the previously mentioned types. -- components: