Comment 7 for bug 2060649

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: ansible-lint crashes in 24.04

As reported this was just the pre python 3.12 version and not rebuilt since April 2023.
Thereby I agree to Sorin's suggestion of this not being ansible related at all.

Running the packages self-tests would have been enough to spot this in the first place,.

But this only had autodep8-python3 defined for autopkgtests.
Which oddly only ran ran import wcmatch; print(wcmatch)
And those are too trivial, they worked.
Due to that there was no signal of that fail when python3.12 migrated.
See https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/amd64/p/python-wcmatch/20240303_232528_d4ebb@/log.gz

One should mid term try to look at ensuring the real testsuite runs at autopkgtest time to avoid that from happening again (which it likely will given that the project explicitly enables new versions). There is already https://github.com/facelessuser/wcmatch/commit/09675ed9

But at least thereby manual testing this can be outlined well for the SRU at hand here:

$ apt install dpkg-dev
# add deb-src to entries in /etc/apt/sources.list.d/ubuntu.sources
$ apt update
$ apt source python-wcmatch
$ cd python-wcmatch-8.*
$ pytest

With that we also see that the helpful suggestion of a more minimal change in comment #6 will only lead to overcome this but fail in 57 other cases (down from 2 during collection and not even starting in depth).

According to git there was no later change to the python 3.12 compat changes in 223f9cab "Update to support Python 3.12 alpha (#203)". So a subset (no git workflow, no tox, no metadata) seems to be the best tradeoff for an SRU.

Noble with fix:
1165 passed, 150 skipped in 2.55s
Compared to Oracular (full 8.5.x)
1171 passed, 151 skipped, 54 warnings in 2.71s

I've done the backport for some minimal fuzz and a lot of release/workflow changes that are only noise in regard to the SRU. Applying that right to the source makes it work through all tests in noble.

Preparing a MP, the SRU template and PPA with that ...