Domenico Ragusa added the comment:
I've solved the conflicts with GH-19611 (bpo-23082: Better error message for
PurePath.relative_to() from pathlib) that was merged in the mean time and
improved the documentation.
Everything appears to be in order, can you take a look
Change by Domenico Ragusa :
--
pull_requests: +19314
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20002
___
Python tracker
<https://bugs.python.org/issu
Domenico Ragusa added the comment:
Here's a small patch to do this. Everything seems to work fine.
I don't know if where I placed the test (in OtherTests) is the most appropriate.
On Tue, May 5, 2020 at 4:12 AM Domenico Ragusa wrote:
>
>
> New submission from Domenico R
New submission from Domenico Ragusa :
ZipFile seems to support Pathlike objects pretty well, except in
ZipFile.writestr.
For example:
>>> a = ZipFile(Path('test.zip'), 'w') # this works ok
>>> a.write(Path('./foo.jpeg'), arcname=PurePat
Change by Domenico Ragusa :
--
pull_requests: +19133
pull_request: https://github.com/python/cpython/pull/19813
___
Python tracker
<https://bugs.python.org/issue40
Domenico Ragusa added the comment:
I may have forgotten to use the proper format for the title of each
commit, should I delete the pull request and make a new one or can it
be fixed when (or if) it's pulled?
On Thu, Apr 30, 2020 at 2:03 AM Roundup Robot wrote:
>
>
> Change by
Domenico Ragusa added the comment:
Yeah, you're right, there's no access to the filesystem and the result
is generated assuming the paths are already resolved.
`strict` seems to be an appropriate name for the option, thanks.
I've looked into the test suite, it helped a lot
Change by Domenico Ragusa :
Removed file: https://bugs.python.org/file49081/pathlib.diff
___
Python tracker
<https://bugs.python.org/issue40358>
___
___
Python-bug
Domenico Ragusa added the comment:
Thanks for your answer. Yeah, I'm new, I'm reading the guide, sorry for any
faux pas :)
Ok, an option would be great as well, a simple True/False switch? Any
suggestion for the name?
I'll get back with a proper patch this time.
On Wed, Apr 2
New submission from Domenico Ragusa :
Can we improve pathlib.relative_to(other) so that it handles the case of a path
not being a direct child of other, like os.path.relpath?
For example:
Path('/some/thing').relative_to('/foo') -> Path('../some/thing')
10 matches
Mail list logo