[issue44979] pathlib: support relative path construction

2021-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I am rejecting this for the reasons explained in the Github PR: """This seems like an extremely specific API. Perhaps you want to propose it for inclusion in pytest, but I don't think it belongs in pathlib. (also, it's not difficult to spell out

[issue44979] pathlib: support relative path construction

2021-08-22 Thread Eric V. Smith
Eric V. Smith added the comment: To be clear, by "file", you mean python source file, or I guess .pyc file if only that exists. I can't say I've given it much thought. What about built-in modules? Or frozen modules? I'm not sure this is a great idea. In general, we've frowned on code that

[issue44979] pathlib: support relative path construction

2021-08-22 Thread Kirill Pinchuk
Change by Kirill Pinchuk : -- keywords: +patch pull_requests: +26344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27890 ___ Python tracker ___

[issue44979] pathlib: support relative path construction

2021-08-22 Thread Kirill Pinchuk
New submission from Kirill Pinchuk : Hi. I've been using this snippet for years and believe that it would be a nice addition to pathlib's functionality. Basically, it allows constructing path relative to the current file (instead of cwd). Comes quite handy when you're working with deeply