-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Poetry-Built Wheel Timestamps Pinned to 1980 and 2016 #3531
Comments
I think it's this line in poetry-core: def _add_file(self, wheel, full_path, rel_path):
full_path, rel_path = str(full_path), str(rel_path)
if os.sep != "/":
# We always want to have /-separated paths in the zip file and in
# RECORD
rel_path = rel_path.replace(os.sep, "/")
zinfo = zipfile.ZipInfo(rel_path) When unspecified, As for the 2016 dates, in the same file I found this: # The default is a fixed timestamp rather than the current time, so
# that building a wheel twice on the same computer can automatically
# give you the exact same result.
date_time = (2016, 1, 1, 0, 0, 0)
zi = zipfile.ZipInfo(rel_path, date_time) It seems like this is intentional to create reproducible builds? |
oh, two places of weirdness. Thanks for finding the exact cause and effect! If we want to use source file file_date = datetime.datetime.fromtimestamp(os.stat(full_path).st_mtime).timetuple()[:-3]
zinfo = zipfile.ZipInfo(rel_path, file_date) |
and on second thought, instead of using fixed 1980 date for the ...also now I see the building files are over in |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
Hi Poets,
I don't think I'm going crazy this time, but poetry is building packages with dates pinned to 1980 and 2016, which is eerily similar to the zip format original date limits.
Reproducible on macos and Linux:
And it extracts to the old dates as well:
The tar file has the proper dates:
I haven't seen where poetry is actually building the packages (doesn't look like
zipfile.ZipFile
is used anywhere for creating packages), but something in the source-to-dist pipeline is borked.Also, even looking through my pip cache, I can see projects built with poetry because they have weird timestamps:
The text was updated successfully, but these errors were encountered: