javapackages-tools fails to build with Python 3.10.0a2. ERROR: xmvn_config_test (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: xmvn_config_test Traceback (most recent call last): File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name) File "/builddir/build/BUILD/javapackages-5.3.0/python/test/xmvn_config_test.py", line 4, in <module> import lxml.etree as ET ImportError: /usr/lib64/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send ====================================================================== ERROR: pom_test (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: pom_test Traceback (most recent call last): File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name) File "/builddir/build/BUILD/javapackages-5.3.0/python/test/pom_test.py", line 5, in <module> from javapackages.maven.pom import POM, PomLoadingException File "/builddir/build/BUILD/javapackages-5.3.0/python/javapackages/maven/pom.py", line 35, in <module> import javapackages.maven.pomreader as POMReader File "/builddir/build/BUILD/javapackages-5.3.0/python/javapackages/maven/pomreader.py", line 34, in <module> from lxml.etree import ElementTree, XMLParser ImportError: /usr/lib64/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send ====================================================================== ERROR: metadata_test (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: metadata_test Traceback (most recent call last): File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name) File "/builddir/build/BUILD/javapackages-5.3.0/python/test/metadata_test.py", line 4, in <module> from javapackages.metadata.metadata import Metadata, MetadataInvalidException, MetadataLoadingException File "/builddir/build/BUILD/javapackages-5.3.0/python/javapackages/metadata/metadata.py", line 40, in <module> from lxml import etree ImportError: /usr/lib64/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send ====================================================================== ERROR: artifact_test (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: artifact_test Traceback (most recent call last): File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name) File "/builddir/build/BUILD/javapackages-5.3.0/python/test/artifact_test.py", line 3, in <module> from lxml.etree import fromstring, parse ImportError: /usr/lib64/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send This seem to be related to https://github.com/cython/cython/issues/3876. It might be fixed with this patch https://github.com/cython/cython/pull/3877 that works for numpy. Upstream has decided to solve this differently, but until that happens, we are using this patch in our Copr (for other packages). For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01757095-javapackages-tools/ For all our attempts to build javapackages-tools with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/javapackages-tools/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ Let us know here if you have any questions. Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
A rebuild should be enough to make this go away.
A rebuild fixes this, but a new error is: File not found: /builddir/build/BUILDROOT/javapackages-tools-5.3.0-13.fc34.x86_64/usr/lib/python?.?/site-packages/javapackages File not found: /builddir/build/BUILDROOT/javapackages-tools-5.3.0-13.fc34.x86_64/usr/lib/python?.?/site-packages/javapackages-*.egg-info
We have mass fixed all such globs in the Fedora spec files, but this glob is **not** in the spec file, it is in the "upstream" tarball: $ cat javapackages-5.3.0/install ... exec >files-python (cd ./python && "${pyinterpreter}" setup.py install -O1 --skip-build --prefix "${prefix}" --root "${DEST}") >&2 echo "${prefix}/lib/python?.?/site-packages/javapackages" echo "${prefix}/lib/python?.?/site-packages/javapackages-*.egg-info"
Forwarded upstream: https://github.com/fedora-java/javapackages/issues/85
The issue described in this bug report does not affect Fedora (as Python 3.10 is not even in Fedora yet) and it has been addressed upstream, so I'm closing the bug with resolution UPSTREAM as no change is required to Fedora javapackages-tools package at this point. Upstream change will be eventually included in Fedora package by updating to a future upstream release, or by backporting upstream patch.
We are already running test builds with Python 3.10 as a preparation for the actual change in Fedora. This is explained in the already approved https://fedoraproject.org/wiki/Changes/Python3.10 Fedora 35 change. However, there is not much Python packages requiring this (possibly none), so I guess it is not very urgent. We use bugzilla to see what problems are reported and what problems are not, please don't close this bug until it is fixed in Fedora. We need this fixed in dist git (no build is needed). Thanks.
Just a heads up that we plan to update Python in Rawhide in ~1 month.
MODIFIED, https://src.fedoraproject.org/rpms/javapackages-tools/c/2498d9d
Thu May 13 18:38:13 2021 javapackages-tools-6.0.0~alpha-1.fc35 tagged into f35 by bodhi [still active]
Thanks!