Skip to content
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

fix SOURCE_DATE_EPOCH message spam #781

Merged

Conversation

radoering
Copy link
Member

The SOURCE_DATA_EPOCH message is printed for each file. Example output of a simple project with almost no files:

$poetrye build
Building foo (0.1.0)
  - Building sdist
SOURCE_DATE_EPOCH environment variable is not set, using mtime=0
SOURCE_DATE_EPOCH environment variable is not set, using mtime=0
SOURCE_DATE_EPOCH environment variable is not set, using mtime=0
SOURCE_DATE_EPOCH environment variable is not set, using mtime=0
  - Built foo-0.1.0.tar.gz
  - Building wheel
SOURCE_DATE_EPOCH environment variable not set, setting zipinfo date to default=(2016, 1, 1, 0, 0, 0)
SOURCE_DATE_EPOCH environment variable not set, setting zipinfo date to default=(2016, 1, 1, 0, 0, 0)
SOURCE_DATE_EPOCH environment variable not set, setting zipinfo date to default=(2016, 1, 1, 0, 0, 0)
SOURCE_DATE_EPOCH environment variable not set, setting zipinfo date to default=(2016, 1, 1, 0, 0, 0)
  - Built foo-0.1.0-py3-none-any.whl

I converted the static methods into cached properties to make sure the messages are only printed once.

Further, I wonder if we should print the message per default at all or only in verbose mode. Therefore, I changed the log level from info to debug.

@radoering radoering requested a review from Secrus October 19, 2024 15:42
@Secrus Secrus merged commit eb68b29 into python-poetry:main Oct 19, 2024
21 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants