ptyz is no longer required in Python >= 3.9 in favor of zoneinfo.
Also tzdata was added to requirements as a runtime dependency of
zoneinfo, which is only available in Python >= 3.9 and is not required
in Python 3.8.
Depends-on: https://review.opendev.org/c/openstack/requirements/+/901119
Change-Id: I9ab39a8d394c7063a33c699d277c7f4ed2151767
PyYAML is required by oslo_utils.fileutils, but has been missing from
requirements.
Closes-Bug: #1977850
Change-Id: I80afbf26c92e20f64904e0e431360dd269b96f23
We removed compatibility with Python 3.8 once but it was added back to
tested runtimes for 2023.2. Thus we have to make sure the code works
with Python 3.8, which was broken by [1].
Note that ptyz is added back to requirmenets.txt and is now required
regardless of the python version. This is a short term solution until
we figure out the way to fix the requirement-check job (or we again
remove python 3.8 support).
[1] 7d9fda625f
Change-Id: Ica344021a4e922bcfd20d20cffcce585a5742c8f
Zoneinfo was introduced within python 3.9.
The support of pytz will be removed within RHEL 10 [1].
2023.2 (bobcat) will move our testing runtime to py3.9 and py3.10
so we want to see pytz removed within this series.
tzdata is required at runtime in our gates, because, by default,
zoneinfo uses the system’s time zone data if available; if no system
time zone data is available, the library will fall back to using the
first-party tzdata package available on PyPI. Apparently our gates have no
time zone data available nor tzdata installed by default because we get the
following error without tzdata installed [3]:
`ModuleNotFoundError: No module named 'tzdata'
So I prefer to add tzdata in our requirements to avoid runtime failure
related to time zone and ensure that time zone are always available.
[1] https://issues.redhat.com/browse/RHEL-219
[2] https://review.opendev.org/c/openstack/governance/+/872232
[3] https://zuul.opendev.org/t/openstack/build/0a1576775e894b09bc31269fea00ba03/log/job-output.txt#1445`
Depends-on: https://review.opendev.org/c/openstack/requirements/+/875854
Change-Id: I1f88bdadc68bfa726eac1da1c5824c1ed352ad98
We don't use this at runtime. No need to install it.
Change-Id: I5d7d526beebc39de2fa0ff8c6b1d2458c6a3d0bb
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Importing pkg_resources has a side-effect of scanning the metadata of
every installed python package. That is excessive overhead for a
function that needs to compare two version strings.
This change replaces pkg_resources with the packaging library, which
is also used as the implementation for version parsing within
setuptools and pkg_resources.
Change-Id: Ic9bda0783d3664e1f518d513d81b3271028335fd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
A change to the global-requirements[1] has limited use of the monotonic
library to Python versions earlier than 3.3 (later versions have
built-in support for a monotonic clock), so no requirements changes can
be merged until we similarly limit it in requirements.txt.
[1] https://review.openstack.org/615441
Change-Id: Ib53d89ea820d21114d10280c9f4ab1b0c2c4a4bc
Instead of a custom build parser and evaluator for
specs use an actual formal parser and evaluation of
that parse result instead, making that custom parser
now be one that follows a more normal way of creating
and evaluating a DSL.
Also removes <all-in> operator, since it is buggy. (It
will be added later when the issue has been resolved.)
Co-authored-by: Alexis Lee <lxsli@hpe.com>
Change-Id: I10f7dff8c83e5b6983515677e80cefa55881a92c
For now revert this, at a later date we can reapply
this but we need to order this a little differently to
make it work out.
This reverts commit 2abbe1c3b1.
Change-Id: I20f3c5804caf1af698aa0f6397a9953eb9aba829
netifaces is a very heavy requirement especially for
python clients, the code that uses netifaces is called
only in exception paths at least now. So let us move
this requirement to extras to reduce the time taken
to install oslo.utils.
Closes-Bug: #1517069
Change-Id: If3430364e49c1c0b1d9f4937bb67900380662728
This function is the recommended way to get information
about functions going forward, so all the variations of
getargspec can just use this instead (including the variations
of this used in openstack).
This exposes a 'get_signature' function that correctly aliases
the exposed function in python3.x and the backwards compat
library (funcsigs) that exposes this same information in python2.x
Internally in the other reflection functions we now switch
away from using getargspec as well, and replace it with using
this new signature object/function instead.
Depends-On: I1aa0054089ca57fc2d68779f4ee133a9750fec2a
Change-Id: I910b353f5db290832ef87bf7c5e5bb2e9788e3ec
That library already does this same/equivalent search and
ensures that a monotonically increasing time is made available
so we can just avoid looking around for it ourselves.
Depends-On: I0f07858e96ea3baf46f8a453e253b9ed29c7f7e2
Depends-On: I33bd2d9dff9cb7dc1a50177db7286b7317966784
Change-Id: Idd2109c8947d10cdbd62c53998ab2e31382e8633
As Victor Stinner suggested, there is a superior alternative that is
bug-free concerning timezone aware and unaware datetime, and that's the
native datetime.datetime.isoformat() function.
Let's deprecate our local isotime version.
Change-Id: I35ef3205657481f2a49a060ccb199babe582ff7e
At the moment function _get_my_ip() exists (at least) in Cinder,
Ironic, Neutron, Nova and Tuskar, so there is a sense to keep
it in common code.
Change-Id: I3c37d6ea3e8bef7b8a5e21baedd1b2b94369515f
Add pbr to the list of installation requirements so that it is installed
via pip before this library is installed, instead of with easy_install.
This avoids issues like Bug #1384919, and ensures that projects that use
this library as a dependency are properly installed.
Change-Id: I6c155370dbd01fe4748d5137bdf288e8d3e1a67e
There are many projects on OpenStack that use
ip validation. It would be nice to have function
for validation in common module.
Change-Id: Ia723490a02b1816fe96c3a02e069d57f4d97d940