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

Replace deprecated method datetime.utcnow #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Manitary
Copy link
Contributor

datetime.utcnow is deprecated with Python 3.12, and eventually will be removed (see here).

Ideally everything should be made timezone-aware, but for now this commit simply replaces calls to datetime.utcnow() by calling datetime.now(UTC) and stripping the timezone information to make it naive, to keep the current behaviour.

(also remove the local flag from Episode.is_live, it is never used and it never could be since properties don't take arguments)

Instead, call `datetime.now` with UTC tzinfo and remove the tzinfo

Remove the `local` flag from `Episode.is_live` since it is a property
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.

1 participant