Skip to content

Botocore deprecation warning #25

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

Open
gchqdev227 opened this issue May 16, 2025 · 1 comment · May be fixed by #26
Open

Botocore deprecation warning #25

gchqdev227 opened this issue May 16, 2025 · 1 comment · May be fixed by #26
Assignees

Comments

@gchqdev227
Copy link
Member

The tests emit the following deprecation warning:

DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC)

This is coming from botocore. This PR is looking to address it, but in the meantime we should catch this warning.

@gchqdev227 gchqdev227 self-assigned this May 16, 2025
@gchqdev227
Copy link
Member Author

To replicate quickly, run the following:

$ python3 -m unittest discover -k test_fetch_secret_latest_version
.venv/lib/python3.12/site-packages/botocore/auth.py:425: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
  datetime_now = datetime.datetime.utcnow()

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 a pull request may close this issue.

1 participant