]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-103857: Deprecate utcnow and utcfromtimestamp (#103858)
authorPaul Ganssle <1377457+pganssle@users.noreply.github.com>
Thu, 27 Apr 2023 17:32:30 +0000 (11:32 -0600)
committerGitHub <noreply@github.com>
Thu, 27 Apr 2023 17:32:30 +0000 (11:32 -0600)
commit0b7fd8ffc5df187edf8b5d926cee359924462df5
treef88f8ba6dea519974bc2da3a4e18d69d07aefc8f
parenta5308e188b810e5cc69c1570bdc9b21ed6c87805
GH-103857: Deprecate utcnow and utcfromtimestamp (#103858)

Using `datetime.datetime.utcnow()` and `datetime.datetime.utcfromtimestamp()` will now raise a `DeprecationWarning`.

We also have removed our internal uses of these functions and documented the change.
Doc/library/datetime.rst
Lib/datetime.py
Lib/email/utils.py
Lib/http/cookiejar.py
Lib/test/datetimetester.py
Lib/test/support/testresult.py
Lib/test/test_plistlib.py
Lib/test/test_sqlite3/test_types.py
Misc/NEWS.d/next/Library/2023-04-25-17-03-18.gh-issue-103857.Mr2Cak.rst [new file with mode: 0644]
Modules/_datetimemodule.c