botocore icon indicating copy to clipboard operation
botocore copied to clipboard

Refactored usages of deprecated method utcnow()

Open TehWeifu opened this issue 10 months ago • 2 comments

Refactored usages of utcnow() method for method now(datetime.UTC). The first method is being deprecated and displaying deprecation warnings

TehWeifu avatar Feb 20 '25 17:02 TehWeifu

+1 🙏

ArzelaAscoIi avatar Feb 24 '25 10:02 ArzelaAscoIi

I've already opened a PR to address this: #3239.

The method used in this PR has been previously attempted, but had to be discarded because it made the datetime objects timezone-aware.

In addition, the datetime.UTC alias used in this PR is only available in Python 3.11 and higher, and would cause AttributeErrors in lower Python versions.

kurtmckee avatar Feb 26 '25 09:02 kurtmckee

Resolving in favor of https://github.com/boto/botocore/pull/3239. Thanks for the contribution though!

nateprewitt avatar Aug 01 '25 20:08 nateprewitt