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-11-01 13:42:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-podman (Old)
and /work/SRC/openSUSE:Factory/.python-podman.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-podman"
Tue Nov 1 13:42:14 2022 rev:7 rq:1032499 version:4.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-podman/python-podman.changes 2022-08-16 17:07:52.755902422 +0200
+++ /work/SRC/openSUSE:Factory/.python-podman.new.2275/python-podman.changes 2022-11-01 13:42:24.779846534 +0100
@@ -1,0 +2,12 @@
+Fri Oct 28 19:54:33 UTC 2022 - Yogalakshmi Arunachalam
+
+- Update to 4.3.0
+ * Add pass-through layers, output and outputformat to building images
+ * Support passing of interval and condition in podman wait calls
+ * Implement podman image scp
+ * Update supported python versions
+ * Add support of passing empty strings in second
+ * Add support for on failure actions in healthchecks
+ * Bug fixes
+
+-------------------------------------------------------------------
Old:
----
podman-4.2.0.tar.gz
New:
----
podman-4.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-podman.spec ++++++
--- /var/tmp/diff_new_pack.Zc9KGL/_old 2022-11-01 13:42:27.523861132 +0100
+++ /var/tmp/diff_new_pack.Zc9KGL/_new 2022-11-01 13:42:27.531861175 +0100
@@ -27,7 +27,7 @@
%bcond_with test
%endif
Name: python-podman%{psuffix}
-Version: 4.2.0
+Version: 4.3.0
Release: 0
Summary: A library to interact with a Podman server
License: Apache-2.0
++++++ podman-4.2.0.tar.gz -> podman-4.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/Makefile new/podman-py-4.3.0/Makefile
--- old/podman-py-4.2.0/Makefile 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/Makefile 2022-10-19 23:32:04.000000000 +0200
@@ -8,7 +8,7 @@
EPOCH_TEST_COMMIT ?= $(shell git merge-base $${DEST_BRANCH:-main} HEAD)
HEAD ?= HEAD
-export PODMAN_VERSION ?= "4.2.0"
+export PODMAN_VERSION ?= "4.3.0"
.PHONY: podman
podman:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/api/http_utils.py new/podman-py-4.3.0/podman/api/http_utils.py
--- old/podman-py-4.2.0/podman/api/http_utils.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/api/http_utils.py 2022-10-19 23:32:04.000000000 +0200
@@ -66,26 +66,33 @@
return json.dumps(body, sort_keys=True)
-def _filter_values(mapping: Mapping[str, Any]) -> Dict[str, Any]:
+def _filter_values(mapping: Mapping[str, Any], recursion=False) -> Dict[str, Any]:
"""Returns a canonical dictionary with values == None or empty Iterables removed.
Dictionary is walked using recursion.
"""
canonical = {}
+
for key, value in mapping.items():
# quick filter if possible...
- if value is None or (isinstance(value, collections.abc.Sized) and len(value) <= 0):
+ if (
+ value is None
+ or (isinstance(value, collections.abc.Sized) and len(value) <= 0)
+ and not recursion
+ ):
continue
# depending on type we need details...
if isinstance(value, collections.abc.Mapping):
- proposal = _filter_values(value)
+ proposal = _filter_values(value, recursion=True)
elif isinstance(value, collections.abc.Iterable) and not isinstance(value, str):
proposal = [i for i in value if i is not None]
else:
proposal = value
- if proposal not in (None, str(), [], {}):
+ if not recursion and proposal not in (None, str(), [], {}):
+ canonical[key] = proposal
+ elif recursion and proposal not in (None, [], {}):
canonical[key] = proposal
return canonical
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/domain/containers.py new/podman-py-4.3.0/podman/domain/containers.py
--- old/podman-py-4.2.0/podman/domain/containers.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/domain/containers.py 2022-10-19 23:32:04.000000000 +0200
@@ -508,7 +508,7 @@
condition (Union[str, List[str]]): Container state on which to release.
One or more of: "configured", "created", "running", "stopped",
"paused", "exited", "removing", "stopping".
- timeout (int): Ignored.
+ interval (int): Time interval to wait before polling for completion.
Returns:
"Error" key has a dictionary value with the key "Message".
@@ -522,6 +522,13 @@
if isinstance(condition, str):
condition = [condition]
- response = self.client.post(f"/containers/{self.id}/wait", params={"condition": condition})
+ interval = kwargs.get("interval")
+
+ params = {}
+ if condition != []:
+ params["condition"] = condition
+ if interval != "":
+ params["interval"] = interval
+ response = self.client.post(f"/containers/{self.id}/wait", params=params)
response.raise_for_status()
return response.json()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/domain/containers_create.py new/podman-py-4.3.0/podman/domain/containers_create.py
--- old/podman-py-4.2.0/podman/domain/containers_create.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/domain/containers_create.py 2022-10-19 23:32:04.000000000 +0200
@@ -74,6 +74,7 @@
process will run as.
healthcheck (Dict[str,Any]): Specify a test to perform to check that the
container is healthy.
+ health_check_on_failure_action (int): Specify an action if a healthcheck fails.
hostname (str): Optional hostname for the container.
init (bool): Run an init inside the container that forwards signals and reaps processes
init_path (str): Path to the docker-init binary
@@ -371,6 +372,7 @@
"expose": {},
"groups": pop("group_add"),
"healthconfig": pop("healthcheck"),
+ "health_check_on_failure_action": pop("health_check_on_failure_action"),
"hostadd": [],
"hostname": pop("hostname"),
"httpproxy": pop("use_config_proxy"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/domain/images_build.py new/podman-py-4.3.0/podman/domain/images_build.py
--- old/podman-py-4.2.0/podman/domain/images_build.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/domain/images_build.py 2022-10-19 23:32:04.000000000 +0200
@@ -61,6 +61,9 @@
isolation (str) ��� Isolation technology used during build. (ignored)
use_config_proxy (bool) ��� (ignored)
http_proxy (bool) - Inject http proxy environment variables into container (Podman only)
+ layers (bool) - Cache intermediate layers during build.
+ output (str) - specifies if any custom build output is selected for following build.
+ outputformat (str) - The format of the output image's manifest and configuration data.
Returns:
first item is the podman.domain.images.Image built
@@ -162,12 +165,15 @@
"squash": kwargs.get("squash"),
"t": kwargs.get("tag"),
"target": kwargs.get("target"),
+ "layers": kwargs.get("layers"),
+ "output": kwargs.get("output"),
+ "outputformat": kwargs.get("outputformat"),
}
if "buildargs" in kwargs:
params["buildargs"] = json.dumps(kwargs.get("buildargs"))
if "cache_from" in kwargs:
- params["cacheform"] = json.dumps(kwargs.get("cache_from"))
+ params["cachefrom"] = json.dumps(kwargs.get("cache_from"))
if "container_limits" in kwargs:
params["cpuperiod"] = kwargs["container_limits"].get("cpuperiod")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/domain/images_manager.py new/podman-py-4.3.0/podman/domain/images_manager.py
--- old/podman-py-4.2.0/podman/domain/images_manager.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/domain/images_manager.py 2022-10-19 23:32:04.000000000 +0200
@@ -391,3 +391,31 @@
response = self.client.get("/images/search", params=params)
response.raise_for_status(not_found=ImageNotFound)
return response.json()
+
+ def scp(
+ self,
+ source: str,
+ dest: Optional[str] = None,
+ quiet: Optional[bool] = False,
+ ) -> str:
+ """Securely copy images between hosts.
+
+ Args:
+ source: source connection/image
+ dest: destination connection/image
+ quiet: do not print save/load output, only the image
+
+ Returns:
+ A string containing the loaded image
+
+ Raises:
+ APIError: when service returns an error
+ """
+ params = {}
+ if dest is not None and quiet:
+ params = {"destination": dest, "quiet": quiet}
+ elif quiet:
+ params = {"quiet": quiet}
+ response = self.client.post(f"/images/scp/{source}", params=params)
+ response.raise_for_status()
+ return response.json()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/tests/__init__.py new/podman-py-4.3.0/podman/tests/__init__.py
--- old/podman-py-4.2.0/podman/tests/__init__.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/tests/__init__.py 2022-10-19 23:32:04.000000000 +0200
@@ -3,5 +3,5 @@
# Do not auto-update these from version.py,
# as test code should be changed to reflect changes in Podman API versions
BASE_SOCK = "unix:///run/api.sock"
-LIBPOD_URL = "http://%2Frun%2Fapi.sock/v4.2.0/libpod"
+LIBPOD_URL = "http://%2Frun%2Fapi.sock/v4.3.0/libpod"
COMPATIBLE_URL = "http://%2Frun%2Fapi.sock/v1.40"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/tests/integration/test_container_create.py new/podman-py-4.3.0/podman/tests/integration/test_container_create.py
--- old/podman-py-4.2.0/podman/tests/integration/test_container_create.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/tests/integration/test_container_create.py 2022-10-19 23:32:04.000000000 +0200
@@ -145,6 +145,14 @@
)
)
+ def test_container_healtchecks(self):
+ """Test passing various healthcheck options"""
+ parameters = {}
+ parameters['healthcheck'] = {'Test': ['CMD-SHELL curl http://localhost || exit']}
+ parameters['health_check_on_failure_action'] = 1
+ container = self.client.containers.create(self.alpine_image, **parameters)
+ self.containers.append(container)
+
def test_container_mem_limit(self):
"""Test passing memory limit"""
self._test_memory_limit('mem_limit', 'Memory')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/tests/integration/test_images.py new/podman-py-4.3.0/podman/tests/integration/test_images.py
--- old/podman-py-4.2.0/podman/tests/integration/test_images.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/tests/integration/test_images.py 2022-10-19 23:32:04.000000000 +0200
@@ -133,3 +133,15 @@
def test_pull_stream(self):
generator = self.client.images.pull("ubi8", tag="latest", stream=True)
self.assertIsInstance(generator, types.GeneratorType)
+
+ def test_scp(self):
+ with self.assertRaises(APIError) as e:
+ next(
+ self.client.images.scp(
+ source="randuser@fake.ip.addr:22::quay.io/libpod/alpine", quiet=False
+ )
+ )
+ self.assertIn(
+ "failed to connect: dial tcp: lookup fake.ip.addr: no such host",
+ e.exception.explanation,
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/tests/unit/test_api_utils.py new/podman-py-4.3.0/podman/tests/unit/test_api_utils.py
--- old/podman-py-4.2.0/podman/tests/unit/test_api_utils.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/tests/unit/test_api_utils.py 2022-10-19 23:32:04.000000000 +0200
@@ -154,6 +154,16 @@
self.assertDictEqual(actual_dict["Dictionary"], payload["Dictionary"])
self.assertEqual(set(actual_dict["Set1"]), {"item1", "item2"})
+ def test_prepare_body_dict_empty_string(self):
+ payload = {"Dictionary": {"key1": "", "key2": {"key3": ""}, "key4": [], "key5": {}}}
+
+ actual = api.prepare_body(payload)
+ actual_dict = json.loads(actual)
+ payload["Dictionary"].pop("key4")
+ payload["Dictionary"].pop("key5")
+
+ self.assertDictEqual(payload, actual_dict)
+
if __name__ == '__main__':
unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/tests/unit/test_container.py new/podman-py-4.3.0/podman/tests/unit/test_container.py
--- old/podman-py-4.2.0/podman/tests/unit/test_container.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/tests/unit/test_container.py 2022-10-19 23:32:04.000000000 +0200
@@ -212,6 +212,18 @@
self.assertTrue(adapter.called_once)
@requests_mock.Mocker()
+ def test_wait_condition_interval(self, mock):
+ adapter = mock.post(
+ tests.LIBPOD_URL
+ + "/containers/87e1325c82424e49a00abdd4de08009eb76c7de8d228426a9b8af9318ced5ecd/wait",
+ status_code=200,
+ json={"StatusCode": 0},
+ )
+ container = Container(attrs=FIRST_CONTAINER, client=self.client.api)
+ container.wait(condition="exited", interval=1)
+ self.assertTrue(adapter.called_once)
+
+ @requests_mock.Mocker()
def test_diff(self, mock):
payload = [
{"Path": "modified", "Kind": 0},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/podman/version.py new/podman-py-4.3.0/podman/version.py
--- old/podman-py-4.2.0/podman/version.py 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/podman/version.py 2022-10-19 23:32:04.000000000 +0200
@@ -1,4 +1,4 @@
"""Version of PodmanPy."""
-__version__ = "4.2.0"
+__version__ = "4.3.0"
__compatible_version__ = "1.40"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/podman-py-4.2.0/setup.cfg new/podman-py-4.3.0/setup.cfg
--- old/podman-py-4.2.0/setup.cfg 2022-08-10 15:03:52.000000000 +0200
+++ new/podman-py-4.3.0/setup.cfg 2022-10-19 23:32:04.000000000 +0200
@@ -14,7 +14,7 @@
Bug Tracker = https://github.com/containers/podman-py/issues
Libpod API = https://docs.podman.io/en/latest/_static/api.html
classifiers =
- Development Status :: 3 - Alpha
+ Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
@@ -24,6 +24,7 @@
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
+ Programming Language :: Python :: 3.11
Topic :: Software Development :: Libraries :: Python Modules
keywords = podman, libpod