-
Notifications
You must be signed in to change notification settings - Fork 27
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
[fix] Zipping files older than 1980 #1914
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1914 +/- ##
=======================================
Coverage 90.86% 90.86%
=======================================
Files 130 130
Lines 20157 20157
=======================================
Hits 18315 18315
Misses 1842 1842
|
@@ -58,7 +58,8 @@ | |||
|
|||
MAX_RETRIES = 5 | |||
REQUIREMENTS_FILE_NAME = "requirements.txt" | |||
REQUIREMENTS_REG = re.compile(r"(\[\/?requirements\]){1}$", flags=re.M) # Matches [requirements] and [/requirements] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes here are linting fmt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Håkon V. Treider <[email protected]>
Description
From the docs: https://docs.python.org/3/library/zipfile.html#zipfile.ZipFile
The strict_timestamps argument, when set to False, allows to zip files older than 1980-01-01 at the cost of setting the timestamp to 1980-01-01. Similar behavior occurs with files newer than 2107-12-31, the timestamp is also set to the limit.
We have been seeing some of these errors when creating functions lately. Not sure why they sporadically show up:
Checklist:
If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.