Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934229 - app-portage/gemato: Python deprecation warnings about datetime.datetime.utcnow()
Summary: app-portage/gemato: Python deprecation warnings about datetime.datetime.utcnow()
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-14 07:12 UTC by Hanno Böck
Modified: 2024-06-14 09:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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