ansible-core fails its autopkg tests with Python 3.12

Bug #2052530 reported by Simon Chopin
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ansible (Ubuntu)
Fix Released
Undecided
Unassigned
ansible-core (Debian)
Fix Released
Unknown
ansible-core (Ubuntu)
Fix Released
Undecided
Unassigned
python-ansible-compat (Ubuntu)
New
Undecided
Unassigned

Bug Description

Imported from Debian bug http://bugs.debian.org/1061782:

Package: src:ansible-core
Version: 2.14.13-1
Severity: serious
Tags: sid trixie ftbfs
User: <email address hidden>
Usertags: python3.12

With python3-defaults from experimental, the package fails its autopkg
tests:

[...]
231s autopkgtest [13:33:12]: test unit: [-----------------------
231s This version of ansible-test cannot be executed with Python version
3.12.1. Supported Python versions are: 3.9, 3.10, 3.11
231s autopkgtest [13:33:12]: test unit: -----------------------]
231s autopkgtest [13:33:12]: test unit: - - - - - - - - - - results - -
- - - - - - - -
231s unit FAIL non-zero exit status 1
232s autopkgtest [13:33:13]: test unit: - - - - - - - - - - stderr - -
- - - - - - - -
232s This version of ansible-test cannot be executed with Python version
3.12.1. Supported Python versions are: 3.9, 3.10, 3.11
232s autopkgtest [13:33:13]: @@@@@@@@@@@@@@@@@@@@ summary
232s unit FAIL non-zero exit status 1

Revision history for this message
Simon Chopin (schopin) wrote :

Sadly, removal is not simple as the dependency chain is rather long (I gave up when bpfcc showed up, since it's a package that is/will be MIRed...)

Changed in ansible-core (Debian):
importance: Undecided → Unknown
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ansible-core - 2.16.3-0ubuntu1

---------------
ansible-core (2.16.3-0ubuntu1) noble; urgency=medium

  * New upstream version 2.16.3:
    - deb822 repository support (Closes: #1057640)
    - Python 3.12 support (Closes: #1061782, LP: #2052530)
  * Refresh patches

 -- Simon Chopin <email address hidden> Wed, 07 Feb 2024 10:35:46 +0100

Changed in ansible-core (Ubuntu):
status: New → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Right now tests are failing on armhf and arm64. This seems to be the failure:
1357s ________________________ test_start_daemon_with_no_mock ________________________
1357s [gw5] linux -- Python 3.12.2 /usr/bin/python3
1357s
1357s tmp_path = PosixPath('/tmp/pytest-of-ubuntu/pytest-11/popen-gw5/test_start_daemon_with_no_mock0')
1357s
1357s def test_start_daemon_with_no_mock(tmp_path):
1357s # This is an ugly fix to get this to pass in CI
1357s p = Path.cwd().parents
1357s sys.path.insert(0, str(p[2]))
1357s my_socket = tmp_path / "socket"
1357s turbo_socket = turbo_common.AnsibleTurboSocket(socket_path=str(my_socket), ttl=1)
1357s assert turbo_socket.start_server()
1357s time.sleep(0.5)
1357s assert my_socket.is_socket()
1357s time.sleep(0.8)
1357s > assert not my_socket.exists()
1357s E AssertionError: assert not True
1357s E + where True = <bound method Path.exists of PosixPath('/tmp/pytest-of-ubuntu/pytest-11/popen-gw5/test_start_daemon_with_no_mock0/socket')>()
1357s E + where <bound method Path.exists of PosixPath('/tmp/pytest-of-ubuntu/pytest-11/popen-gw5/test_start_daemon_with_no_mock0/socket')> = PosixPath('/tmp/pytest-of-ubuntu/pytest-11/popen-gw5/test_start_daemon_with_no_mock0/socket').exists
1357s
1357s tests/unit/plugins/module_utils/turbo/test_turbo_module.py:92: AssertionError
1357s - generated xml file: /tmp/autopkgtest.L4z3bs/build.GQa/src/ansible_collections/cloud/common/tests/output/junit/python3.12-module_utils-units.xml -
1357s =========================== short test summary info ============================
1357s FAILED tests/unit/plugins/module_utils/turbo/test_turbo_module.py::test_start_daemon_with_no_mock

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Notes: check if everything from https://github.com/ansible/ansible/issues/80426 is present in our packages

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ansible - 9.2.0+dfsg-0ubuntu4

---------------
ansible (9.2.0+dfsg-0ubuntu4) noble; urgency=medium

  * d/tests:
    - set HOME to a writeable directory
    - always run all test cases
  * Suggest python3-jsonschema for jsonschema validate plugin
  * Add patches to replace deprecated assertion methods for
    Python 3.12 compatibility (Closes: #1061781, LP: #2052530)

ansible (9.2.0+dfsg-0ubuntu3) noble; urgency=medium

  * Fix more test cases for Python 3.12.

ansible (9.2.0+dfsg-0ubuntu1) noble; urgency=medium

  * New upstream release
    - Bump the watchfile to the major 9 series
    - Adds compatibility with Python 3.12 (Closes: #1061781, LP: #2052530)
    - d/control: bump dependency to latest ansible-core
    - Drop patches applied upstream:
      - d/p/0001-fix-libvirt-connection-plugin-warning.patch
      - d/p/0002-fix-libvirt-encoding-errors-on-windows-guests.patch
  * d/tests: Add some more tests to the autopkgtest suite, remove broken ones

 -- Benjamin Drung <email address hidden> Wed, 21 Feb 2024 12:07:32 +0100

Changed in ansible (Ubuntu):
status: New → Fix Released
Changed in ansible-core (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.