** Description changed: + [ Impact ] + + * The code in wcmatch uses inner details of libraries hidden in python 3.12 + * That breaks several use cases like ansible-lint and many self tests + + [ Test Plan ] + + 1. For the original report, run ansible-lint + + 2. For a wider coverage I recommend running the full self-tests + + $ 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.* + $ pytestdetailed instructions how to reproduce the bug + + + [ Where problems could occur ] + + * wcmatch has multiple subelements, only pathlib use cases got changed + * There are untested changes to the windows code paths, but even WSL will run + the linux paths, so that should be a no-op + + [ Other Info ] + + * while in universe, this is just an easy fix and an oversight in + the python transition hence I think we should fix it + + --- + original report + Running ansible-lint in Ubuntu 24.04 on my role ends up with a stack trace: Traceback (most recent call last): - File "/usr/bin/ansible-lint", line 5, in <module> - from ansiblelint.__main__ import _run_cli_entrypoint - File "/usr/lib/python3/dist-packages/ansiblelint/__main__.py", line 39, in <module> - from ansiblelint import cli - File "/usr/lib/python3/dist-packages/ansiblelint/cli.py", line 20, in <module> - from ansiblelint.file_utils import ( - File "/usr/lib/python3/dist-packages/ansiblelint/file_utils.py", line 15, in <module> - import wcmatch.pathlib - File "/usr/lib/python3/dist-packages/wcmatch/pathlib.py", line 218, in <module> - class PurePosixPath(PurePath): - File "/usr/lib/python3/dist-packages/wcmatch/pathlib.py", line 221, in PurePosixPath - _flavour = pathlib._posix_flavour # type: ignore[attr-defined] - ^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/bin/ansible-lint", line 5, in <module> + from ansiblelint.__main__ import _run_cli_entrypoint + File "/usr/lib/python3/dist-packages/ansiblelint/__main__.py", line 39, in <module> + from ansiblelint import cli + File "/usr/lib/python3/dist-packages/ansiblelint/cli.py", line 20, in <module> + from ansiblelint.file_utils import ( + File "/usr/lib/python3/dist-packages/ansiblelint/file_utils.py", line 15, in <module> + import wcmatch.pathlib + File "/usr/lib/python3/dist-packages/wcmatch/pathlib.py", line 218, in <module> + class PurePosixPath(PurePath): + File "/usr/lib/python3/dist-packages/wcmatch/pathlib.py", line 221, in PurePosixPath + _flavour = pathlib._posix_flavour # type: ignore[attr-defined] + ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'pathlib' has no attribute '_posix_flavour' This is due to python3-wcmatch=8.4-2 being incompatible with python3.12. Upstream fixed this in the next version https://github.com/facelessuser/wcmatch/releases/tag/8.5 I think the following portion of changes can be added to library package for Noble release: https://github.com/facelessuser/wcmatch/pull/203/files#diff-081b2096c270ab6b17a6c70f95ea07d24dd0d343522e135dbdeb609e59867186L83 Versions of installed packages: ansible-lint: - Installed: 6.17.2-1 - Candidate: 6.17.2-1 - Version table: - *** 6.17.2-1 500 - 500 http://ru.archive.ubuntu.com/ubuntu noble/universe amd64 Packages - 500 http://ru.archive.ubuntu.com/ubuntu noble/universe i386 Packages - 100 /var/lib/dpkg/status + Installed: 6.17.2-1 + Candidate: 6.17.2-1 + Version table: + *** 6.17.2-1 500 + 500 http://ru.archive.ubuntu.com/ubuntu noble/universe amd64 Packages + 500 http://ru.archive.ubuntu.com/ubuntu noble/universe i386 Packages + 100 /var/lib/dpkg/status python3-wcmatch: - Installed: 8.4-2 - Candidate: 8.4-2 - Version table: - *** 8.4-2 500 - 500 http://ru.archive.ubuntu.com/ubuntu noble/universe amd64 Packages - 500 http://ru.archive.ubuntu.com/ubuntu noble/universe i386 Packages - 100 /var/lib/dpkg/status + Installed: 8.4-2 + Candidate: 8.4-2 + Version table: + *** 8.4-2 500 + 500 http://ru.archive.ubuntu.com/ubuntu noble/universe amd64 Packages + 500 http://ru.archive.ubuntu.com/ubuntu noble/universe i386 Packages + 100 /var/lib/dpkg/status
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2060649 Title: python-wcmatch not compatible to python3.12 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-wcmatch/+bug/2060649/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs