Berker Peksag <berker.pek...@gmail.com> added the comment:
Thanks for the report! Support for path-like objects was added in 3.6.2. I think you either have 3.6.0 or 3.6.1 installed on your system. Please upgrade it to the latest bugfix release. With 3.6.6, I got the following results: >>> import zipfile >>> from pathlib import Path >>> path = Path('spam.zip') >>> zf = zipfile.ZipFile(path, 'w') >>> zf.writestr('test.txt', 'Hello, Sailor!') >>> zf.close() $ ./python -m zipfile -l spam.zip File Name Modified Size test.txt 2018-07-24 06:10:52 14 ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34202> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com