Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native tests are written in Python and they follow the unittest pattern, but any executable can serve as a test.
Describe the bug
The packaging module, while a suggested replacement for pkg_resources in Python 3.12, is not a standard library module, but an external one.
If setuptools<70.0 is present, the "packaging" package needs to be installed. If, setuptools>=70 is installed, it probably contains packaging as a "vendor" submodule.
This means that currently, installations of Avocado on systems with setuptools <70.0, need another external library (packaging) or will not be able to use avocado.utils.kernel.
Steps to reproduce
On a Fedora 40 system:
$ dnf install python3-pip python3-setuptools
$ python3 -m pip install avocado-framework==106.0
$ python3 -c 'import avocado.utils.kernel'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.12/site-packages/avocado/utils/kernel.py", line 26, in <module>
from packaging.version import parse
ModuleNotFoundError: No module named 'packaging'
Expected behavior
A successful import of avocado.utils.kernel
Current behavior
A failure to import it:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.12/site-packages/avocado/utils/kernel.py", line 26, in <module>
from packaging.version import parse
ModuleNotFoundError: No module named 'packaging'
System information (please complete the following information):
Describe the bug The
packaging
module, while a suggested replacement forpkg_resources
in Python 3.12, is not a standard library module, but an external one.If setuptools<70.0 is present, the "packaging" package needs to be installed. If, setuptools>=70 is installed, it probably contains packaging as a "vendor" submodule.
This means that currently, installations of Avocado on systems with setuptools <70.0, need another external library (
packaging
) or will not be able to useavocado.utils.kernel
.Steps to reproduce On a Fedora 40 system:
Expected behavior A successful import of
avocado.utils.kernel
Current behavior A failure to import it:
System information (please complete the following information):
LSB Version: :core-5.0-amd64:core-5.0-noarch:cxx-5.0-amd64:cxx-5.0-noarch:desktop-5.0-amd64:desktop-5.0-noarch:languages-5.0-amd64:languages-5.0-noarch:printing-5.0-amd64:printing-5.0-noarch Distributor ID: Fedora Description: Fedora release 40 (Forty) Release: 40 Codename: Forty