summaryrefslogtreecommitdiff
path: root/dev-python/oslo-config
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/oslo-config')
-rw-r--r--dev-python/oslo-config/Manifest3
-rw-r--r--dev-python/oslo-config/files/oslo-config-9.4.0-py313.patch42
-rw-r--r--dev-python/oslo-config/oslo-config-9.4.0.ebuild7
3 files changed, 50 insertions, 2 deletions
diff --git a/dev-python/oslo-config/Manifest b/dev-python/oslo-config/Manifest
index 65982e5b083a..3d93177d730a 100644
--- a/dev-python/oslo-config/Manifest
+++ b/dev-python/oslo-config/Manifest
@@ -1,3 +1,4 @@
+AUX oslo-config-9.4.0-py313.patch 1576 BLAKE2B 8e142c694da6556a4c49637b27d3b6ea6309a27bd12340c42d43f50b57517dd0f1b6ade31cec5544b98e0e546a31559517c89b25097d4281eb22e33ef7a8eef6 SHA512 dc62cf1dc1a0d3c22f091e2af85c0871952dcf4f927328378023d5b66b58df8a721f6398cb14012ab19464203416c3a41f3c9660c043e837628a8589478fc754
DIST oslo.config-9.4.0.tar.gz 161322 BLAKE2B 3edd3be09ebe777ebcb4cd79171bae764046f6ceb0f0c9ca8f88388f1a0bcd23d2bb4e4130ab81a7f3cf063ce0ee668ffbcd8c4bf9f633213e97dcd12e2575dd SHA512 d404876c34c82963af8b992091fd1186855b3ced9a6a574ca4fc152a5b50bfc1945aca04e163770d8bec948cb57904a83eae9e3d7c4c3b852c90987f73e66ba9
-EBUILD oslo-config-9.4.0.ebuild 1519 BLAKE2B 503aeaf96c5135700e29113c8c29c44d9b341d878a552b45a527ec8d02f088670e2f4d2b95bd46b8079d9ab7595006bc7ef6dd8fa948a16f8d0ca483b52f84cb SHA512 8d8903485e97381fbc8a932690c4d8abd129ee04eff79debbd2a37d0d2284c4fd37adc6d44228f00f4d2834bd78918a6201c69faca70c6e3774d55f547c0bc1f
+EBUILD oslo-config-9.4.0.ebuild 1634 BLAKE2B 608a531d79bbbf36328d5149efb2611cfb9af52431e77ac03a3bd6af3a80467191f2e2403f7ccb50f8dcf86f5c10e9612520ad42e1a14b0befbceee6b437e473 SHA512 c6152669ac71a0c8b4c2ee859f7325d75149377e8811f5e076ecd1760796f42b4d9922f3ca9f9e34cfebf6598113eb4a50251a4455289405f26d32c21c6c7d32
MISC metadata.xml 759 BLAKE2B 88d0bbdc03286429f96554d184f664fbbdb4e067ed137f95a96a573c09b4573de90e50b2d5875d627c8b9ed03a0aec7233bdc8684b721e16085157480568c330 SHA512 a29b5a534042e949f780cfb000bd9ce9cde81ae1c5e6b429bd7854598a2d0f0c8b5358dc645135ba9016065460ff5b858e48e02cdbd12ade2b1fea9d0b407410
diff --git a/dev-python/oslo-config/files/oslo-config-9.4.0-py313.patch b/dev-python/oslo-config/files/oslo-config-9.4.0-py313.patch
new file mode 100644
index 000000000000..b3e6979f9e4f
--- /dev/null
+++ b/dev-python/oslo-config/files/oslo-config-9.4.0-py313.patch
@@ -0,0 +1,42 @@
+From 4f916edb457eb02bede0a7c4a64741ef13709af7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 12 Jun 2024 07:47:18 +0200
+Subject: [PATCH] Fix tests for Python 3.13
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fix expected argparse --help output to account for changes in Python
+3.13.
+
+Closes-Bug: 2069108
+Change-Id: Ie221e5f5b369930f015a74998f50ddb473b53b94
+Signed-off-by: Michał Górny <mgorny@gentoo.org>
+---
+ oslo_config/tests/test_cfg.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/oslo_config/tests/test_cfg.py b/oslo_config/tests/test_cfg.py
+index 926eb8c..f69f7a0 100644
+--- a/oslo_config/tests/test_cfg.py
++++ b/oslo_config/tests/test_cfg.py
+@@ -264,8 +264,14 @@ class HelpTestCase(BaseTestCase):
+ self.conf.register_cli_opt(uvw)
+ self.conf([])
+ self.conf.print_help(file=f)
+- self.assertIn('--a-bc A_BC, --d-ef A_BC, --d_ef A_BC', f.getvalue())
+- self.assertIn('--u-vw U_VW, --x-yz U_VW, --x_yz U_VW', f.getvalue())
++ if sys.version_info >= (3, 13):
++ self.assertIn('--a-bc, --d-ef, --d_ef A_BC', f.getvalue())
++ self.assertIn('--u-vw, --x-yz, --x_yz U_VW', f.getvalue())
++ else:
++ self.assertIn('--a-bc A_BC, --d-ef A_BC, --d_ef A_BC',
++ f.getvalue())
++ self.assertIn('--u-vw U_VW, --x-yz U_VW, --x_yz U_VW',
++ f.getvalue())
+
+
+ class FindConfigFilesTestCase(BaseTestCase):
+--
+2.45.2
+
diff --git a/dev-python/oslo-config/oslo-config-9.4.0.ebuild b/dev-python/oslo-config/oslo-config-9.4.0.ebuild
index 8a5bbb36170a..69c20f0f2f3d 100644
--- a/dev-python/oslo-config/oslo-config-9.4.0.ebuild
+++ b/dev-python/oslo-config/oslo-config-9.4.0.ebuild
@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYPI_PN=${PN/-/.}
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1 pypi
@@ -46,6 +46,11 @@ BDEPEND="
distutils_enable_tests unittest
src_prepare() {
+ local PATCHES=(
+ # https://review.opendev.org/c/openstack/oslo.log/+/921797
+ "${FILESDIR}/${P}-py313.patch"
+ )
+
# broken by some dep upgrade
sed -i -e '/DeprecationWarningTestsNoOsloLog/,$d' \
oslo_config/tests/test_cfg.py || die