Skip to content
Snippets Groups Projects
Commit d75c6cb9 authored by Stefano Rivera's avatar Stefano Rivera
Browse files

Patch: Handle the removal of ansible.parsing.utils.jsonify (Closes: #1103652)

parent c6d641a8
No related branches found
No related tags found
No related merge requests found
python-mitogen (0.3.22-4) UNRELEASED; urgency=medium
* Forward Ansible 2.19 patches.
* Patch: Handle the removal of ansible.parsing.utils.jsonify
(Closes: #1103652)
-- Stefano Rivera <stefanor@debian.org> Sun, 20 Apr 2025 11:06:00 -0400
......
From: Stefano Rivera <stefanor@debian.org>
Date: Sun, 20 Apr 2025 11:04:34 -0400
Subject: Handle the removal of ansible.parsing.utils.jsonify in ansible-core
2.19
Bug-Debian: https://bugs.debian.org/1103652
Bug-Upstream: https://github.com/mitogen-hq/mitogen/issues/1258
Forwarded: https://github.com/mitogen-hq/mitogen/pull/1259
---
ansible_mitogen/mixins.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ansible_mitogen/mixins.py b/ansible_mitogen/mixins.py
index dadf2c1..c79bf10 100644
--- a/ansible_mitogen/mixins.py
+++ b/ansible_mitogen/mixins.py
@@ -29,6 +29,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
+import json
import logging
import os
import pwd
@@ -42,7 +43,6 @@ import ansible.vars.clean
from ansible.module_utils.common.text.converters import to_bytes, to_text
from ansible.module_utils.six.moves import shlex_quote
-from ansible.parsing.utils.jsonify import jsonify
import mitogen.core
import mitogen.select
@@ -220,7 +220,7 @@ class ActionModuleMixin(ansible.plugins.action.ActionBase):
action module, and probably others.
"""
if isinstance(data, dict):
- data = jsonify(data)
+ data = json.dumps(data)
if not isinstance(data, bytes):
data = to_bytes(data, errors='surrogate_or_strict')
......@@ -5,3 +5,4 @@ skip-django-tests
skip-python2.7-test
edit-ansible-version-restrictions
workaround-missing-strip-unsafe
replace-jsonify
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment