Public bug reported:

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]
               ^^^^^^^^^^^^^^^^^^^^^^
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

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

** Affects: ansible-lint (Ubuntu)
     Importance: Undecided
         Status: New

-- 
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:
  ansible-lint crashes in 24.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible-lint/+bug/2060649/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to