2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-17 14:28:02 +00:00
Files
openvswitch/python
Ilya Maximets d4bd0a2ad5 atlocal: Replace deprecated pkg_resources.
'pkg_resources' module is deprecated and no longer available in newer
versions of python, so pytest tests are skipped:

  DeprecationWarning: pkg_resources is deprecated as an API.
  See https://setuptools.pypa.io/en/latest/pkg_resources.html

Unfortunately, there is no direct replacement for it and functionality
is scattered between different packages.

Using a new standard library importlib.metadata to find installed
packages and their versions.  Using packaging.requirements to parse
lines from the requirements file and compare versions.  This covers
all we need.

The 'packaging' is a project used by pip and a dependency for many
other libraries, so should be available for any supported verison of
python.  'importlib' was introduced in python 3.8.  Since we support
older versions of python and 'packaging' is not part of the standard
library, checking that import is possible and falling back to
'pkg_resources' if needed.  We may remove the fallback when we stop
supporting python below 3.8.

Even though 'packaging' is a common dependency, added to the test
requirements so it will not be missed in CI.

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2024-05-22 23:02:00 +02:00
..
2021-06-22 21:29:57 +02:00
2023-07-14 22:24:03 +02:00
2023-07-14 22:24:03 +02:00

Python library for working with Open vSwitch