[issue28231] zipfile does not support pathlib

Jeremy Freeman report at bugs.python.org
Tue Jan 10 22:45:25 EST 2017


Jeremy Freeman added the comment:

I have reviewed the code and docs for the public API that should take a pathlib.Path object:

- zipfile.is_zipfile(filename)
  - filename
- zipfile.ZipFile(file)
  - file
- ZipFile.extract(member, path=None)
  - path
- ZipFile.extractall(path=None)
  - path
- ZipFile.write(filename)
  - filename
- zipfile.PyZipFile(file)
  - file
- PyZipFile.writepy(pathname)
  - pathname
- ZipInfo.from_file(filename, arcname=None)
  - filename

Does this appear complete?

Working on tests that probe each of these API points with pathlib.Path objects.

I am not sure what "Shouldn't the ZipFile.filename attribute be converted to str?" means, can you elaborate?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28231>
_______________________________________


More information about the Python-bugs-list mailing list