versioningit
versioningit copied to clipboard
Failure during tests
While updating the openSUSE rpm package to the new 3.0.0 version I'm seeing an error that occur during the %check part of the building
[ 22s] + mv _build.python39 build
[ 22s] + echo python39
[ 22s] + python_flavor=python39
[ 22s] + PYTHONPATH=/home/abuild/rpmbuild/BUILDROOT/python-versioningit-3.0.0-0.x86_64/usr/lib/python3.9/site-packages
[ 22s] + PYTHONDONTWRITEBYTECODE=1
[ 22s] + pytest-3.9 --ignore=_build.python39 --ignore=_build.python310 --ignore=_build.python312 --ignore=_build.python311 -v test -k 'not test_editable_mode'
[ 22s] ============================= test session starts ==============================
[ 22s] platform linux -- Python 3.9.18, pytest-7.4.4, pluggy-1.3.0 -- /usr/bin/python3.9
[ 22s] cachedir: .pytest_cache
[ 22s] rootdir: /home/abuild/rpmbuild/BUILD/versioningit-3.0.0
[ 22s] configfile: tox.ini
[ 22s] plugins: cov-4.1.0, mock-3.12.0
[ 23s] collecting ... collected 454 items / 1 error
[ 23s]
[ 23s] ==================================== ERRORS ====================================
[ 23s] ____________________ ERROR collecting test/test_end2end.py _____________________
[ 23s] test/test_end2end.py:98: in <module>
[ 23s] [
[ 23s] test/test_end2end.py:106: in <listcomp>
[ 23s] for c in mkcases(subdir, marks)
[ 23s] test/test_end2end.py:79: in mkcases
[ 23s] details = details_cls.model_validate_json(
[ 23s] E AttributeError: type object 'CaseDetails' has no attribute 'model_validate_json'
[ 23s] =========================== short test summary info ============================
[ 23s] ERROR test/test_end2end.py - AttributeError: type object 'CaseDetails' has no...
[ 23s] !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
[ 23s] =============================== 1 error in 0.64s ===============================
[ 23s] error: Bad exit status from /var/tmp/rpm-tmp.RTHAjE (%check)
This is with openSUSE Tumbleweed (python 3.9 3.10 3.11 3.12 are build in a fresh build isolated vm. Any ideas, I'm maybe missing a dependency ?
Build log place: (tests are deactivated here to get the package built) https://build.opensuse.org/package/live_build_log/home:bruno_friedmann:branches:devel:languages:python/python-versioningit/openSUSE_Tumbleweed/x86_64
Best guess: You're using Pydantic 1.x. versioningit has required Pydantic 2.x for its tests since versioningit v2.2.1.
Arf you're right I didn't check that part
python310-pydantic-1.10.14-44.6
Yet another candidate for update :-) I'll try to fix that and will close if it works thanks for the hint.
Yet another candidate for update :-) I'll try to fix that and will close if it works thanks for the hint.
We have Pydantic 2.x in Fedora starting with Fedora 40. (I’m one of the Change owners.) I don’t have any OpenSUSE-specific packaging knowledge, but please feel free to reach out with questions and/or poke through our packages if it helps.
Closing due to lack of activity.