From 5f4dec25d435d9e75cd3d8a6deb7c484359d79dd Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Tue, 14 Mar 2023 17:17:34 +0100 Subject: [PATCH] python-podman-4.0.0-2.el8 --- .gitignore | 3 +- .python-podman.metadata | 1 + ...56fb4ea8a6fb66a6d20bdc2c9cffe615028b.patch | 129 ------------------ gating.yaml | 6 - python-podman.spec | 6 +- 5 files changed, 7 insertions(+), 138 deletions(-) create mode 100644 .python-podman.metadata delete mode 100644 c5a356fb4ea8a6fb66a6d20bdc2c9cffe615028b.patch delete mode 100644 gating.yaml diff --git a/.gitignore b/.gitignore index 6b3e717..dafa321 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/podman-4.0.0.tar.gz -/podman-4.0.0.tar.gz +/*.tar.* diff --git a/.python-podman.metadata b/.python-podman.metadata new file mode 100644 index 0000000..2f276e8 --- /dev/null +++ b/.python-podman.metadata @@ -0,0 +1 @@ +30c16c01a9dcafb0077f83c854c027190891336f podman-4.0.0.tar.gz diff --git a/c5a356fb4ea8a6fb66a6d20bdc2c9cffe615028b.patch b/c5a356fb4ea8a6fb66a6d20bdc2c9cffe615028b.patch deleted file mode 100644 index 2097948..0000000 --- a/c5a356fb4ea8a6fb66a6d20bdc2c9cffe615028b.patch +++ /dev/null @@ -1,129 +0,0 @@ -From c5a356fb4ea8a6fb66a6d20bdc2c9cffe615028b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Fri, 14 Oct 2022 13:54:31 +0200 -Subject: [PATCH] Use modern tomllib/tomli modules for reading TOML files -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Replace the unmaintained `toml`/`pytoml` dependencies with the modern -alternatives: the built-in `tomllib` module in Python 3.11, and `tomli` -in older Python versions. Preserving backwards compatibility does not -seem necessary, as podman-py no longer supports Python versions older -than 3.6. - -Signed-off-by: Michał Górny ---- - podman/domain/config.py | 16 ++++++++++------ - pyproject.toml | 2 +- - python-podman.spec.rpkg | 8 ++++---- - requirements.txt | 2 +- - setup.cfg | 2 +- - 5 files changed, 17 insertions(+), 13 deletions(-) - -diff --git a/podman/domain/config.py b/podman/domain/config.py -index 555ed9d..6ea8eb6 100644 ---- a/podman/domain/config.py -+++ b/podman/domain/config.py -@@ -1,17 +1,21 @@ - """Read containers.conf file.""" -+import sys - import urllib - from pathlib import Path - from typing import Dict, Optional - - import xdg.BaseDirectory - --try: -- import toml --except ImportError: -- import pytoml as toml -- - from podman.api import cached_property - -+if sys.version_info >= (3, 11): -+ from tomllib import loads as toml_loads -+else: -+ try: -+ from tomli import loads as toml_loads -+ except ImportError: -+ from toml import loads as toml_loads -+ - - class ServiceConnection: - """ServiceConnection defines a connection to the Podman service.""" -@@ -64,7 +68,7 @@ def __init__(self, path: Optional[str] = None): - if self.path.exists(): - with self.path.open(encoding='utf-8') as file: - buffer = file.read() -- self.attrs = toml.loads(buffer) -+ self.attrs = toml_loads(buffer) - - def __hash__(self) -> int: - return hash(tuple(self.path.name)) -diff --git a/pyproject.toml b/pyproject.toml -index f3cdfb9..3b29ecb 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -25,7 +25,7 @@ requires = [ - "requests>=2.24", - "setuptools>=46.4", - "sphinx", -- "toml>=0.10.2", -+ "tomli>=1.2.3; python_version<'3.11'", - "urllib3>=1.26.5", - "wheel", - ] -diff --git a/python-podman.spec.rpkg b/python-podman.spec.rpkg -index 5792a31..3683d81 100644 ---- a/python-podman.spec.rpkg -+++ b/python-podman.spec.rpkg -@@ -49,19 +49,19 @@ Source: {{{ git_dir_pack }}} - BuildRequires: git-core - BuildRequires: python%{python3_pkgversion}-devel - %if %{?old_rhel} --BuildRequires: python%{python3_pkgversion}-pytoml - BuildRequires: python%{python3_pkgversion}-pyxdg - BuildRequires: python%{python3_pkgversion}-requests - BuildRequires: python%{python3_pkgversion}-setuptools --Requires: python%{python3_pkgversion}-pytoml -+BuildRequires: python%{python3_pkgversion}-toml - Requires: python%{python3_pkgversion}-pyxdg - Requires: python%{python3_pkgversion}-requests -+Requires: python%{python3_pkgversion}-toml - %else - BuildRequires: pyproject-rpm-macros - %endif - %if 0%{?fedora} <= 35 && ! 0%{?rhel} --BuildRequires: python%{python3_pkgversion}-toml --Requires: python%{python3_pkgversion}-toml -+BuildRequires: python%{python3_pkgversion}-tomli -+Requires: python%{python3_pkgversion}-tomli - %endif - Provides: %{pypi_name}-py = %{version}-%{release} - Summary: %{summary} -diff --git a/requirements.txt b/requirements.txt -index dbee723..9f86c22 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -3,6 +3,6 @@ pyxdg>=0.26 - requests>=2.24 - setuptools - sphinx --toml>=0.10.2 -+tomli>=1.2.3; python_version<'3.11' - urllib3>=1.26.5 - wheel -diff --git a/setup.cfg b/setup.cfg -index f8d1b6f..2066951 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -36,7 +36,7 @@ test_suite = - install_requires = - pyxdg >=0.26 - requests >=2.24 -- toml >=0.10.2 -+ tomli>=1.2.3; python_version<'3.11' - urllib3 >=1.26.5 - - # typing_extensions are included for RHEL 8.5 diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index dfc23d3..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# recipients: jnovy, lsm5, santiago ---- !Policy -product_versions: - - rhel-9 -decision_context: osci_compose_gate -rules: [] diff --git a/python-podman.spec b/python-podman.spec index 9c97676..8707dd5 100644 --- a/python-podman.spec +++ b/python-podman.spec @@ -1,6 +1,6 @@ Name: python-podman Version: 4.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RESTful API for Podman License: ASL 2.0 URL: https://github.com/containers/podman-py @@ -49,6 +49,10 @@ Summary: %{summary} %{python3_sitelib}/podman-*/* %changelog +* Tue Mar 14 2023 Jindrich Novy - 4.0.0-2 +- bump to v4.0.0 +- Related: #2176055 + * Mon Feb 28 2022 Lokesh Mandvekar - 4.0.0-1 - bump to v4.0.0 - Related: #2001445