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

Python: Fix deprecation warnings in 3.11+ #1017

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

rcrdnalor
Copy link
Contributor

Python 3.11 deprecates the API locale.getdefaultlocale() with a pending removal in Python 3.13 (I).
Python 3.12 moves this pending removal to Python 3.15 (II).
Deprecation warnings in Python 3.12:
datetime: datetime.datetime’s utcnow() and utcfromtimestamp() are deprecated and will be removed in a future version. Instead, use timezone-aware objects to represent datetimes in UTC: respectively, call now() and fromtimestamp() with the tz parameter set to datetime.UTC. (Contributed by Paul Ganssle in gh-103857.) See (II).

References:
(I) https://docs.python.org/3/whatsnew/3.11.html#deprecated
(II) https://docs.python.org/3/whatsnew/3.12.html#deprecated

Checklist

Fixes #819

Python 3.11 deprecates the API locale.getdefaultlocale() with a
pending removal in Python 3.13 (I).
Python 3.12 moves this pending removal to Python 3.15 (II).
Deprecation warnings in Python 3.12:
datetime: datetime.datetime’s utcnow() and utcfromtimestamp() are deprecated
and will be removed in a future version. Instead, use timezone-aware objects
to represent datetimes in UTC: respectively, call now() and fromtimestamp()
with the tz parameter set to datetime.UTC. (Contributed by Paul Ganssle in gh-103857.)
See (II).

References:
(I)  https://docs.python.org/3/whatsnew/3.11.html#deprecated
(II) https://docs.python.org/3/whatsnew/3.12.html#deprecated
@rcrdnalor rcrdnalor merged commit 33d6644 into MythTV:master Jan 15, 2025
8 of 10 checks passed
@rcrdnalor rcrdnalor deleted the issue#819 branch January 15, 2025 20:51
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.

Deprecation warnings in Python 3.11+
1 participant