public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Maxwell G <maxwell@gtmx.me>
To: git-commits@fedoraproject.org
Subject: [rpms/ansible-collection-community-docker] epel10: Fix FTBFS. Closes rhbz#2215512.
Date: Tue, 10 Nov 2026 21:12:05 GMT	[thread overview]
Message-ID: <179434512532.1.4224190432228748553.rpms-ansible-collection-community-docker-f4dcc0d58499@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/ansible-collection-community-docker
Branch : epel10
Commit : f4dcc0d58499079b0cd1048888dc99aede9c4034
Author : Maxwell G <maxwell@gtmx.me>
Date   : 2023-07-25T20:15:25+00:00
Stats  : +72/-1 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/ansible-collection-community-docker/c/f4dcc0d58499079b0cd1048888dc99aede9c4034?branch=epel10

Log:
Fix FTBFS. Closes rhbz#2215512.

---
diff --git a/ansible-collection-community-docker.spec b/ansible-collection-community-docker.spec
index 0edd78c..dc52d12 100644
--- a/ansible-collection-community-docker.spec
+++ b/ansible-collection-community-docker.spec
@@ -9,7 +9,7 @@
 
 Name:           ansible-collection-community-docker
 Version:        3.4.6
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Ansible modules and plugins for working with Docker
 
 # All files are GPL-3.0-or-later, except the following files, which are originally
@@ -65,6 +65,8 @@ URL:            %{ansible_collection_url community docker}
 %global forgeurl https://github.com/ansible-collections/community.docker
 Source0:        %{forgeurl}/archive/%{version}/community.docker-%{version}.tar.gz
 Patch0:         build_ignore-unnecessary-files.patch
+Patch1:         tests-import-match_hostname-from-urllib3.patch
+Patch2:         tests-remove-usage-of-deprecated-TestCase-methods.patch
 
 BuildArch:      noarch
 
@@ -109,6 +111,9 @@ find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{
 
 
 %changelog
+* Tue Jul 25 2023 Maxwell G <maxwell@gtmx.me> - 3.4.6-3
+- Fix FTBFS. Closes rhbz#2215512.
+
 * Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.6-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
 

diff --git a/tests-import-match_hostname-from-urllib3.patch b/tests-import-match_hostname-from-urllib3.patch
new file mode 100644
index 0000000..6a75571
--- /dev/null
+++ b/tests-import-match_hostname-from-urllib3.patch
@@ -0,0 +1,35 @@
+From b1c9a7ae922667742a1bb0dcce89ac372512d91a Mon Sep 17 00:00:00 2001
+From: Maxwell G <maxwell@gtmx.me>
+Date: Tue, 25 Jul 2023 20:11:11 +0000
+Subject: [PATCH] tests: import match_hostname() from urllib3
+
+It's been removed from the ssl module in Python 3.12.
+---
+ .../module_utils/_api/transport/test_ssladapter.py    | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py b/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py
+index 428163e..751b896 100644
+--- a/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py
++++ b/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py
+@@ -25,9 +25,14 @@ try:
+         match_hostname, CertificateError
+     )
+ except ImportError:
+-    from ssl import (
+-        match_hostname, CertificateError
+-    )
++    try:
++        from ssl import (
++            match_hostname, CertificateError
++        )
++    except ImportError:
++        from urllib3.util.ssl_match_hostname import (
++            match_hostname, CertificateError
++        )
+ 
+ try:
+     from ssl import OP_NO_SSLv3, OP_NO_SSLv2, OP_NO_TLSv1
+-- 
+2.41.0
+

diff --git a/tests-remove-usage-of-deprecated-TestCase-methods.patch b/tests-remove-usage-of-deprecated-TestCase-methods.patch
new file mode 100644
index 0000000..c305ef4
--- /dev/null
+++ b/tests-remove-usage-of-deprecated-TestCase-methods.patch
@@ -0,0 +1,31 @@
+From 076a13403c41f7f509403398d0e3dd24d7f7df82 Mon Sep 17 00:00:00 2001
+From: Maxwell G <maxwell@gtmx.me>
+Date: Tue, 25 Jul 2023 20:14:49 +0000
+Subject: [PATCH] tests: remove usage of deprecated TestCase methods
+
+---
+ tests/unit/plugins/connection/test_docker.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/unit/plugins/connection/test_docker.py b/tests/unit/plugins/connection/test_docker.py
+index 5ae6a8e..12a67ee 100644
+--- a/tests/unit/plugins/connection/test_docker.py
++++ b/tests/unit/plugins/connection/test_docker.py
+@@ -36,7 +36,7 @@ class TestDockerConnectionClass(unittest.TestCase):
+     def test_docker_connection_module_too_old(self, mock_new_docker_verison, mock_old_docker_version):
+         self.dc._version = None
+         self.dc.remote_user = 'foo'
+-        self.assertRaisesRegexp(AnsibleError, '^docker connection type requires docker 1.3 or higher$', self.dc._get_actual_user)
++        self.assertRaisesRegex(AnsibleError, '^docker connection type requires docker 1.3 or higher$', self.dc._get_actual_user)
+ 
+     @mock.patch('ansible_collections.community.docker.plugins.connection.docker.Connection._old_docker_version',
+                 return_value=('false', 'garbage', '', 1))
+@@ -54,4 +54,4 @@ class TestDockerConnectionClass(unittest.TestCase):
+     def test_docker_connection_module_wrong_cmd(self, mock_new_docker_version, mock_old_docker_version):
+         self.dc._version = None
+         self.dc.remote_user = 'foo'
+-        self.assertRaisesRegexp(AnsibleError, '^Docker version check (.*?) failed: ', self.dc._get_actual_user)
++        self.assertRaisesRegex(AnsibleError, '^Docker version check (.*?) failed: ', self.dc._get_actual_user)
+-- 
+2.41.0
+

                 reply	other threads:[~2026-11-10 21:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179434512532.1.4224190432228748553.rpms-ansible-collection-community-docker-f4dcc0d58499@fedoraproject.org \
    --to=maxwell@gtmx.me \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox