Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from Nov 7, 2018

Conversation

guoci
Copy link
Contributor

@guoci guoci commented Oct 4, 2018

Add mtime argument to gzip.compress for reproducible output.

https://bugs.python.org/issue34898

Doc/library/gzip.rst Outdated Show resolved Hide resolved
Lib/test/test_gzip.py Outdated Show resolved Hide resolved
Doc/library/gzip.rst Outdated Show resolved Hide resolved
Doc/library/gzip.rst Outdated Show resolved Hide resolved
@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
Doc/library/gzip.rst Outdated Show resolved Hide resolved
Doc/library/gzip.rst Outdated Show resolved Hide resolved
Lib/test/test_gzip.py Outdated Show resolved Hide resolved
Lib/test/test_gzip.py Outdated Show resolved Hide resolved
@serhiy-storchaka
Copy link
Member

Would be nice to explain why this parameter is needed.

@guoci
Copy link
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.

None yet

7 participants