Skip to content

Replace deprecated datetime.utcfromtimestamp in get_version - #1611

Open
Hisernberg wants to merge 1 commit into
graphql-python:masterfrom
Hisernberg:fix/version-utcfromtimestamp-deprecation
Open

Hisernberg wants to merge 1 commit into
graphql-python:masterfrom
Hisernberg:fix/version-utcfromtimestamp-deprecation

Conversation

@Hisernberg

Copy link
Copy Markdown

datetime.utcfromtimestamp() is deprecated since Python 3.12 (DeprecationWarning: use datetime.fromtimestamp(ts, datetime.timezone.utc)). Same one-line migration in graphene/pyutils/version.py; the subsequent strftime("%Y%m%d%H%M%S") produces identical output for the UTC-aware result.

Python 3.12 deprecates utcfromtimestamp(). The strftime output on the
UTC-aware result is identical to the previous naive rendering.

This branch has not been deployed

No deployments
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