From b105877f4d041bb92435561418c01dd656a5bff0 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Tue, 2 Dec 2025 12:58:39 +0000 Subject: [PATCH 1/4] mitogen: Re-declare Python 2.4 compatibility With CentOS 5 now covered by the Mitogen unit tests I'm content to reverse/clarify 104865e86632429c9c7408e7c6b14ab35ef43067 --- docs/changelog.rst | 1 + docs/index.rst | 10 +++++++--- setup.py | 5 ++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 4ffab849..c8e9c59d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -21,6 +21,7 @@ To avail of fixes in an unreleased version, please download a ZIP file In progress (unreleased) ------------------------ +* :gh:issue:`1237` :mod:`mitogen`: Re-declare Python 2.4 compatibility v0.3.35 (2025-12-01) -------------------- diff --git a/docs/index.rst b/docs/index.rst index 32083db0..220a7fff 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -332,12 +332,16 @@ a large fleet of machines, or to alert the parent of unexpected state changes. Compatibility ############# -Mitogen is compatible with **Python 2.4** released November 2004, making it +``mitogen.*`` is compatible with Python 2.4 - 2.7 and 3.6 onward; making it suitable for managing a fleet of potentially ancient corporate hardware, such as Red Hat Enterprise Linux 5, released in 2007. -Every combination of Python 3.x/2.x parent and child should be possible, -however at present only Python 2.4, 2.6, 2.7 and 3.6 are tested automatically. +Every combination of Python 3.x/2.x parent and child should be possible. +Automated testing cannot cover every combination, automated testing tries to +cover the extemities (e.g. Python 3.14 parent -> Python 2.4 child). + +``ansible_mitogen.*`` is compatible with Python 2.7 and 3.6 onward; making it +suitable for Ansible 2.10 onward. Zero Dependencies diff --git a/setup.py b/setup.py index ad60847e..047b7e86 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ setup( license = 'BSD-3-Clause', url = 'https://github.com/mitogen-hq/mitogen/', packages = find_packages(exclude=['tests', 'examples']), - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*', + python_requires='>=2.4, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*', zip_safe = False, classifiers = [ 'Environment :: Console', @@ -91,6 +91,9 @@ setup( 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX', 'Programming Language :: Python', + 'Programming Language :: Python :: 2.4', + 'Programming Language :: Python :: 2.5', + 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', From 9b4688247872ae7dcf1b13d760559efd6ff548fd Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Tue, 2 Dec 2025 12:59:58 +0000 Subject: [PATCH 2/4] ansible_mitogen: Remove a use of ansible.module_utils.six --- ansible_mitogen/target.py | 7 +++---- docs/changelog.rst | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible_mitogen/target.py b/ansible_mitogen/target.py index 6e128af4..199f3a14 100644 --- a/ansible_mitogen/target.py +++ b/ansible_mitogen/target.py @@ -40,7 +40,6 @@ import errno import grp import json import logging -import operator import os import pty import pwd @@ -66,8 +65,6 @@ if not sys.modules.get(str('__main__')): import ansible.module_utils.json_utils -from ansible.module_utils.six.moves import reduce - import ansible_mitogen.runner @@ -718,7 +715,9 @@ def apply_mode_spec(spec, mode): mask = CHMOD_MASKS[ch] bits = CHMOD_BITS[ch] cur_perm_bits = mode & mask - new_perm_bits = reduce(operator.or_, (bits[p] for p in perms), 0) + new_perm_bits = 0 + for perm in perms: + new_perm_bits |= bits[perm] mode &= ~mask if op == '=': mode |= new_perm_bits diff --git a/docs/changelog.rst b/docs/changelog.rst index c8e9c59d..ce87cb01 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -22,6 +22,8 @@ In progress (unreleased) ------------------------ * :gh:issue:`1237` :mod:`mitogen`: Re-declare Python 2.4 compatibility +* :gh:issue:`1385` :mod:`ansible_mitogen`: Remove a use of + ``ansible.module_utils.six`` v0.3.35 (2025-12-01) -------------------- From 823d1d8b47a07bff7a7323b358e53538f9dc3946 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Tue, 2 Dec 2025 13:00:46 +0000 Subject: [PATCH 3/4] docs: Document Ansible 13 (ansible-core 2.20) support --- docs/ansible_detailed.rst | 2 ++ docs/changelog.rst | 2 ++ tox.ini | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/ansible_detailed.rst b/docs/ansible_detailed.rst index e692c43a..ff5f9dcb 100644 --- a/docs/ansible_detailed.rst +++ b/docs/ansible_detailed.rst @@ -145,6 +145,8 @@ Noteworthy Differences +-----------------+ 3.11 - 3.14 | | 12 | | +-----------------+-----------------+ + | 13 | 3.12 - 3.14 | + +-----------------+-----------------+ Verify your installation is running one of these versions by checking ``ansible --version`` output. diff --git a/docs/changelog.rst b/docs/changelog.rst index ce87cb01..7b02c56e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -24,6 +24,8 @@ In progress (unreleased) * :gh:issue:`1237` :mod:`mitogen`: Re-declare Python 2.4 compatibility * :gh:issue:`1385` :mod:`ansible_mitogen`: Remove a use of ``ansible.module_utils.six`` +* :gh:issue:`1354` docs: Document Ansible 13 (ansible-core 2.20) support + v0.3.35 (2025-12-01) -------------------- diff --git a/tox.ini b/tox.ini index 28c97496..3ef977ac 100644 --- a/tox.ini +++ b/tox.ini @@ -63,7 +63,7 @@ envlist = py{27,36}-m_ans-ans{2.10,3,4} py{311}-m_ans-ans{2.10,3-5} py{313}-m_ans-ans{6-9} - py{314}-m_ans-ans{10-12} + py{314}-m_ans-ans{10-13} py{27,36,314}-m_mtg report, From 64a581b2aced72b07d905fb5a4a9da6ba7815825 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Tue, 2 Dec 2025 13:06:05 +0000 Subject: [PATCH 4/4] tests: Add Ubuntu 16.04 to image_prep inventory I missed this when committing what built 2025.02 iamges --- tests/image_prep/hosts.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/image_prep/hosts.ini b/tests/image_prep/hosts.ini index 254643a7..0c57e914 100644 --- a/tests/image_prep/hosts.ini +++ b/tests/image_prep/hosts.ini @@ -43,6 +43,7 @@ centos7 centos8 debian9 debian10 +ubuntu1604 ubuntu1804 [ansible_11]