From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4D03715817D for ; Wed, 12 Jun 2024 05:58:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9820DE2B75; Wed, 12 Jun 2024 05:58:29 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 79A88E2B75 for ; Wed, 12 Jun 2024 05:58:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 92501335DEB for ; Wed, 12 Jun 2024 05:58:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0EFE51C99 for ; Wed, 12 Jun 2024 05:58:27 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1718171903.1fa4afd93e56926160239e6ba686b7549ffb4e8d.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/oslo-log/, dev-python/oslo-log/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/oslo-log/files/oslo-log-6.0.0-py313.patch dev-python/oslo-log/oslo-log-6.0.0.ebuild X-VCS-Directories: dev-python/oslo-log/files/ dev-python/oslo-log/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 1fa4afd93e56926160239e6ba686b7549ffb4e8d X-VCS-Branch: master Date: Wed, 12 Jun 2024 05:58:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 983d00a9-3ab1-461f-a8b5-ea2e4d4a7842 X-Archives-Hash: 0fd16ffe40d1b536d8bcd9c9d3a315b0 commit: 1fa4afd93e56926160239e6ba686b7549ffb4e8d Author: Michał Górny gentoo org> AuthorDate: Wed Jun 12 05:51:19 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Jun 12 05:58:23 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fa4afd9 dev-python/oslo-log: Enable py3.13 Signed-off-by: Michał Górny gentoo.org> .../oslo-log/files/oslo-log-6.0.0-py313.patch | 80 ++++++++++++++++++++++ dev-python/oslo-log/oslo-log-6.0.0.ebuild | 8 ++- 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/dev-python/oslo-log/files/oslo-log-6.0.0-py313.patch b/dev-python/oslo-log/files/oslo-log-6.0.0-py313.patch new file mode 100644 index 000000000000..b80e29550854 --- /dev/null +++ b/dev-python/oslo-log/files/oslo-log-6.0.0-py313.patch @@ -0,0 +1,80 @@ +From 60c39a3b874f027f690b49c987daa31c37bfb0e6 Mon Sep 17 00:00:00 2001 +From: Michał Górny +Date: Tue, 11 Jun 2024 21:35:58 +0200 +Subject: [PATCH] Replace deprecated logging.warn() calls with logging.warning() + +Replace the deprecated logging.warn() calls with logging.warning(). +The former were undocumented, deprecated since Python 3.3 and eventually +removed in Python 3.13. + +See: https://docs.python.org/3.13/whatsnew/3.13.html#logging +Partial-Bug: 2069084 +Change-Id: I6d1ee13409fe84cd54b7a3aa3ed862bc6e33f1c3 +Signed-off-by: Michał Górny +--- + +diff --git a/oslo_log/tests/unit/test_log.py b/oslo_log/tests/unit/test_log.py +index d17d20a..7c066ae 100644 +--- a/oslo_log/tests/unit/test_log.py ++++ b/oslo_log/tests/unit/test_log.py +@@ -1115,7 +1115,7 @@ + self.assertIn(infoexpected, self.stream.getvalue()) + self.assertEqual('\033[00;36m', infocolor) + +- self.colorlog.warn(warn_msg, context=ctxt) ++ self.colorlog.warning(warn_msg, context=ctxt) + self.assertIn(infoexpected, self.stream.getvalue()) + self.assertIn(warnexpected, self.stream.getvalue()) + self.assertEqual('\033[01;33m', warncolor) +@@ -1266,7 +1266,7 @@ + self.mylog.info(info_message, context=ctxt) + self.assertEqual(infoexpected, self.stream.getvalue()) + +- self.mylog.warn(warn_message, context=ctxt) ++ self.mylog.warning(warn_message, context=ctxt) + self.assertEqual(infoexpected + warnexpected, self.stream.getvalue()) + + def test_domain_in_log_msg(self): +@@ -1590,11 +1590,11 @@ + stream = self.set_root_stream() + log = logging.getLogger("a.a") + log.info("info") +- log.warn("warn") ++ log.warning("warn") + self.assertEqual("warn\n", stream.getvalue()) + stream = self.set_root_stream() + log.info("info") +- log.warn("warn") ++ log.warning("warn") + self.assertEqual("info\nwarn\n", stream.getvalue()) + + +From cd5eb0fdf4d74150d8e3b014ef43ad0d0cbb9a5d Mon Sep 17 00:00:00 2001 +From: Michał Górny +Date: Tue, 11 Jun 2024 21:45:05 +0200 +Subject: [PATCH] Update test_rfc5424_isotime_format_no_microseconds output for py3.13 + +In Python 3.13, the isotime format does not include microseconds anymore +if they are zero. Update the test to account for both possibilities. + +Closes-Bug: 2069084 +Change-Id: I8fc022e5ad0df8ec4bd413de12106390d9dbc0f1 +Signed-off-by: Michał Górny +--- + +diff --git a/oslo_log/tests/unit/test_log.py b/oslo_log/tests/unit/test_log.py +index 7c066ae..3176c1c 100644 +--- a/oslo_log/tests/unit/test_log.py ++++ b/oslo_log/tests/unit/test_log.py +@@ -996,7 +996,10 @@ + self.config(logging_default_format_string="%(isotime)s %(message)s") + + message = "test" +- expected = "2015-12-16T13:54:26.000000+00:00 %s\n" % message ++ if sys.version_info >= (3, 13): ++ expected = "2015-12-16T13:54:26+00:00 %s\n" % message ++ else: ++ expected = "2015-12-16T13:54:26.000000+00:00 %s\n" % message + + self.log.info(message) + diff --git a/dev-python/oslo-log/oslo-log-6.0.0.ebuild b/dev-python/oslo-log/oslo-log-6.0.0.ebuild index 11e901099b1b..25956698161e 100644 --- a/dev-python/oslo-log/oslo-log-6.0.0.ebuild +++ b/dev-python/oslo-log/oslo-log-6.0.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 @@ -44,6 +44,12 @@ distutils_enable_sphinx doc/source \ dev-python/openstackdocstheme \ dev-python/oslo-config +PATCHES=( + # https://review.opendev.org/c/openstack/oslo.log/+/921797 + # https://review.opendev.org/c/openstack/oslo.log/+/921798 + "${FILESDIR}/${P}-py313.patch" +) + src_test() { # requires eventlet rm oslo_log/tests/unit/test_pipe_mutex.py || die