[Bug 2088384] Re: Incorrect use of oslo.utils added
James Page
2088384 at bugs.launchpad.net
Mon Nov 18 15:44:33 UTC 2024
*** This bug is a duplicate of bug 2088451 ***
https://bugs.launchpad.net/bugs/2088451
I missed this bug and raised another - marking as a dupe.
** This bug has been marked a duplicate of bug 2088451
[SRU] datetime fix introduces runtime dependency on oslo.utils
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-keystoneauth1 in Ubuntu.
https://bugs.launchpad.net/bugs/2088384
Title:
Incorrect use of oslo.utils added
Status in python-keystoneauth1 package in Ubuntu:
New
Bug description:
There is a patch added in the ubuntu package to deal with
datetime.datetime.utcnow() deprecation. It solves this by pulling in
oslo.utils, which might normally seem to make sense in an openstack
packaging context.
However - there are two issues.
The first is simple - it adds usage of oslo.utils without adding it as
a packaging dependency. This makes the library not work when installed
without manual installation of an additional unrelated and unexpected
package. The simple fix to this would be to add an appropriate package
dependency.
The second is philosophical - the keystoneauth project is
fundamentally opposed to the use of runtime dependencies on oslo
libraries. The oslo libraries are designed for server applications,
while keystoneauth is intended for lightweight client interations, as
it openstacksdk which depends on it. It is directly against the stated
design goals of the project to add the oslo.utils import.
As such, it is highly recommended that rather than updating the
packaging to add a dependency on oslo.utils, simply replace
datetime.datetime.utcnow() with
datetime.datetime.now(datetime.datetime.utc) which adds no further
dependencies.
I have only noticed this in noble - where this missing package
actually caused an unrelated CI job failure. I don't know if it
manifests elsewhere.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-keystoneauth1/+bug/2088384/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list