diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-01-26 13:56:06 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-01-26 13:56:06 +0000 |
commit | 7267fb40fb51ddbc9cc5c1c82b0a12807ef7b281 (patch) | |
tree | ee50984098515c85257df0802f24d6b82f9a0b92 /dev-python/podman-py | |
parent | 220317eb99d11e6c68af921f2855409bc506461a (diff) |
gentoo auto-resync : 26:01:2023 - 13:56:06
Diffstat (limited to 'dev-python/podman-py')
-rw-r--r-- | dev-python/podman-py/Manifest | 3 | ||||
-rw-r--r-- | dev-python/podman-py/files/podman-py-4.3.0-tomli.patch | 89 | ||||
-rw-r--r-- | dev-python/podman-py/podman-py-4.3.0-r1.ebuild (renamed from dev-python/podman-py/podman-py-4.3.0.ebuild) | 8 |
3 files changed, 98 insertions, 2 deletions
diff --git a/dev-python/podman-py/Manifest b/dev-python/podman-py/Manifest index 484536ac6384..56e5cb8eebfc 100644 --- a/dev-python/podman-py/Manifest +++ b/dev-python/podman-py/Manifest @@ -1,3 +1,4 @@ +AUX podman-py-4.3.0-tomli.patch 2671 BLAKE2B 2100c5a3ee89d0e78f9e8f17c9f3338a86a278c071589b1dc4fb14849de06ac7702bc2fd3731083793a0b09a829396e71408cf301001a989673ba6fb1245aac3 SHA512 88ddd9cda9c0829e0576811e5a81c0e0ec8ea73c0c5b38bb33e105f4ca1c8d798deeceb2aba4dd91e9fe12cf789e1ecef944ba4f69642a349cce18a498272b1e DIST podman-py-4.3.0.gh.tar.gz 177403 BLAKE2B 549d3aba023423e5ae45fb04e0ec67bdb8ef6cdbe3e4fe6dec2f5e4d1f1df08828aed00aa83b7ad26f6c88ba225211a108ff67ba28e0003827c00ce3c32428ea SHA512 4e7c1f23d7baf425079689635c2b468871eff7f898f150b9244faf3d199a1cf2544aee1f633e431cd40701fbaaa41861d894e72486a38c6a198fd2c33691b826 -EBUILD podman-py-4.3.0.ebuild 1051 BLAKE2B 039e6e5ccff24be4640729afe9bf3783bd78b7d752878ff13d3ef43839d6bfc71ffb763499adba70e2bc016232e866c4b171d3fadb84f8322a19e72d32916485 SHA512 84c119d1a174e880b9ce42703fabe6dc1f245d6fc84ff375870215cd6bc8917886278cd1faa1e72886f0e71402fcda9f6160760182096b07472a30347673c6f0 +EBUILD podman-py-4.3.0-r1.ebuild 1136 BLAKE2B e07f33897b5b0480810cd9c70012e51a2cfbcaad76cde2c99768c1bb66748419e236468123fea5331b1a6b9c9624102ecb280b6c4865108270ef2ec36ed43db8 SHA512 292133839287a63ca76886772463a1147ed7aad6d159b1f74295da4e7badc69b3f80d800e04578de4918a7e3adf49cf8021c1e2ca2d2ae83576401fd309ea536 MISC metadata.xml 475 BLAKE2B 42fc2c044df94ebf8a4eb5088a39ad3075089cd5a007473db0964df4efb8c7a437c94db9c161d6ba81d2c017377919861f17b7fe3e133aa597312cad2df012f4 SHA512 017f54ebf56fc59c14ff0e9c2f15b899556ff3d512d22ed2abc35227c079ec64c8eb855f60e65299abd7f8b5433b2268dc7c2e428476efc334e24f0d90181bc8 diff --git a/dev-python/podman-py/files/podman-py-4.3.0-tomli.patch b/dev-python/podman-py/files/podman-py-4.3.0-tomli.patch new file mode 100644 index 000000000000..0be9ab796217 --- /dev/null +++ b/dev-python/podman-py/files/podman-py-4.3.0-tomli.patch @@ -0,0 +1,89 @@ +From c5a356fb4ea8a6fb66a6d20bdc2c9cffe615028b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +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 <mgorny@gentoo.org> +--- + 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.24.2", + "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.24.2 + + # typing_extensions are included for RHEL 8.5 diff --git a/dev-python/podman-py/podman-py-4.3.0.ebuild b/dev-python/podman-py/podman-py-4.3.0-r1.ebuild index d52abd69e9e2..e223cbf3882a 100644 --- a/dev-python/podman-py/podman-py-4.3.0.ebuild +++ b/dev-python/podman-py/podman-py-4.3.0-r1.ebuild @@ -25,8 +25,10 @@ KEYWORDS="~amd64" RDEPEND=" >=dev-python/pyxdg-0.26[${PYTHON_USEDEP}] >=dev-python/requests-2.24[${PYTHON_USEDEP}] - >=dev-python/toml-0.10.2[${PYTHON_USEDEP}] >=dev-python/urllib3-1.24.2[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + >=dev-python/tomli-1.2.3[${PYTHON_USEDEP}] + ' 3.{8..10}) " BDEPEND=" test? ( @@ -36,6 +38,10 @@ BDEPEND=" distutils_enable_tests pytest +PATCHES=( + "${FILESDIR}"/${P}-tomli.patch +) + python_test() { local EPYTEST_DESELECT=( # TODO |