Public bug reported:

Very minor correction to the deprecation warning:  Currently it states:

DeprecationWarning: datetime.datetime.utcnow() is deprecated and
scheduled for removal in a future version. Use timezone-aware objects to
represent datetimes in UTC: datetime.datetime.now(datetime.UTC)


However the tz parameter of datetime.datetime.now is keyword only, so the 
recommendation should be 

datetime.datetime.now(tz=datetime.UTC)


Hope this might save a few mins for others!

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: python3 3.12.3-0ubuntu2
ProcVersionSignature: Ubuntu 6.8.0-45.45-generic 6.8.12
Uname: Linux 6.8.0-45-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Mon Oct 14 15:46:32 2024
SourcePackage: python3-defaults
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: python3-defaults (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2084468

Title:
  Deprecation warning for datetime.utcnow() is incorrect

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/2084468/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to