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 2023-07-25 11:51:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-podman (Old)
 and      /work/SRC/openSUSE:Factory/.python-podman.new.1467 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-podman"

Tue Jul 25 11:51:27 2023 rev:10 rq:1100448 version:4.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-podman/python-podman.changes      
2023-06-05 18:07:53.495588585 +0200
+++ /work/SRC/openSUSE:Factory/.python-podman.new.1467/python-podman.changes    
2023-07-25 11:53:19.838234979 +0200
@@ -1,0 +2,53 @@
+Mon Jul 24 13:21:26 UTC 2023 - Johannes Kastl <ka...@b1-systems.de>
+
+- use new Build macros
+- update constraints on BuildRequires
+  * drop constraint for urllib3 < 2
+  * add constraint on requests and pyxdg 
+- follow upstream and use new tomli (for python < 3.11) instead of
+  pytoml
+
+-------------------------------------------------------------------
+Mon Jul 24 13:11:26 UTC 2023 - Johannes Kastl <ka...@b1-systems.de>
+
+- update to 4.6.0:
+  * Bump version to 4.5.0 by @umohnani8 in #263
+  * chore(deps): update dependency containers/automation_images to
+    v20230426 by @renovate in #259
+  * chore(deps): update dependency urllib3 to v2 by @renovate in
+    #265
+  * [skip-ci] Update tim-actions/get-pr-commits action to v1.3.0 by
+    @renovate in #268
+  * chore(deps): update dependency containers/automation_images to
+    v20230517 by @renovate in #270
+  * Streaming support for PodsManager.stats API by @RazCrimson in
+    #266
+  * Minor text fixes in contributing.md by @umohnani8 in #278
+  * Swap renovate dep. update. PR assignments by @cevich in #279
+  * chore(deps): update dependency containers/automation_images to
+    v20230601 by @renovate in #280
+  * Update Makefile to emulate readthedocs automation by @umohnani8
+    in #282
+  * [CI:BUILD] Packit: initial enablement by @lsm5 in #242
+  * chore(deps): update dependency containers/automation_images to
+    v20230614 by @renovate in #286
+  * Packit: remove .packit.sh by @lsm5 in #288
+  * Fix catching errors in the response body of containers/prune by
+    @francisbergin in #290
+  * Fix pod prune error explanation string by @francisbergin in
+    #291
+  * Refactor Makefile to support tox / MacOS Ventura by @jwhonce in
+    #285
+  * Switch HTTPConnection from http.client to urllib3.connection by
+    @dcermak in #283
+  * Keep main branch version ahead of release branches by @lsm5 in
+    #289
+  * [CI:BUILD] RPM: Cleanup by @lsm5 in #296
+  * Includes the possibility to use the 'listTags' parameter in
+    image search endpoint by @apozsuse in #295
+  * Update dependency fixtures to ~=4.1.0 by @renovate in #297
+  * Update fixtures to not be tied to a version by @umohnani8 in
+    #300
+  * Fix passing filters to networks prune by @francisbergin in #298
+
+-------------------------------------------------------------------

Old:
----
  podman-4.5.1.tar.gz

New:
----
  podman-4.6.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-podman.spec ++++++
--- /var/tmp/diff_new_pack.J9oZnC/_old  2023-07-25 11:53:20.506238890 +0200
+++ /var/tmp/diff_new_pack.J9oZnC/_new  2023-07-25 11:53:20.510238914 +0200
@@ -26,7 +26,7 @@
 %bcond_with test
 %endif
 Name:           python-podman%{psuffix}
-Version:        4.5.1
+Version:        4.6.0
 Release:        0
 Summary:        A library to interact with a Podman server
 License:        Apache-2.0
@@ -34,16 +34,18 @@
 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
 BuildRequires:  %{python_module pbr}
-BuildRequires:  %{python_module pytoml}
-BuildRequires:  %{python_module pyxdg}
-BuildRequires:  %{python_module requests}
+BuildRequires:  %{python_module tomli >= 1.2.3 if python-base < 3.11}
+BuildRequires:  %{python_module pyxdg >= 0.26}
+BuildRequires:  %{python_module requests >= 2.24}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module pip}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-pytoml
+Requires:       (python-tomli >= 1.2.3 if python-base < 3.11)
 Requires:       python-pyxdg
 Requires:       python-requests
-Requires:       python-urllib3 < 2.0
+Requires:       python-urllib3
 BuildArch:      noarch
 %if %{with test}
 # SECTION test requirements
@@ -69,11 +71,11 @@
 %autosetup -n podman-py-%{version}
 
 %build
-%python_build
+%pyproject_wheel
 
 %if !%{with test}
 %install
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 %endif
 
@@ -87,7 +89,7 @@
 %doc README.md
 %license LICENSE
 %{python_sitelib}/podman/
-%{python_sitelib}/podman-*.egg-info/
+%{python_sitelib}/podman-%{version}.dist-info/
 %endif
 
 %changelog

