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 DeprecationWarning for datetime.utcfromtimestamp in Python 3.12 #1519
Merged
casperdcl
merged 1 commit into
tqdm:devel
from
jamate16:fix-deprecation-warning-python3.12
Feb 6, 2024
Merged
Fix DeprecationWarning for datetime.utcfromtimestamp in Python 3.12 #1519
casperdcl
merged 1 commit into
tqdm:devel
from
jamate16:fix-deprecation-warning-python3.12
Feb 6, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for resolving this DeprecationWarning, I also encountered it. What's needed to get this merged? |
jamate16
force-pushed
the
fix-deprecation-warning-python3.12
branch
from
October 23, 2023 19:37
c8de501
to
6945b21
Compare
m-aciek
approved these changes
Nov 11, 2023
bump |
Any progress on this? 👀 |
10 tasks
casperdcl
approved these changes
Feb 6, 2024
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.
Thanks! Sorry for the delay :)
casperdcl
added
to-merge ↰
Imminent
p2-bug-warning ⚠
Visual output bad
c1-quick 🕐
Complexity low
labels
Feb 6, 2024
Merged
scottstanie
added a commit
to scottstanie/dolphin
that referenced
this pull request
Feb 7, 2024
scottstanie
added a commit
to isce-framework/dolphin
that referenced
this pull request
Feb 7, 2024
* use `datetime.now(timezone.utc)` to avoid py312 deprecation warnings * fix typo and fix mac arm problem in `FileIO` * add macos-14, fail fast * try gdal 3.5 * try not specifying isce3, back to gdal 3.5 * remove rich, replace with tqdm * update changelog * add back req * fix `desc` * pass through `tqdm_args` to avoid clobbering bars closes #123 * temp workaround for python 3.12 problems tqdm/tqdm#1519 tqdm/tqdm#1250 * try disable in gha
casperdcl
pushed a commit
that referenced
this pull request
Feb 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the DeprecationWarning that is raised when using
datetime.datetime.utcfromtimestamp
in Python 3.12.Changes made
In the
tqdm/std.py
file:from datetime import datetime, timedelta
tofrom datetime import datetime, timedelta, timezone
.datetime.datetime.utcfromtimestamp(0)
withdatetime.datetime.fromtimestamp(0, datetime.timezone.utc)
.Linked Issue
This PR fixes issue [#1517]: "Use of datetime.datetime.utcfromtimestamp shows DeprecationWarning in Python 3.12".
How to test
The changes have been tested on Python 3.12 and the warning is no longer raised.
Fixes [#1517]