From 31966e90a44b60d6b82a9961b4e3bd50976b7a7c Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 19 May 2022 07:07:46 +0200 Subject: [PATCH] Avoid breakage with Python 3.13. (#354) (#355) (cherry picked from commit fb55b1d780f9202e38b10b1d96ec18dd624a201f) Co-authored-by: Felix Fontein --- changelogs/fragments/354-remove-dead-code.yml | 2 ++ plugins/modules/docker_container.py | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) create mode 100644 changelogs/fragments/354-remove-dead-code.yml diff --git a/changelogs/fragments/354-remove-dead-code.yml b/changelogs/fragments/354-remove-dead-code.yml new file mode 100644 index 00000000..d2addf5c --- /dev/null +++ b/changelogs/fragments/354-remove-dead-code.yml @@ -0,0 +1,2 @@ +bugfixes: + - "docker_container - remove unused code that will cause problems with Python 3.13 (https://github.com/ansible-collections/community.docker/pull/354)." diff --git a/plugins/modules/docker_container.py b/plugins/modules/docker_container.py index 5002a1c2..6f310477 100644 --- a/plugins/modules/docker_container.py +++ b/plugins/modules/docker_container.py @@ -1209,7 +1209,6 @@ status: ''' import os -import pipes import re import shlex import traceback @@ -1249,14 +1248,6 @@ except Exception: pass -def shell_join(parts): - if getattr(shlex, 'quote', None): - quote = shlex.quote - else: - quote = pipes.quote - return ' '.join([quote(part) for part in parts]) - - REQUIRES_CONVERSION_TO_BYTES = [ 'kernel_memory', 'memory',