++++++ podman-4.5.1.tar.gz -> podman-4.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/.cirrus.yml 
new/podman-py-4.6.0/.cirrus.yml
--- old/podman-py-4.5.1/.cirrus.yml     2023-05-31 17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/.cirrus.yml     2023-07-24 14:05:07.000000000 +0200
@@ -14,11 +14,10 @@
     ####
     #### Cache-image names to test with (double-quotes around names are 
critical)
     ####
-    FEDORA_NAME: "fedora-37"
-    PRIOR_FEDORA_NAME: "fedora-36"
+    FEDORA_NAME: "fedora-38"
 
     # Google-cloud VM Images
-    IMAGE_SUFFIX: "c20230314t204248z-f37f36d12"
+    IMAGE_SUFFIX: "c20230614t132754z-f38f37d13"
     FEDORA_CACHE_IMAGE_NAME: "fedora-podman-py-${IMAGE_SUFFIX}"
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/.github/renovate.json5 
new/podman-py-4.6.0/.github/renovate.json5
--- old/podman-py-4.5.1/.github/renovate.json5  2023-05-31 17:07:11.000000000 
+0200
+++ new/podman-py-4.6.0/.github/renovate.json5  2023-07-24 14:05:07.000000000 
+0200
@@ -51,5 +51,5 @@
    *************************************************/
 
   // Don't leave dep. update. PRs "hanging", assign them to people.
-  "assignees": ["rhatdan"],
+  "assignees": ["umohnani8", "cevich"],
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/.github/workflows/pr.yml 
new/podman-py-4.6.0/.github/workflows/pr.yml
--- old/podman-py-4.5.1/.github/workflows/pr.yml        2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/.github/workflows/pr.yml        2023-07-24 
14:05:07.000000000 +0200
@@ -10,7 +10,7 @@
     steps:
       - name: get pr commits
         id: 'get-pr-commits'
-        uses: tim-actions/get-pr-commits@v1.2.0
+        uses: tim-actions/get-pr-commits@v1.3.0
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/.gitignore 
new/podman-py-4.6.0/.gitignore
--- old/podman-py-4.5.1/.gitignore      2023-05-31 17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/.gitignore      2023-07-24 14:05:07.000000000 +0200
@@ -28,7 +28,6 @@
 #  Usually these files are written by a python script from a template
 #  before PyInstaller builds the exe, so as to inject date/other infos into it.
 *.manifest
-*.spec
 
 # Installer logs
 pip-log.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/.packit.yaml 
new/podman-py-4.6.0/.packit.yaml
--- old/podman-py-4.5.1/.packit.yaml    1970-01-01 01:00:00.000000000 +0100
+++ new/podman-py-4.6.0/.packit.yaml    2023-07-24 14:05:07.000000000 +0200
@@ -0,0 +1,41 @@
+---
+# See the documentation for more information:
+# https://packit.dev/docs/configuration/
+
+# Build targets can be found at:
+# https://copr.fedorainfracloud.org/coprs/rhcontainerbot/packit-builds/
+
+specfile_path: rpm/python-podman.spec
+upstream_tag_template: v{version}
+
+jobs:
+  - &copr
+    job: copr_build
+    trigger: pull_request
+    owner: rhcontainerbot
+    project: packit-builds
+    enable_net: true
+    srpm_build_deps:
+      - make
+
+  - <<: *copr
+    # Run on commit to main branch
+    trigger: commit
+    branch: main
+    project: podman-next
+
+  - job: propose_downstream
+    trigger: release
+    update_release: false
+    dist_git_branches:
+      - fedora-all
+
+  - job: koji_build
+    trigger: commit
+    dist_git_branches:
+      - fedora-all
+
+  - job: bodhi_update
+    trigger: commit
+    dist_git_branches:
+      - fedora-branched # rawhide updates are created automatically
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/.readthedocs.yaml 
new/podman-py-4.6.0/.readthedocs.yaml
--- old/podman-py-4.5.1/.readthedocs.yaml       2023-05-31 17:07:11.000000000 
+0200
+++ new/podman-py-4.6.0/.readthedocs.yaml       2023-07-24 14:05:07.000000000 
+0200
@@ -11,5 +11,5 @@
 
 sphinx:
   configuration: docs/source/conf.py
-  fail_on_warning: true
+  fail_on_warning: false
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/CONTRIBUTING.md 
new/podman-py-4.6.0/CONTRIBUTING.md
--- old/podman-py-4.5.1/CONTRIBUTING.md 2023-05-31 17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/CONTRIBUTING.md 2023-07-24 14:05:07.000000000 +0200
@@ -76,11 +76,11 @@
   you love doing donuts when you're alone, but with passengers the goal is to
   make the ride as smooth as possible.
 - Use Google style python 
[docstrings](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings)
-    - A general exception is made for kwargs where we use the Sphinx extension 
of adding a section
+  - A general exception is made for kwargs where we use the Sphinx extension 
of adding a section
       "Keyword Arguments" and documenting the accepted keyword arguments, 
their type and usage.
       Example: kwarg1 (int): Description of kwarg1
 
-Again thank you for your interest and participation.
+Again, thank you for your interest and participation.
 Jhon Honce `<jhonce at redhat dot com>`
 
 Thanks to Carl Tashian, Participatory Politics Foundation for his fine
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/Makefile new/podman-py-4.6.0/Makefile
--- old/podman-py-4.5.1/Makefile        2023-05-31 17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/Makefile        2023-07-24 14:05:07.000000000 +0200
@@ -2,13 +2,13 @@
 export GOPROXY=https://proxy.golang.org
 
 
-PYTHON ?= $(shell command -v python3 2>/dev/null || command -v python)
+PYTHON ?= $(shell command -v python3 2>/dev/null || command -v python || which 
python3)
 DESTDIR ?= /
 DESTDIR ?=
 EPOCH_TEST_COMMIT ?= $(shell git merge-base $${DEST_BRANCH:-main} HEAD)
 HEAD ?= HEAD
 
-export PODMAN_VERSION ?= "4.5.1"
+export PODMAN_VERSION ?= "4.6.0"
 
 .PHONY: podman
 podman:
@@ -38,7 +38,11 @@
 
 .PHONY: tox
 tox:
+ifeq (, $(shell which dnf))
+       brew install python@3.8 python@3.9 python@3.10 python@3.11
+else
        -dnf install -y python3 python3.6 python3.8 python3.9
+endif
        # ensure tox is available. It will take care of other testing 
requirements
        $(PYTHON) -m pip install --user tox
 
@@ -56,12 +60,23 @@
 
 .PHONY: docs
 docs:
-       mkdir -p build/docs/source
-       cp -R docs/source/* build/docs/source
+       mkdir -p _build/doctrees
+       cp -R docs/source/* _build/doctrees
        sphinx-apidoc --separate --no-toc --force --templatedir 
build/docs/source/_templates/apidoc \
-               -o build/docs/source \
+               -o _build/doctrees \
                podman podman/tests
-       sphinx-build build/docs/source build/html
+       # Previous Command: sphinx-build _build/doctrees _build/html
+       #
+       # HARD CODED COMMAND from readthedocs! We must conform!
+       # -T : traceback
+       # -E : do not use saved environment, always read all files
+       # -W : warnings reported as errors then --keep-going when getting 
warnings
+       # -b html : build html
+       # -d : path for cached environment and doctree files
+       # -D language=en : define language as en
+       # . : source directory
+       # _build/html : target
+       cd _build/doctrees && python3 -m sphinx -T -E -W --keep-going -b html 
-d _build/doctrees -D language=en . _build/html
 
 .PHONY: rpm
 rpm: ## Build rpm packages
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/docs/source/conf.py 
new/podman-py-4.6.0/docs/source/conf.py
--- old/podman-py-4.5.1/docs/source/conf.py     2023-05-31 17:07:11.000000000 
+0200
+++ new/podman-py-4.6.0/docs/source/conf.py     2023-07-24 14:05:07.000000000 
+0200
@@ -15,7 +15,7 @@
 
 from sphinx.domains.python import PythonDomain
 
-sys.path.insert(0, os.path.abspath('../../..'))
+sys.path.insert(0, os.path.abspath('../..'))
 
 
 # -- Project information -----------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/podman/api/ssh.py 
new/podman-py-4.6.0/podman/api/ssh.py
--- old/podman-py-4.5.1/podman/api/ssh.py       2023-05-31 17:07:11.000000000 
+0200
+++ new/podman-py-4.6.0/podman/api/ssh.py       2023-07-24 14:05:07.000000000 
+0200
@@ -4,7 +4,6 @@
 """
 import collections
 import functools
-import http.client
 import logging
 import pathlib
 import random
@@ -17,10 +16,8 @@
 import time
 import xdg.BaseDirectory
 
-try:
-    import urllib3
-except ImportError:
-    from requests.packages import urllib3
+import urllib3
+import urllib3.connection
 
 from requests.adapters import DEFAULT_POOLBLOCK, DEFAULT_RETRIES, HTTPAdapter
 
@@ -151,7 +148,7 @@
         super().close()
 
 
-class SSHConnection(http.client.HTTPConnection):
+class SSHConnection(urllib3.connection.HTTPConnection):
     """Specialization of HTTPConnection to use a SSH forwarded socket."""
 
     def __init__(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/podman/api/uds.py 
new/podman-py-4.6.0/podman/api/uds.py
--- old/podman-py-4.5.1/podman/api/uds.py       2023-05-31 17:07:11.000000000 
+0200
+++ new/podman-py-4.6.0/podman/api/uds.py       2023-07-24 14:05:07.000000000 
+0200
@@ -1,16 +1,13 @@
 """Specialized Transport Adapter for UNIX domain sockets."""
 import collections
 import functools
-import http.client
 import logging
 import socket
 from typing import Optional, Union
 from urllib.parse import unquote, urlparse
 
-try:
-    import urllib3
-except ImportError:
-    from requests.packages import urllib3
+import urllib3
+import urllib3.connection
 
 from requests.adapters import DEFAULT_POOLBLOCK, DEFAULT_POOLSIZE, 
DEFAULT_RETRIES, HTTPAdapter
 
@@ -45,7 +42,7 @@
             raise APIError(f"Unable to make connection to UDS '{netloc}'") 
from e
 
 
-class UDSConnection(http.client.HTTPConnection):
+class UDSConnection(urllib3.connection.HTTPConnection):
     """Specialization of HTTPConnection to use a UNIX domain sockets."""
 
     def __init__(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/podman/domain/containers_manager.py 
new/podman-py-4.6.0/podman/domain/containers_manager.py
--- old/podman-py-4.5.1/podman/domain/containers_manager.py     2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/podman/domain/containers_manager.py     2023-07-24 
14:05:07.000000000 +0200
@@ -111,8 +111,12 @@
 
         results = {"ContainersDeleted": [], "SpaceReclaimed": 0}
         for entry in response.json():
-            if entry.get("error") is not None:
-                raise APIError(entry["error"], response=response, 
explanation=entry["error"])
+            if entry.get("Err") is not None:
+                raise APIError(
+                    entry["Err"],
+                    response=response,
+                    explanation=f"""Failed to prune container 
'{entry["Id"]}'""",
+                )
 
             results["ContainersDeleted"].append(entry["Id"])
             results["SpaceReclaimed"] += entry["Size"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/podman/domain/images_manager.py 
new/podman-py-4.6.0/podman/domain/images_manager.py
--- old/podman-py-4.5.1/podman/domain/images_manager.py 2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/podman/domain/images_manager.py 2023-07-24 
14:05:07.000000000 +0200
@@ -373,6 +373,7 @@
 
             noTrunc (bool): Do not truncate any result string. Default: True.
             limit (int): Maximum number of results.
+            listTags (bool): list the available tags in the repository. 
Default: False
 
         Raises:
             APIError: when service returns an error
@@ -384,6 +385,9 @@
             "term": [term],
         }
 
+        if "listTags" in kwargs:
+            params["listTags"] = kwargs.get("listTags")
+
         response = self.client.get("/images/search", params=params)
         response.raise_for_status(not_found=ImageNotFound)
         return response.json()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/podman/domain/networks_manager.py 
new/podman-py-4.6.0/podman/domain/networks_manager.py
--- old/podman-py-4.5.1/podman/domain/networks_manager.py       2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/podman/domain/networks_manager.py       2023-07-24 
14:05:07.000000000 +0200
@@ -171,7 +171,8 @@
         Raises:
             APIError: when service reports error
         """
-        response = self.client.post("/networks/prune", 
filters=api.prepare_filters(filters))
+        params = {"filters": api.prepare_filters(filters)}
+        response = self.client.post("/networks/prune", params=params)
         response.raise_for_status()
 
         deleted: List[str] = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/podman/domain/pods_manager.py 
new/podman-py-4.6.0/podman/domain/pods_manager.py
--- old/podman-py-4.5.1/podman/domain/pods_manager.py   2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/podman/domain/pods_manager.py   2023-07-24 
14:05:07.000000000 +0200
@@ -1,7 +1,7 @@
 """PodmanResource manager subclassed for Networks."""
 import json
 import logging
-from typing import Any, Dict, List, Optional, Union
+from typing import Any, Dict, List, Optional, Union, Iterator
 
 from podman import api
 from podman.domain.manager import Manager
@@ -103,7 +103,7 @@
                 raise APIError(
                     item["Err"],
                     response=response,
-                    explanation=f"""Failed to prune network '{item["Id"]}'""",
+                    explanation=f"""Failed to prune pod '{item["Id"]}'""",
                 )
             deleted.append(item["Id"])
         return {"PodsDeleted": deleted, "SpaceReclaimed": 0}
@@ -128,12 +128,14 @@
         response = self.client.delete(f"/pods/{pod_id}", params={"force": 
force})
         response.raise_for_status()
 
-    def stats(self, **kwargs) -> Dict[str, Any]:
+    def stats(self, **kwargs) -> Union[List[Dict[str, Any]], 
Iterator[List[Dict[str, Any]]]]:
         """Resource usage statistics for the containers in pods.
 
         Keyword Args:
             all (bool): Provide statistics for all running pods.
             name (Union[str, List[str]]): Pods to include in report.
+            stream (bool): Stream statistics until cancelled. Default: False.
+            decode (bool): If True, response will be decoded into dict. 
Default: False.
 
         Raises:
             NotFound: when pod not found
@@ -142,10 +144,20 @@
         if "all" in kwargs and "name" in kwargs:
             raise ValueError("Keywords 'all' and 'name' are mutually 
exclusive.")
 
+        # Keeping the default for stream as False to not break existing users
+        # Should probably be changed in a newer major version to match 
behavior of container.stats
+        stream = kwargs.get("stream", False)
+        decode = kwargs.get("decode", False)
+
         params = {
             "all": kwargs.get("all"),
             "namesOrIDs": kwargs.get("name"),
+            "stream": stream,
         }
-        response = self.client.get("/pods/stats", params=params)
+        response = self.client.get("/pods/stats", params=params, stream=stream)
         response.raise_for_status()
-        return response.json()
+
+        if stream:
+            return api.stream_helper(response, decode_to_json=decode)
+
+        return json.loads(response.content) if decode else response.content
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/podman/tests/__init__.py 
new/podman-py-4.6.0/podman/tests/__init__.py
--- old/podman-py-4.5.1/podman/tests/__init__.py        2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/podman/tests/__init__.py        2023-07-24 
14:05:07.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.5.1/libpod";
+LIBPOD_URL = "http://%2Frun%2Fapi.sock/v4.6.0/libpod";
 COMPATIBLE_URL = "http://%2Frun%2Fapi.sock/v1.40";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/podman-py-4.5.1/podman/tests/integration/test_images.py 
new/podman-py-4.6.0/podman/tests/integration/test_images.py
--- old/podman-py-4.5.1/podman/tests/integration/test_images.py 2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/podman/tests/integration/test_images.py 2023-07-24 
14:05:07.000000000 +0200
@@ -114,6 +114,9 @@
         self.assertEqual(len(actual), 1)
         self.assertEqual(actual[0]["Official"], "[OK]")
 
+        actual = self.client.images.search("alpine", listTags=True)
+        self.assertIsNotNone(actual[0]["Tag"])
+
     @unittest.skip("Needs Podman 3.1.0")
     def test_corrupt_load(self):
         with self.assertRaises(APIError) as e:
@@ -138,7 +141,7 @@
                     source="randu...@fake.ip.addr:22::quay.io/libpod/alpine", 
quiet=False
                 )
             )
-        self.assertIn(
-            "failed to connect: dial tcp: lookup fake.ip.addr: no such host",
+        self.assertRegex(
             e.exception.explanation,
+            r"failed to connect: dial tcp: lookup fake\.ip\.addr.+no such 
host",
         )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/podman-py-4.5.1/podman/tests/integration/test_system.py 
new/podman-py-4.6.0/podman/tests/integration/test_system.py
--- old/podman-py-4.5.1/podman/tests/integration/test_system.py 2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/podman/tests/integration/test_system.py 2023-07-24 
14:05:07.000000000 +0200
@@ -56,7 +56,10 @@
                     "fake_user", "fake_password", 
"fake_email@fake_domain.test", "fake_registry"
                 )
             )
-        self.assertIn("lookup fake_registry: no such host", 
e.exception.explanation)
+        self.assertRegex(
+            e.exception.explanation,
+            r"lookup fake_registry.+no such host",
+        )
 
     def test_from_env(self):
         """integration: from_env() error message"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/podman-py-4.5.1/podman/tests/unit/test_imagesmanager.py 
new/podman-py-4.6.0/podman/tests/unit/test_imagesmanager.py
--- old/podman-py-4.5.1/podman/tests/unit/test_imagesmanager.py 2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/podman/tests/unit/test_imagesmanager.py 2023-07-24 
14:05:07.000000000 +0200
@@ -416,6 +416,28 @@
         self.assertEqual(report[0]["name"], "quay.io/libpod/fedora")
 
     @requests_mock.Mocker()
+    def test_search_listTags(self, mock):
+        mock.get(
+            tests.LIBPOD_URL + 
"/images/search?term=fedora&noTrunc=true&listTags=true",
+            json=[
+                {
+                    "description": "mock term=fedora search",
+                    "is_official": False,
+                    "is_automated": False,
+                    "name": "quay.io/libpod/fedora",
+                    "star_count": 0,
+                    "tag": "1.0.0",
+                },
+            ],
+        )
+
+        report = self.client.images.search("fedora", listTags=True)
+        self.assertEqual(len(report), 1)
+
+        self.assertEqual(report[0]["name"], "quay.io/libpod/fedora")
+        self.assertEqual(report[0]["tag"], "1.0.0")
+
+    @requests_mock.Mocker()
     def test_push(self, mock):
         mock.post(tests.LIBPOD_URL + "/images/quay.io%2Ffedora%3Alatest/push")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/podman-py-4.5.1/podman/tests/unit/test_podsmanager.py 
new/podman-py-4.6.0/podman/tests/unit/test_podsmanager.py
--- old/podman-py-4.5.1/podman/tests/unit/test_podsmanager.py   2023-05-31 
17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/podman/tests/unit/test_podsmanager.py   2023-07-24 
14:05:07.000000000 +0200
@@ -1,4 +1,7 @@
+import io
+import json
 import unittest
+from typing import Iterable
 
 import requests_mock
 
@@ -153,10 +156,93 @@
         )
 
         actual = self.client.pods.stats(
-            
name="c8b9f5b17dc1406194010c752fc6dcb330192032e27648db9b14060447ecf3b8"
+            
name="c8b9f5b17dc1406194010c752fc6dcb330192032e27648db9b14060447ecf3b8",
+        )
+        self.assertEqual(actual, json.dumps(body).encode())
+
+    @requests_mock.Mocker()
+    def test_stats_without_decode(self, mock):
+        body = {
+            "Processes": [
+                [
+                    'jhonce',
+                    '2417',
+                    '2274',
+                    '0',
+                    'Mar01',
+                    '?',
+                    '00:00:01',
+                    '/usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c 
"/usr/bin/gnome-session"',
+                ],
+                ['jhonce', '5544', '3522', '0', 'Mar01', 'pts/1', '00:00:02', 
'-bash'],
+                ['jhonce', '6140', '3522', '0', 'Mar01', 'pts/2', '00:00:00', 
'-bash'],
+            ],
+            "Titles": ["UID", "PID", "PPID", "C", "STIME", "TTY", "TIME CMD"],
+        }
+        mock.get(
+            tests.LIBPOD_URL
+            + "/pods/stats"
+            
"?namesOrIDs=c8b9f5b17dc1406194010c752fc6dcb330192032e27648db9b14060447ecf3b8",
+            json=body,
+        )
+
+        actual = self.client.pods.stats(
+            
name="c8b9f5b17dc1406194010c752fc6dcb330192032e27648db9b14060447ecf3b8", 
decode=True
         )
         self.assertDictEqual(actual, body)
 
+    @requests_mock.Mocker()
+    def test_top_with_streaming(self, mock):
+        stream = [
+            [
+                {
+                    'CPU': '2.53%',
+                    'MemUsage': '49.15kB / 16.71GB',
+                    'MemUsageBytes': '48KiB / 15.57GiB',
+                    'Mem': '0.00%',
+                    'NetIO': '7.638kB / 430B',
+                    'BlockIO': '-- / --',
+                    'PIDS': '1',
+                    'Pod': '1c948ab42339',
+                    'CID': 'd999c49a7b6c',
+                    'Name': '1c948ab42339-infra',
+                }
+            ],
+            [
+                {
+                    'CPU': '1.46%',
+                    'MemUsage': '57.23B / 16.71GB',
+                    'MemUsageBytes': '48KiB / 15.57GiB',
+                    'Mem': '0.00%',
+                    'NetIO': '7.638kB / 430B',
+                    'BlockIO': '-- / --',
+                    'PIDS': '1',
+                    'Pod': '1c948ab42339',
+                    'CID': 'd999c49a7b6c',
+                    'Name': '1c948ab42339-infra',
+                }
+            ],
+        ]
+
+        buffer = io.StringIO()
+        for entry in stream:
+            buffer.write(json.JSONEncoder().encode(entry))
+            buffer.write("\n")
+
+        adapter = mock.get(
+            tests.LIBPOD_URL + "/pods/stats?stream=True",
+            text=buffer.getvalue(),
+        )
+
+        stream_results = self.client.pods.stats(stream=True, decode=True)
+
+        self.assertIsInstance(stream_results, Iterable)
+        for response, actual in zip(stream_results, stream):
+            self.assertIsInstance(response, list)
+            self.assertListEqual(response, actual)
+
+        self.assertTrue(adapter.called_once)
+
     def test_stats_400(self):
         with self.assertRaises(ValueError):
             self.client.pods.stats(all=True, name="container")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/podman/version.py 
new/podman-py-4.6.0/podman/version.py
--- old/podman-py-4.5.1/podman/version.py       2023-05-31 17:07:11.000000000 
+0200
+++ new/podman-py-4.6.0/podman/version.py       2023-07-24 14:05:07.000000000 
+0200
@@ -1,4 +1,4 @@
 """Version of PodmanPy."""
 
-__version__ = "4.5.1"
+__version__ = "4.6.0"
 __compatible_version__ = "1.40"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/python-podman.spec.rpkg 
new/podman-py-4.6.0/python-podman.spec.rpkg
--- old/podman-py-4.5.1/python-podman.spec.rpkg 2023-05-31 17:07:11.000000000 
+0200
+++ new/podman-py-4.6.0/python-podman.spec.rpkg 1970-01-01 01:00:00.000000000 
+0100
@@ -1,132 +0,0 @@
-# For automatic rebuilds in COPR
-
-# The following tag is to get correct syntax highlighting for this file in vim 
text editor
-# vim: syntax=spec
-
-%global debug_package %{nil}
-
-%if ! 0%{?fedora} && 0%{?rhel} <= 8
-%global old_rhel 1
-%else
-%global old_rhel 0
-%endif
-
-%if %{undefined rhel}
-%bcond_without tests
-%else
-%bcond_with tests
-%endif
-
-%global pypi_name podman
-%global desc %{pypi_name} is a library of bindings to use the RESTful API for 
Podman.
-
-# git_dir_name returns repository name derived from remote Git repository URL
-Name: python-podman
-
-Epoch: 101
-
-# git_dir_version returns version based on commit and tag history of the Git 
project
-Version:    {{{ git_dir_version }}}
-
-# This can be useful later for adding downstream patches
-Release:    1%{?dist}
-
-# Basic description of the package
-Summary: Manage Pods, Containers and Container Images
-
-License:   Apache-2.0
-
-# Home page of the project. Can also point to the public Git repository page.
-URL:        https://github.com/containers/podman-py
-
-# Detailed information about the source Git repository and the source commit
-# for the created rpm package
-VCS:        {{{ git_dir_vcs }}}
-
-# git_dir_pack macro places the repository content (the source files) into a 
tarball
-# and returns its filename. The tarball will be used to build the rpm.
-Source:     {{{ git_dir_pack }}}
-
-%description
-%desc
-
-%package -n python%{python3_pkgversion}-%{pypi_name}
-BuildRequires: git-core
-BuildRequires: python%{python3_pkgversion}-devel
-%if %{?old_rhel}
-BuildRequires: python%{python3_pkgversion}-pyxdg
-BuildRequires: python%{python3_pkgversion}-requests
-BuildRequires: python%{python3_pkgversion}-setuptools
-BuildRequires: python%{python3_pkgversion}-pytoml
-Requires: python%{python3_pkgversion}-pyxdg
-Requires: python%{python3_pkgversion}-requests
-Requires: python%{python3_pkgversion}-pytoml
-%else
-BuildRequires: pyproject-rpm-macros
-%endif
-Provides: %{pypi_name}-py = %{version}-%{release}
-Summary: %{summary}
-%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
-
-%description -n python%{python3_pkgversion}-%{pypi_name}
-%desc
-
-# The following four sections already describe the rpm build process itself.
-# prep will extract the tarball defined as Source above and descend into it.
-%prep
-{{{ git_dir_setup_macro }}}
-
-%if %{defined el8}
-# RHEL 8 does not have tomli. Use pytoml instead.
-sed -i 's|tomli.*|pytoml|' setup.cfg
-# Ensure patch was properly applied.
-(! grep 'tomli' setup.cfg)
-%endif
-
-%if %{defined el9}
-# RHEL 9 does not have tomli. Use toml instead.
-sed -i 's|tomli.*|toml|' setup.cfg
-# Ensure patch was properly applied.
-(! grep 'tomli' setup.cfg)
-%endif
-
-# Remove lint and integration test dependencies
-sed -i -E '/black|coverage|pylint|fixtures/d' test-requirements.txt
-
-%if ! %{?old_rhel}
-%generate_buildrequires
-%pyproject_buildrequires %{?with_tests:-t}
-%endif
-
-# This will invoke `make` command in the directory with the extracted sources.
-%build
-%if %{?old_rhel}
-%py3_build
-%else
-%pyproject_wheel
-%endif
-
-%install
-%if %{?old_rhel}
-%py3_install
-%else
-%pyproject_install
-%endif
-
-%check
-%if %{with tests}
-%tox -- -- podman/tests/unit
-%endif
-
-# This lists all the files that are included in the rpm package and that
-# are going to be installed into target system where the rpm is installed.
-%files -n python3-podman
-%license LICENSE
-%doc README.md
-%{python3_sitelib}/podman/*
-%{python3_sitelib}/podman-*/*
-
-# Finally, changes from the latest release of your application are generated 
from
-# your project's Git history. It will be empty until you make first annotated 
Git tag.
-%changelog
-{{{ git_dir_changelog }}}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/requirements.txt 
new/podman-py-4.6.0/requirements.txt
--- old/podman-py-4.5.1/requirements.txt        2023-05-31 17:07:11.000000000 
+0200
+++ new/podman-py-4.6.0/requirements.txt        2023-07-24 14:05:07.000000000 
+0200
@@ -4,5 +4,5 @@
 setuptools
 sphinx
 tomli>=1.2.3; python_version<'3.11'
-urllib3>=1.26.5,<2.0.0
+urllib3
 wheel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/rpm/python-podman.spec 
new/podman-py-4.6.0/rpm/python-podman.spec
--- old/podman-py-4.5.1/rpm/python-podman.spec  1970-01-01 01:00:00.000000000 
+0100
+++ new/podman-py-4.6.0/rpm/python-podman.spec  2023-07-24 14:05:07.000000000 
+0200
@@ -0,0 +1,102 @@
+# RHEL 8 envs has slightly different python deps
+# and also doesn't support dynamic (build)requires.
+%if %{defined rhel} && 0%{?rhel} == 8
+%define rhel8_py 1
+%endif
+
+%global pypi_name podman
+%global desc %{pypi_name} is a library of bindings to use the RESTful API for 
Podman.
+
+%global pypi_dist 4
+
+Name: python-%{pypi_name}
+%if %{defined copr_username}
+Epoch: 102
+%else
+Epoch: 3
+%endif
+# DO NOT TOUCH the Version string!
+# The TRUE source of this specfile is:
+# https://github.com/containers/podman/blob/main/rpm/python-podman.spec
+# If that's what you're reading, Version must be 0, and will be updated by 
Packit for
+# copr and koji builds.
+# If you're reading this on dist-git, the version is automatically filled in 
by Packit.
+Version: 0
+License: Apache-2.0
+Release: %autorelease
+Summary: RESTful API for Podman
+URL: https://github.com/containers/%{pypi_name}-py
+# Tarball fetched from upstream
+Source0: %{url}/archive/v%{version}.tar.gz
+BuildArch: noarch
+
+%description
+%desc
+
+%package -n python%{python3_pkgversion}-%{pypi_name}
+BuildRequires: git-core
+BuildRequires: python%{python3_pkgversion}-devel
+%if %{defined rhel8_py}
+BuildRequires: python%{python3_pkgversion}-rpm-macros
+BuildRequires: python%{python3_pkgversion}-pytoml
+BuildRequires: python%{python3_pkgversion}-requests
+Requires: python%{python3_pkgversion}-pytoml
+Requires: python%{python3_pkgversion}-requests
+%else
+BuildRequires: pyproject-rpm-macros
+%endif
+Provides: %{pypi_name}-py = %{epoch}:%{version}-%{release}
+Provides: python%{python3_pkgversion}dist(%{pypi_name}) = %{pypi_dist}
+Provides: python%{python3_version}dist(%{pypi_name}) = %{pypi_dist}
+Obsoletes: python%{python3_pkgversion}-%{pypi_name}-api <= 0.0.0-1
+Provides: python%{python3_pkgversion}-%{pypi_name}-api = 
%{epoch}:%{version}-%{release}
+Summary: %{summary}
+%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
+
+%description -n python%{python3_pkgversion}-%{pypi_name}
+%desc
+
+%prep
+%autosetup -Sgit -n %{pypi_name}-py-%{version}
+
+%if !%{defined rhel8_py}
+%generate_buildrequires
+%pyproject_buildrequires %{?with_tests:-t}
+%endif
+
+%build
+export PBR_VERSION="0.0.0"
+%if %{defined rhel8_py}
+%py3_build
+%else
+%pyproject_wheel
+%endif
+
+%install
+export PBR_VERSION="0.0.0"
+%if %{defined rhel8_py}
+%py3_install
+%else
+%pyproject_install
+%pyproject_save_files %{pypi_name}
+%endif
+
+%if %{defined rhel8_py}
+%files -n python%{python3_pkgversion}-%{pypi_name}
+%dir %{python3_sitelib}/%{pypi_name}-*-py%{python3_version}.egg-info
+%{python3_sitelib}/%{pypi_name}-*-py%{python3_version}.egg-info/*
+%dir %{python3_sitelib}/%{pypi_name}
+%{python3_sitelib}/%{pypi_name}/*
+%else
+%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
+%endif
+%license LICENSE
+%doc README.md
+
+%changelog
+%if %{defined autochangelog}
+%autochangelog
+%else
+* Mon May 01 2023 RH Container Bot <rhcontainer...@fedoraproject.org>
+- Placeholder changelog for envs that are not autochangelog-ready
+%endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/rpm/update-spec-version.sh 
new/podman-py-4.6.0/rpm/update-spec-version.sh
--- old/podman-py-4.5.1/rpm/update-spec-version.sh      1970-01-01 
01:00:00.000000000 +0100
+++ new/podman-py-4.6.0/rpm/update-spec-version.sh      2023-07-24 
14:05:07.000000000 +0200
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# This script will update the Version field in the spec which is set to 0 by
+# default. Useful for local manual rpm builds where the Version needs to be set
+# correctly. Run from the git root directory.
+
+set -eo pipefail
+
+# Script is run from git root directory
+SPEC_FILE=rpm/podman.spec
+
+LATEST_TAG=$(git tag --sort=creatordate | tail -1)
+LATEST_VERSION=$(echo $LATEST_TAG | sed -e 's/^v//')
+
+sed -i "s/^Version:.*/Version: $LATEST_VERSION/" $SPEC_FILE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/setup.cfg 
new/podman-py-4.6.0/setup.cfg
--- old/podman-py-4.5.1/setup.cfg       2023-05-31 17:07:11.000000000 +0200
+++ new/podman-py-4.6.0/setup.cfg       2023-07-24 14:05:07.000000000 +0200
@@ -1,6 +1,6 @@
 [metadata]
 name = podman
-version = 4.5.1
+version = 4.6.0
 author = Brent Baude, Jhon Honce
 author_email = jho...@redhat.com
 description = Bindings for Podman RESTful API
@@ -37,7 +37,7 @@
     pyxdg >=0.26
     requests >=2.24
     tomli>=1.2.3; python_version<'3.11'
-    urllib3 >= 1.26.5, < 2.0.0
+    urllib3
 
 # typing_extensions are included for RHEL 8.5
 # typing_extensions;python_version<'3.8'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/podman-py-4.5.1/test-requirements.txt 
new/podman-py-4.6.0/test-requirements.txt
--- old/podman-py-4.5.1/test-requirements.txt   2023-05-31 17:07:11.000000000 
+0200
+++ new/podman-py-4.6.0/test-requirements.txt   2023-07-24 14:05:07.000000000 
+0200
@@ -2,8 +2,8 @@
 -r requirements.txt
 black
 coverage
-fixtures~=4.0.0
+fixtures
 pylint
 pytest
-requests-mock
+requests-mock >= 1.11.0
 tox

Reply via email to