Hisernberg opened a new pull request, #2217: URL: https://github.com/apache/libcloud/pull/2217
`datetime.utcnow()` is deprecated since Python 3.12 (`DeprecationWarning` on 3.12+, removal scheduled). This migrates all 9 call sites to `datetime.now(timezone.utc).replace(tzinfo=None)`: | file | use | | --- | --- | | common/aws.py | SigV4 `X-AMZ-Date` + signing | | common/google.py | `_utcnow()` token expiry | | common/openstack_identity.py | `utctimetuple()` rendering | | common/osc.py | `X-Osc-Date` + signing | | dns/base.py, dns/drivers/route53.py, dns/drivers/auroradns.py | header timestamps | | storage/drivers/azure_blobs.py, storage/drivers/s3.py | SAS/CDN expiry windows | `.replace(tzinfo=None)` keeps every value a naive UTC datetime, so: signing/header strings are byte-identical; token-expiry arithmetic is unchanged; and `GoogleBaseConnection._utcnow()` stays compatible with the fixed naive datetime mocked in `GoogleTestCase` (an aware production value would raise `TypeError` in the `<` comparison against the mock). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
