Skip to content

Commit e0de4d3

Browse files
authored
Merge pull request #1386 from moreati/issue1237
Tidy ups
2 parents fb9efb2 + 64a581b commit e0de4d3

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

ansible_mitogen/target.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import grp
4141
import json
4242
import logging
43-
import operator
4443
import os
4544
import pty
4645
import pwd
@@ -66,8 +65,6 @@
6665

6766
import ansible.module_utils.json_utils
6867

69-
from ansible.module_utils.six.moves import reduce
70-
7168
import ansible_mitogen.runner
7269

7370

@@ -718,7 +715,9 @@ def apply_mode_spec(spec, mode):
718715
mask = CHMOD_MASKS[ch]
719716
bits = CHMOD_BITS[ch]
720717
cur_perm_bits = mode & mask
721-
new_perm_bits = reduce(operator.or_, (bits[p] for p in perms), 0)
718+
new_perm_bits = 0
719+
for perm in perms:
720+
new_perm_bits |= bits[perm]
722721
mode &= ~mask
723722
if op == '=':
724723
mode |= new_perm_bits

docs/ansible_detailed.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ Noteworthy Differences
145145
+-----------------+ 3.11 - 3.14 |
146146
| 12 | |
147147
+-----------------+-----------------+
148+
| 13 | 3.12 - 3.14 |
149+
+-----------------+-----------------+
148150

149151
Verify your installation is running one of these versions by checking
150152
``ansible --version`` output.

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ To avail of fixes in an unreleased version, please download a ZIP file
2121
In progress (unreleased)
2222
------------------------
2323

24+
* :gh:issue:`1237` :mod:`mitogen`: Re-declare Python 2.4 compatibility
25+
* :gh:issue:`1385` :mod:`ansible_mitogen`: Remove a use of
26+
``ansible.module_utils.six``
27+
* :gh:issue:`1354` docs: Document Ansible 13 (ansible-core 2.20) support
28+
2429

2530
v0.3.35 (2025-12-01)
2631
--------------------

docs/index.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,16 @@ a large fleet of machines, or to alert the parent of unexpected state changes.
332332
Compatibility
333333
#############
334334

335-
Mitogen is compatible with **Python 2.4** released November 2004, making it
335+
``mitogen.*`` is compatible with Python 2.4 - 2.7 and 3.6 onward; making it
336336
suitable for managing a fleet of potentially ancient corporate hardware, such
337337
as Red Hat Enterprise Linux 5, released in 2007.
338338

339-
Every combination of Python 3.x/2.x parent and child should be possible,
340-
however at present only Python 2.4, 2.6, 2.7 and 3.6 are tested automatically.
339+
Every combination of Python 3.x/2.x parent and child should be possible.
340+
Automated testing cannot cover every combination, automated testing tries to
341+
cover the extemities (e.g. Python 3.14 parent -> Python 2.4 child).
342+
343+
``ansible_mitogen.*`` is compatible with Python 2.7 and 3.6 onward; making it
344+
suitable for Ansible 2.10 onward.
341345

342346

343347
Zero Dependencies

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def long_description():
8282
license = 'BSD-3-Clause',
8383
url = 'https://github.com/mitogen-hq/mitogen/',
8484
packages = find_packages(exclude=['tests', 'examples']),
85-
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
85+
python_requires='>=2.4, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
8686
zip_safe = False,
8787
classifiers = [
8888
'Environment :: Console',
@@ -91,6 +91,9 @@ def long_description():
9191
'Operating System :: MacOS :: MacOS X',
9292
'Operating System :: POSIX',
9393
'Programming Language :: Python',
94+
'Programming Language :: Python :: 2.4',
95+
'Programming Language :: Python :: 2.5',
96+
'Programming Language :: Python :: 2.6',
9497
'Programming Language :: Python :: 2.7',
9598
'Programming Language :: Python :: 3',
9699
'Programming Language :: Python :: 3.6',

tests/image_prep/hosts.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ centos7
4343
centos8
4444
debian9
4545
debian10
46+
ubuntu1604
4647
ubuntu1804
4748

4849
[ansible_11]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ envlist =
6363
py{27,36}-m_ans-ans{2.10,3,4}
6464
py{311}-m_ans-ans{2.10,3-5}
6565
py{313}-m_ans-ans{6-9}
66-
py{314}-m_ans-ans{10-12}
66+
py{314}-m_ans-ans{10-13}
6767
py{27,36,314}-m_mtg
6868
report,
6969

0 commit comments

Comments
 (0)