Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-podman for openSUSE:Factory checked in at 2022-02-22 21:18:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-podman (Old) and /work/SRC/openSUSE:Factory/.python-podman.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-podman" Tue Feb 22 21:18:10 2022 rev:4 rq:956620 version:3.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-podman/python-podman.changes 2021-06-01 10:38:41.120938039 +0200 +++ /work/SRC/openSUSE:Factory/.python-podman.new.1958/python-podman.changes 2022-02-22 21:18:46.814292724 +0100 @@ -1,0 +2,23 @@ +Mon Feb 21 08:55:25 UTC 2022 - Dirk M??ller <dmuel...@suse.com> + +- update to 3.2.1: + * Update packaging + * Update CI to support testing against released and main podman branches + * Cleanup CI configuration + * Bug fixes + * Bug fixes and updates to make API more complete + * Update dependency checking + * PodmanClient() now supports service addresses using ssh:// and tcp:// + schemes. The keyword connection has been added, using its value as a key + into the connections that have been defined in + XDG_CONFIG_DIR/containers/containers.cfg. The podman system connection is + used to curate connections. + * docstrings were cleaned up to aid in future sphinx generated documentation. + * ssh:// service addresses are supported by the use of an external ssh client. + * tcp:// connections are not secure. + * PodmanClient() introduces docker-py functionality, while additionally + allowing access to Podman unique functionality such as Pods. + * Note: APIConnection() and it's support classes will be deprecated. +- add python310.patch: support python 3.10 + +------------------------------------------------------------------- Old: ---- podman-1.6.0.tar.gz New: ---- _multibuild podman-3.2.1.tar.gz python310.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-podman.spec ++++++ --- /var/tmp/diff_new_pack.M8Afan/_old 2022-02-22 21:18:47.362292824 +0100 +++ /var/tmp/diff_new_pack.M8Afan/_new 2022-02-22 21:18:47.366292825 +0100 @@ -1,7 +1,7 @@ # -# spec file for package python-podman +# spec file # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,56 +16,84 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-podman -Version: 1.6.0 +%{?!python_module:%define python_module() python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-podman%{psuffix} +Version: 3.2.1 Release: 0 Summary: A library to interact with a Podman server License: Apache-2.0 Group: Development/Languages/Python -URL: https://github.com/containers/python-podman -Source: https://files.pythonhosted.org/packages/source/p/podman/podman-%{version}.tar.gz +URL: https://github.com/containers/podman-py +Source: https://github.com/containers/podman-py/archive/refs/tags/v%{version}.tar.gz#/podman-%{version}.tar.gz +# PATCH-FIX-UPSTREAM: https://github.com/containers/podman-py/pull/154.patch +Patch1: python310.patch BuildRequires: %{python_module pbr} +BuildRequires: %{python_module pytoml} +BuildRequires: %{python_module pyxdg} +BuildRequires: %{python_module requests} BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-psutil +Requires: python-python-dateutil +Requires: python-requests +Requires: python-setuptools >= 39 +Requires: python-varlink +Suggests: python-fixtures +Suggests: python-pbr +Suggests: python-pytoml +Suggests: python-pyxdg +BuildArch: noarch +%if %{with test} # SECTION test requirements +BuildRequires: %{python_module fixtures} BuildRequires: %{python_module flake8} +BuildRequires: %{python_module podman >= %{version}} BuildRequires: %{python_module psutil} BuildRequires: %{python_module python-dateutil} +BuildRequires: %{python_module requests-mock} BuildRequires: %{python_module setuptools >= 39} BuildRequires: %{python_module varlink} BuildRequires: %{python_module wheel} # /SECTION -BuildRequires: fdupes -Requires: python-psutil -Requires: python-python-dateutil -Requires: python-setuptools >= 39 -Requires: python-varlink -Suggests: python-fixtures -Suggests: python-pbr -BuildArch: noarch - +%endif %python_subpackages %description A library to interact with a Podman server %prep -%setup -q -n podman-%{version} +%setup -q -n podman-py-%{version} +%patch1 -p1 %build %python_build +%if !%{with test} %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif +%if %{with test} %check -%pyunittest discover -v tests/ +rm -rvf podman/tests/integration +%pyunittest discover -v podman/tests/ +%endif +%if !%{with test} %files %{python_files} -%doc AUTHORS CHANGES.txt ChangeLog README.md +%doc README.md %license LICENSE %{python_sitelib}/* +%endif %changelog ++++++ _multibuild ++++++ <multibuild> <package>test</package> </multibuild> ++++++ podman-1.6.0.tar.gz -> podman-3.2.1.tar.gz ++++++ ++++ 20366 lines of diff (skipped) ++++++ python310.patch ++++++ >From 3de1796a9acb9864ff0f79fac63edb74e8b94242 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" <jonathan.underw...@gmail.com> Date: Sat, 25 Dec 2021 13:07:01 +0000 Subject: [PATCH 1/6] Import Iterator/Iterable from collections.abc for Python >= 3.10 --- podman/tests/integration/test_containers.py | 7 ++++++- podman/tests/unit/test_build.py | 7 ++++++- podman/tests/unit/test_container.py | 7 ++++++- podman/tests/unit/test_containersmanager.py | 7 ++++++- podman/tests/unit/test_imagesmanager.py | 7 ++++++- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/podman/tests/integration/test_containers.py b/podman/tests/integration/test_containers.py index 1283735..b8f9955 100644 --- a/podman/tests/integration/test_containers.py +++ b/podman/tests/integration/test_containers.py @@ -2,7 +2,12 @@ import random import tarfile import unittest -from collections import Iterator +try: + # Python >= 3.10 + from collections.abc import Iterator +except: + # Python < 3.10 + from collections import Iterator import podman.tests.integration.base as base from podman import PodmanClient diff --git a/podman/tests/unit/test_build.py b/podman/tests/unit/test_build.py index 96f8f52..d4c26bc 100644 --- a/podman/tests/unit/test_build.py +++ b/podman/tests/unit/test_build.py @@ -1,7 +1,12 @@ import io import json import unittest -from collections import Iterable +try: + # Python >= 3.10 + from collections.abc import Iterable +except: + # Python < 3.10 + from collections import Iterable from unittest.mock import patch import requests_mock diff --git a/podman/tests/unit/test_container.py b/podman/tests/unit/test_container.py index d114853..8521777 100644 --- a/podman/tests/unit/test_container.py +++ b/podman/tests/unit/test_container.py @@ -2,7 +2,12 @@ import io import json import unittest -from collections import Iterable +try: + # Python >= 3.10 + from collections.abc import Iterable +except: + # Python < 3.10 + from collections import Iterable import requests_mock diff --git a/podman/tests/unit/test_containersmanager.py b/podman/tests/unit/test_containersmanager.py index 71ad093..4932823 100644 --- a/podman/tests/unit/test_containersmanager.py +++ b/podman/tests/unit/test_containersmanager.py @@ -1,5 +1,10 @@ import unittest -from collections import Iterator +try: + # Python >= 3.10 + from collections.abc import Iterator +except: + # Python < 3.10 + from collections import Iterator from unittest.mock import patch, DEFAULT import requests_mock diff --git a/podman/tests/unit/test_imagesmanager.py b/podman/tests/unit/test_imagesmanager.py index 2398b6a..eca629a 100644 --- a/podman/tests/unit/test_imagesmanager.py +++ b/podman/tests/unit/test_imagesmanager.py @@ -1,6 +1,11 @@ import types import unittest -from collections import Iterable +try: + # Python >= 3.10 + from collections.abc import Iterable +except: + # Python < 3.10 + from collections import Iterable import requests_mock >From d1f4a6a0c095c3b9665c4f4d2fa492036094db80 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" <jonathan.underw...@gmail.com> Date: Sun, 26 Dec 2021 19:17:07 +0000 Subject: [PATCH 2/6] Fix incorrect patching of open() in tests The tests for prepare_containerignore incorrectly patch the io.open() function. Since prepare_containerignore calls the open instance method on a pathlib.Path object, we patch pathlib.Path.open() instead. Patching io.open() worked when the tests were run under nose, but not under pytest. With this change the tests work under both. --- podman/tests/unit/test_api_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/podman/tests/unit/test_api_utils.py b/podman/tests/unit/test_api_utils.py index 321c2cf..6867df8 100644 --- a/podman/tests/unit/test_api_utils.py +++ b/podman/tests/unit/test_api_utils.py @@ -65,7 +65,7 @@ def test_containerignore_read(self, patch_exists): **/*.class """ - with mock.patch("io.open", mock_open(read_data=data)): + with mock.patch("pathlib.Path.open", mock_open(read_data=data)): actual = api.prepare_containerignore(".") self.assertListEqual( @@ -79,7 +79,7 @@ def test_containerignore_empty(self, patch_exists): """ patch_exists.return_value = True - with mock.patch("io.open", mock_open(read_data=data)): + with mock.patch("pathlib.Path.open", mock_open(read_data=data)): actual = api.prepare_containerignore(".") self.assertListEqual(actual, []) >From e4888e967c7fe34dec25cd3a2059d445a0a10809 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" <jonathan.underw...@gmail.com> Date: Sun, 26 Dec 2021 20:35:43 +0000 Subject: [PATCH 6/6] Add Python 3.10 to setup.cfg metadata --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 74eb984..f2c3d1f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,6 +23,7 @@ classifiers = Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Topic :: Software Development :: Libraries :: Python Modules keywords = podman, libpod