diff options
author | Bénédikt Tran <10796600+picnixz@users.noreply.github.com> | 2024-12-29 18:30:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-29 18:30:53 (GMT) |
commit | 7e819ce0f32068de7914cd1ba3b4b95e91ea9873 (patch) | |
tree | ee71bf301533e0f2396839052d79ac288d0a55ac /Doc/library | |
parent | ffece5590e95e89d3b5b6847e3beb443ff65c3db (diff) | |
download | cpython-7e819ce0f32068de7914cd1ba3b4b95e91ea9873.zip cpython-7e819ce0f32068de7914cd1ba3b4b95e91ea9873.tar.gz cpython-7e819ce0f32068de7914cd1ba3b4b95e91ea9873.tar.bz2 |
gh-123424: add `ZipInfo._for_archive` to set suitable default properties (#123429)
---------
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/zipfile.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 5583c6b..afe1cd5 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -84,6 +84,17 @@ The module defines the following items: formerly protected :attr:`!_compresslevel`. The older protected name continues to work as a property for backwards compatibility. + + .. method:: _for_archive(archive) + + Resolve the date_time, compression attributes, and external attributes + to suitable defaults as used by :meth:`ZipFile.writestr`. + + Returns self for chaining. + + .. versionadded:: 3.14 + + .. function:: is_zipfile(filename) Returns ``True`` if *filename* is a valid ZIP file based on its magic number, |