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

Use datetime.now(utc) in MetricDatum #3538

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

s-t-e-v-e-n-k
Copy link
Contributor

datetime.utcnow() is deprecated as of Python 3.12, and its use will raise a DeprecationWarning. Since warnings are treated as errors, this results in test failures under Python 3.12. Switch to using datetime.now() with a timezone.utc parameter.

Issue #, if available

None

Description of changes

As above

Description of how you validated changes

I've run the full test suite against Python 3.9, 3.10, 3.11 and 3.12 and verified no errors.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

datetime.utcnow() is deprecated as of Python 3.12, and its use will
raise a DeprecationWarning. Since warnings are treated as errors, this
results in test failures under Python 3.12. Switch to using
datetime.now() with a timezone.utc parameter.
@s-t-e-v-e-n-k s-t-e-v-e-n-k requested a review from a team as a code owner February 8, 2024 02:02
Copy link
Contributor

@paulhcsun paulhcsun left a comment

Choose a reason for hiding this comment

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

Thanks @s-t-e-v-e-n-k!

@ssenchenko ssenchenko merged commit c03ad6d into aws:develop Feb 8, 2024
7 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.

3 participants