Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 934229

Summary: app-portage/gemato: Python deprecation warnings about datetime.datetime.utcnow()
Product: Gentoo Linux Reporter: Hanno Böck <hanno>
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: CONFIRMED ---    
Severity: normal CC: hanno
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=934226
Whiteboard:
Package list:
Runtime testing required: ---

Description Hanno Böck gentoo-dev 2024-06-14 07:12:51 UTC
With Python 3.12 and warnings enabled, the openpgp.py code in gemato generates a DeprecationWarning.

This can e.g. be tested with emerge --sync:

PYTHONWARNINGS=d emerge --sync -q

Warning:
/usr/lib/python3.12/site-packages/gemato/openpgp.py:171: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  return datetime.datetime.utcfromtimestamp(int(ts))


This command will also show a warning about portage's code itself, this is tracked in #934226