summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-02-09 17:31:12 (GMT)
committerGitHub <noreply@github.com>2022-02-09 17:31:12 (GMT)
commit42f87d435ebe4f2834c8fd0b4ce38f0b1627f3ed (patch)
treeba6d119fa9182fa75f0b447f93e9bff076e52531 /Lib/test/test_syntax.py
parentd29bbc22b08551afce24e933f43bfcb6e980cb08 (diff)
downloadcpython-42f87d435ebe4f2834c8fd0b4ce38f0b1627f3ed.zip
cpython-42f87d435ebe4f2834c8fd0b4ce38f0b1627f3ed.tar.gz
cpython-42f87d435ebe4f2834c8fd0b4ce38f0b1627f3ed.tar.bz2
bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693)
Numeric fields of type float, notably mtime, can't be represented exactly in the ustar header, so the pax header is used. But it is helpful to set them to the nearest int (i.e. second rather than nanosecond precision mtimes) in the ustar header as well, for the benefit of unarchivers that don't understand the pax header. Add test for tarfile.TarInfo.create_pax_header to confirm correct behaviour. (cherry picked from commit bf2d44ffb06e8f49aacc6b1c140a6717df5cf897) Co-authored-by: Joshua Root <jmr@macports.org>
Diffstat (limited to 'Lib/test/test_syntax.py')
0 files changed, 0 insertions, 0 deletions