+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-yubico-1.6.2-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-yubico-1.6.2-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/python-yubico-client-1.6.2
collected 0 items / 1 error
========================================================================================== ERRORS ===========================================================================================
___________________________________________________________________________ ERROR collecting tests/test_yubico.py ___________________________________________________________________________
/usr/lib/python3.10/site-packages/_pytest/python.py:525: in importtestmodule
mod = import_path(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:584: in import_path
importlib.import_module(module_name)
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
???
<frozen importlib._bootstrap>:1027: in _find_and_load
???
<frozen importlib._bootstrap>:1006: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:688: in _load_unlocked
???
/usr/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:169: in exec_module
source_stat, co = _rewrite_test(fn, self.config)
/usr/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:351: in _rewrite_test
tree = ast.parse(source, filename=strfn)
/usr/lib64/python3.10/ast.py:50: in parse
return compile(source, filename, mode, flags,
E File "/home/tkloczko/rpmbuild/BUILD/python-yubico-client-1.6.2/tests/test_yubico.py", line 68
E except StatusCodeError, e:
E ^^^^^^^^^^^^^^^^^^
E SyntaxError: multiple exception types must be parenthesized
================================================================================== short test summary info ==================================================================================
ERROR tests/test_yubico.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 1 error in 0.22s ======================================================================================```
</details>
<details>
<summary>List of installed modules in build env:</summary>
```console
Package Version
------------------ -----------
build 1.2.1
exceptiongroup 1.1.3
importlib_metadata 7.1.0
iniconfig 2.0.0
installer 0.7.0
packaging 24.0
pluggy 1.4.0
pyproject_hooks 1.0.0
pytest 8.1.1
python-dateutil 2.9.0.post0
setuptools 69.4.0
tokenize_rt 5.2.0
tomli 2.0.1
wheel 0.43.0
zipp 3.18.1
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolationbuildwith--no-isolationI'm using during all processes only locally installed modulesinstallermodulecut off from access to the public network(pytest is executed with-m "not network")Here is pytest output:
Please let me know if you need more details or want me to perform some diagnostics.