Skip to content

bpo-34898: Add mtime argument to gzip.compress#9704

Merged
serhiy-storchaka merged 5 commits intopython:masterfrom
guoci:gzip_mtime
Nov 7, 2018
Merged

bpo-34898: Add mtime argument to gzip.compress#9704
serhiy-storchaka merged 5 commits intopython:masterfrom
guoci:gzip_mtime

Conversation

@guoci
Copy link
Copy Markdown
Contributor

@guoci guoci commented Oct 4, 2018

Add mtime argument to gzip.compress for reproducible output.

https://bugs.python.org/issue34898

Comment thread Doc/library/gzip.rst Outdated
Comment thread Lib/test/test_gzip.py Outdated
Comment thread Doc/library/gzip.rst Outdated
Comment thread Doc/library/gzip.rst Outdated
@guoci guoci force-pushed the gzip_mtime branch 3 times, most recently from 0909cbd to 32ced50 Compare October 20, 2018 18:33
@guoci guoci force-pushed the gzip_mtime branch 3 times, most recently from 75185f2 to c86bfd1 Compare October 26, 2018 16:04
@guoci guoci force-pushed the gzip_mtime branch 5 times, most recently from 1dddb9b to 35fd98c Compare November 5, 2018 15:39
Comment thread Doc/library/gzip.rst Outdated
Comment thread Doc/library/gzip.rst Outdated
Comment thread Misc/NEWS.d/next/Library/2018-10-04-17-23-43.bpo-34898.Wo2PoJ.rst Outdated
Comment thread Lib/test/test_gzip.py Outdated
Comment thread Lib/test/test_gzip.py Outdated
@serhiy-storchaka
Copy link
Copy Markdown
Member

Would be nice to explain why this parameter is needed.

@guoci
Copy link
Copy Markdown
Contributor Author

guoci commented Nov 5, 2018

Would be nice to explain why this parameter is needed.

Without setting mtime, time.time() will be used as the timestamp which will end up in the compressed data and each invocation of the compress function will vary over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants