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

chore: use new not_valid_after_utc cert field #261

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

jackwotherspoon
Copy link
Collaborator

In cryptography v42.0.0 the not_valid_after_utc field was added to certs. This allows us to pull the aware datetime cert expiry instead of the naive one which is slowly being deprecated.

This will help to remove a deprecation warning that is currently being outputted:

alloydb-python-connector/google/cloud/alloydb/connector/refresh.py:99: CryptographyDeprecationWarning: Properties that return a naïve datetime object have been deprecated. Please switch to not_valid_after_utc.
  self.expiration = cert_obj.not_valid_after.replace(tzinfo=timezone.utc)

Closes #206

@jackwotherspoon jackwotherspoon self-assigned this Feb 28, 2024
@jackwotherspoon jackwotherspoon merged commit ce5f4e8 into main Feb 28, 2024
15 checks passed
@jackwotherspoon jackwotherspoon deleted the not-valid-after-utc branch February 28, 2024 17:04
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.

Update certs in tests to use not_valid_after_utc over not_valid_after
2 participants