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

fix python3.13 leap day parsing warning in time.from_http_header() #1452

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

rafsaf
Copy link
Contributor

@rafsaf rafsaf commented Oct 25, 2024

As of discussion in #1451

  • it is not possible to use datetime.strptime(value, "%a, %d %b %Y %H:%M:%S %Z") indeed, i created some tests (test_to_http_header_polish_locale, it will be skipped if you don't have pl locale, and i don't think it's crucial to install it in CI) to play with that and i can also see no way to do it without using some kind of locks but this would be much worse than now, and suggested fix indeed is fine

Hope that helps

Fixes #1451

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pleasse stick to the fix and unnecessary changes break backward compatibilities.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for delay, done, i was little too enthusiastic at first (hope you don't mind), let's keep the stuff as is

@rafsaf rafsaf changed the title Fix datetime leap day parsing warning in python3.13, remove utcnow Fix datetime leap day parsing warning in python3.13 Oct 30, 2024
minio/time.py Outdated Show resolved Hide resolved
minio/time.py Outdated Show resolved Hide resolved
@balamurugana balamurugana changed the title Fix datetime leap day parsing warning in python3.13 fix python3.13 leap day parsing warning in time.from_http_header() Nov 6, 2024
@harshavardhana harshavardhana merged commit 1e7b7ce into minio:master Nov 19, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datetime leap day parsing warning on python3.13
3 participants