public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/oslo-config/, dev-python/oslo-config/files/
Date: Wed, 12 Jun 2024 05:58:26 +0000 (UTC)	[thread overview]
Message-ID: <1718171902.f4d57558f7662efb03f1bbbea58c18f73b6e0005.mgorny@gentoo> (raw)

commit:     f4d57558f7662efb03f1bbbea58c18f73b6e0005
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 12 05:51:16 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 12 05:58:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4d57558

dev-python/oslo-config: Enable py3.13

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/oslo-config-9.4.0-py313.patch            | 42 ++++++++++++++++++++++
 dev-python/oslo-config/oslo-config-9.4.0.ebuild    |  7 +++-
 2 files changed, 48 insertions(+), 1 deletion(-)

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


             reply	other threads:[~2024-06-12  5:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12  5:58 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-20 13:27 [gentoo-commits] repo/gentoo:master commit in: dev-python/oslo-config/, dev-python/oslo-config/files/ Michał Górny
2024-08-27 14:37 Michał Górny
2025-01-04 17:28 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1718171902.f4d57558f7662efb03f1bbbea58c18f73b6e0005.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox