[issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr

2021-09-07 Thread Ethan Furman
Change by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr

2020-05-22 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +serhiy.storchaka, twouters versions: +Python 3.10 -Python 3.9 ___ Python tracker ___ ___ Python

[issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr

2020-05-08 Thread Domenico Ragusa
Change by Domenico Ragusa : -- pull_requests: +19314 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20002 ___ Python tracker ___ _

[issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr

2020-05-06 Thread Domenico Ragusa
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 Ragusa : > > ZipFile seem

[issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr

2020-05-04 Thread Domenico Ragusa
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=PurePath('/some/thing.jpeg')) # this >>> works as well >>> a.wri