GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-106392: Fix inconsistency in deprecation warnings (#106436) · python/cpython@d5c5d4b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Lib
    • _pydatetime.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Lib/_pydatetime.py‎

Copy file name to clipboardExpand all lines: Lib/_pydatetime.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,7 +1812,7 @@ def utcfromtimestamp(cls, t):
18121812
warnings.warn("datetime.utcfromtimestamp() is deprecated and scheduled "
18131813
"for removal in a future version. Use timezone-aware "
18141814
"objects to represent datetimes in UTC: "
1815-
"datetime.fromtimestamp(t, datetime.UTC).",
1815+
"datetime.datetime.fromtimestamp(t, datetime.UTC).",
18161816
DeprecationWarning,
18171817
stacklevel=2)
18181818
return cls._fromtimestamp(t, True, None)
@@ -1830,7 +1830,7 @@ def utcnow(cls):
18301830
warnings.warn("datetime.utcnow() is deprecated and scheduled for "
18311831
"removal in a future version. Instead, Use timezone-aware "
18321832
"objects to represent datetimes in UTC: "
1833-
"datetime.now(datetime.UTC).",
1833+
"datetime.datetime.now(datetime.UTC).",
18341834
DeprecationWarning,
18351835
stacklevel=2)
18361836
t = _time.time()

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.