Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python-mitogen
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Python Team
packages
python-mitogen
Commits
56a1a00e
Verified
Commit
56a1a00e
authored
3 weeks ago
by
Unit 193
Browse files
Options
Downloads
Patches
Plain Diff
d/p/ansible-12-data-tagging: Add patch to fix more compatibility problems.
Closes: #1103652
parent
46b3105b
No related branches found
No related tags found
No related merge requests found
Pipeline
#862692
passed
3 weeks ago
Stage: provisioning
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/ansible-12-data-tagging
+65
-0
65 additions, 0 deletions
debian/patches/ansible-12-data-tagging
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
66 additions
and
0 deletions
debian/patches/ansible-12-data-tagging
0 → 100644
+
65
−
0
View file @
56a1a00e
From: Claude Becker <becker@phys.ethz.ch>
Date: Thu, 24 Apr 2025 09:09:20 +0200
Subject: Ugly patch for ansible 12 data tagging
---
ansible_mitogen/mixins.py | 23 ++++++++++++++---------
ansible_mitogen/runner.py | 3 +++
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/ansible_mitogen/mixins.py b/ansible_mitogen/mixins.py
index c79bf10..4039078 100644
--- a/ansible_mitogen/mixins.py
+++ b/ansible_mitogen/mixins.py
@@ -402,15 +402,16 @@
class ActionModuleMixin(ansible.plugins.action.ActionBase):
if not self._mitogen_rediscovered_interpreter:
result['ansible_facts'][self._discovered_interpreter_key] = self._discovered_interpreter
- if self._discovery_warnings:
- if result.get('warnings') is None:
- result['warnings'] = []
- result['warnings'].extend(self._discovery_warnings)
+ if ansible_mitogen.utils.ansible_version[:2] < (2, 19):
+ if self._discovery_warnings:
+ if result.get('warnings') is None:
+ result['warnings'] = []
+ result['warnings'].extend(self._discovery_warnings)
- if self._discovery_deprecation_warnings:
- if result.get('deprecations') is None:
- result['deprecations'] = []
- result['deprecations'].extend(self._discovery_deprecation_warnings)
+ if self._discovery_deprecation_warnings:
+ if result.get('deprecations') is None:
+ result['deprecations'] = []
+ result['deprecations'].extend(self._discovery_deprecation_warnings)
return ansible.utils.unsafe_proxy.wrap_var(result)
@@ -429,7 +430,11 @@
class ActionModuleMixin(ansible.plugins.action.ActionBase):
"stderr": "stderr data"
}
"""
- data = self._parse_returned_data(result)
+ if ansible_mitogen.utils.ansible_version[:2] >= (2, 19):
+ # Pass legacy serialization profile to Ansible 2.19+
+ data = self._parse_returned_data(result, 'legacy')
+ else:
+ data = self._parse_returned_data(result)
# Cutpasted from the base implementation.
if 'stdout' in data and 'stdout_lines' not in data:
diff --git a/ansible_mitogen/runner.py b/ansible_mitogen/runner.py
index b60e537..be54afa 100644
--- a/ansible_mitogen/runner.py
+++ b/ansible_mitogen/runner.py
@@ -76,6 +76,9 @@
except ImportError:
import ansible.module_utils.basic
ansible.module_utils.basic._ANSIBLE_ARGS = '{}'
+# Ugly patch for ansible data tagging https://github.com/ansible/ansible/pull/84621
+ansible.module_utils.basic._ANSIBLE_PROFILE = 'legacy'
+
# For tasks that modify /etc/resolv.conf, non-Debian derivative glibcs cache
# resolv.conf at startup and never implicitly reload it. Cope with that via an
# explicit call to res_init() on each task invocation. BSD-alikes export it
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
56a1a00e
...
...
@@ -6,3 +6,4 @@ skip-python2.7-test
edit-ansible-version-restrictions
workaround-missing-strip-unsafe
replace-jsonify
ansible-12-data-tagging
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment