Test suite issues with new version of python3-antlr4 (Was: python3-antlr4: FTBFS: AttributeError: 'TestIntervalSet' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?)
Control: tags -1 pending Hi, I intended to fix bug #1058096. Since I realised there is a new upstream version I was considering an upgrade which I pushed to Salsa. Unfortunately there are other test suite errors as you can see in Salsa CI[1]: == ERROR: test.__main__ (unittest.loader._FailedTest.test.__main__) -- ImportError: Failed to import test module: test.__main__ Traceback (most recent call last): File "/usr/lib/python3.11/unittest/loader.py", line 419, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.11/unittest/loader.py", line 362, in _get_module_from_name __import__(name) File "/usr/lib/python3.11/test/__main__.py", line 2, in main(_add_python_opts=True) File "/usr/lib/python3.11/test/libregrtest/main.py", line 671, in main ns = _parse_args(sys.argv[1:], **kwargs) ^^^ File "/usr/lib/python3.11/test/libregrtest/cmdline.py", line 402, in _parse_args parser.error("unrecognized arguments: %s" % arg) File "/usr/lib/python3.11/test/libregrtest/cmdline.py", line 182, in error super().error(message + "\nPass -h or --help for complete help.") File "/usr/lib/python3.11/argparse.py", line 2642, in error self.exit(2, _('%(prog)s: error: %(message)s\n') % args) File "/usr/lib/python3.11/argparse.py", line 2629, in exit _sys.exit(status) SystemExit: 2 ... (see more in Salsa CI log[1]) Since this looks pretty much as if the reason for this failur is that the PiPY downloadable tarball is lacking the directory test/ (which was included in the currently packaged version) I checked Github for these files and added these inside a multi-source tarball (a script to create this tarball is commited as well). While the first three tests that were importing from test/ are passing now. I've also fixed bug #1058096 in a patch[2] (thus tagging this bug pending). However, that new version has now new test failures which you can find in the new Salsa CI build log which includes the (fixed) tests[3]. It starts with == ERROR: TestTokenStreamRewriter (unittest.loader._FailedTest.TestTokenStreamRewriter) -- ImportError: Failed to import test module: TestTokenStreamRewriter Traceback (most recent call last): File "/usr/lib/python3.11/unittest/loader.py", line 419, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.11/unittest/loader.py", line 362, in _get_module_from_name __import__(name) File "/builds/python-team/packages/python3-antlr4/debian/output/source_dir/.pybuild/cpython3_3.11_antlr4/build/test/TestTokenStreamRewriter.py", line 8, in from mocks.TestLexer import TestLexer, TestLexer2 File "/builds/python-team/packages/python3-antlr4/debian/output/source_dir/.pybuild/cpython3_3.11_antlr4/build/test/mocks/TestLexer.py", line 19, in class TestLexer(Lexer): File "/builds/python-team/packages/python3-antlr4/debian/output/source_dir/.pybuild/cpython3_3.11_antlr4/build/test/mocks/TestLexer.py", line 20, in TestLexer atn = ATNDeserializer().deserialize(serializedATN()) ^^ File "/builds/python-team/packages/python3-antlr4/debian/output/source_dir/.pybuild/cpython3_3.11_antlr4/build/antlr4/atn/ATNDeserializer.py", line 28, in deserialize self.checkVersion() File "/builds/python-team/packages/python3-antlr4/debian/output/source_dir/.pybuild/cpython3_3.11_antlr4/build/antlr4/atn/ATNDeserializer.py", line 50, in checkVersion raise Exception("Could not deserialize ATN with version " + str(version) + " (expected " + str(SERIALIZED_VERSION) + ").") Exception: Could not deserialize ATN with version (expected 4). ... and I have no idea how to fix this. Kind regards Andreas. [1] https://salsa.debian.org/python-team/packages/python3-antlr4/-/jobs/5066603 [2] https://salsa.debian.org/python-team/packages/python3-antlr4/-/blob/master/debian/patches/assertEquals.patch?ref_type=heads [3] https://salsa.debian.org/python-team/packages/python3-antlr4/-/jobs/5067599 -- http://fam-tille.de #!/bin/sh # The archive at PiPy is not featuring the test suite files # This script is fetching the files and creates a tarball that is suited for multi-source tarball UGIT=https://github.com/antlr/antlr4/ UVERSION=$(dpkg-parsechangelog --file ./changelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-) tarball=$(dpkg-parsechangelog --file ./changelog | awk '/^Source:/ {print $2}')_${UVERSION}.orig-tests.tar.gz set -x tmpdir=$(mktemp -d /tmp/python3-antlr4-testsuite) curdir=$PWD cd $tmpdir git clone ${UGIT} cd a
bug in DebHelper or pybuild when deteting the plugin system.
Hello, I am working in order to solve the bitshuffle FTBFS. I took the liberty to modernize the package in my NMU. But once I added pybuild-plugin-pyproject the build failed with this error message dh_auto_clean -- -v pybuild --clean -i python{version} -p "3.12 3.11" -v D: pybuild pybuild:614: version: 6.20231204 D: pybuild pybuild:615: ['/usr/bin/pybuild', '--clean', '-i', 'python{version}', '-p', '3.12 3.11', '-v'] D: pybuild pybuild:39: cfg: Namespace(verbose=True, quiet=False, really_quiet=False, detect_only=False, clean_only=True, configure_only=False, build_only=False, install_only=False, test_only=False, autopkgtest_only=False, list_systems=False, print_args=None, before_clean=None, clean_args=None, after_clean=None, before_configure=None, configure_args=None, after_configure=None, before_build=None, build_args=None, after_build=None, before_install=None, install_args=None, after_install=None, before_test=None, test_args=None, after_test=None, test_nose=False, test_nose2=False, test_pytest=False, test_tox=False, test_custom=False, dir='/home/picca/debian/picca/bitshuffle', destdir='debian/tmp', ext_destdir=None, ext_pattern='\\.so(\\.[^/]*)?$', ext_sub_pattern=None, ext_sub_repl=None, install_dir=None, name='bitshuffle', system=None, versions=['3.12', '3.11'], interpreter=['python{version}'], disable=None, custom_tests=False) D: pybuild tools:232: invoking: /usr/bin/dpkg-architecture D: pybuild debhelper:183: source=bitshuffle, binary packages=['bitshuffle'] E: pybuild pybuild:122: unrecognized build system: pyproject dh_auto_clean: error: pybuild --clean -i python{version} -p "3.12 3.11" -v returned exit code 10 So I instrumented a bit the pybuild code with some print... # Selected by build_dep? if not selected_plugin: dh = DebHelper(build_options()) for build_dep in dh.build_depends: if build_dep.startswith('pybuild-plugin-'): print(f"'{build_dep}'") print() selected_plugin = build_dep.split('-', 2)[2] break if selected_plugin: certainty = 99 print() print(f'"{selected_plugin}"') print() print(build.plugins) print() Plugin = build.plugins.get(selected_plugin) print(Plugin) print() if not Plugin: log.error('unrecognized build system: %s', selected_plugin) exit(10) plugin = Plugin(cfg) context = {'ENV': env, 'args': {}, 'dir': cfg.dir} plugin.detect(context) And I discoverd this --- dh clean --buildsystem=pybuild debian/rules override_dh_auto_clean make[1] : on entre dans le répertoire « /home/picca/debian/picca/bitshuffle » rm -rf lzf/lzf rm -rf lz4 dh_auto_clean -- -v pybuild --clean -i python{version} -p "3.12 3.11" -v D: pybuild pybuild:614: version: 6.20231204 D: pybuild pybuild:615: ['/usr/bin/pybuild', '--clean', '-i', 'python{version}', '-p', '3.12 3.11', '-v'] D: pybuild pybuild:39: cfg: Namespace(verbose=True, quiet=False, really_quiet=False, detect_only=False, clean_only=True, configure_only=False, build_only=False, install_only=False, test_only=False, autopkgtest_only=False, list_systems=False, print_args=None, before_clean=None, clean_args=None, after_clean=None, before_configure=None, configure_args=None, after_configure=None, before_build=None, build_args=None, after_build=None, before_install=None, install_args=None, after_install=None, before_test=None, test_args=None, after_test=None, test_nose=False, test_nose2=False, test_pytest=False, test_tox=False, test_custom=False, dir='/home/picca/debian/picca/bitshuffle', destdir='debian/tmp', ext_destdir=None, ext_pattern='\\.so(\\.[^/]*)?$', ext_sub_pattern=None, ext_sub_repl=None, install_dir=None, name='bitshuffle', system=None, versions=['3.12', '3.11'], interpreter=['python{version}'], disable=None, custom_tests=False) D: pybuild tools:232: invoking: /usr/bin/dpkg-architecture D: pybuild debhelper:183: source=bitshuffle, binary packages=['bitshuffle'] 'pybuild-plugin-pyproject ' "pyproject " {'autopkgtest': , 'cmake': , 'custom': , 'distutils': , 'flit': , 'meson': , 'pyproject': } None E: pybuild pybuild:122: unrecognized build system: pyproject --- So the detected plugin is 'pyproject ' with trailling whitespaces. And this comes strait from the DebHelper build_dep parsing 'pybuild-plugin-pyproject ' This is due to the peticular organisation of the Build-Depends of the Maintainer. Build-Depends: debhelper-compat (= 13) , dh-exec , dh-python , dh-sequence-numpy3 , dh-sequence-python3 , pybuild-plugin-pyproject , python3-all-dev , python3-num
Re: bug in DebHelper or pybuild when deteting the plugin system.
Hi PICCA (2023.12.21_14:10:16_+) > "pyproject" That's a bug, the tab got included. I'll fix it now. Stefano -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272
Request to Join the Debian Python Team
Dear all, First off, as a long time lover of both Debian and Python I'd like to thank you for all the work you've done in building and maintaining the Debian Python ecosystem. Now it's my turn to give back. ;) I'd like to join the team so I can help maintain Python-related packages currently in Debian, as well as contribute new packages where I believe there is a benefit to the Debian community. In particular, I'm eager to help squash the outstanding Python 3.12 bugs in current packages, as well helping with other outstanding bugs and out-of-date packages. My Salsa ID is: doge-tech [1] My contributions so far include updates/fixes for aioquic[2] and haproxy-log-analysis[3], as well as the new package python-dbutils[4]. Outside of Debian, I work as an information security manager, so as well as using Python on a regular basis I also have a keen eye for security issues and fixes. I have read, understood and accepted the Debian Python Team Policy[5]. Thank you for your consideration! Best regards, Dale Richards [1] https://salsa.debian.org/doge-tech [2] https://salsa.debian.org/python-team/packages/aioquic/-/merge_requests/1 [3] https://salsa.debian.org/python-team/packages/haproxy-log-analysis/-/merge_requests/2 [4] https://mentors.debian.net/package/python-dbutils/ [5] https://salsa.debian.org/python-team/tools/python-modules/blob/master/policy.rst