summaryrefslogtreecommitdiff
path: root/dev-python/oslo-log
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-13 00:08:30 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-13 00:08:30 +0100
commit0ebcd2cbf178600b5eb36b2f24cdbb3d2f4a9000 (patch)
tree941e6ba8c256dd27e9f9ca634f08d4bf0278798e /dev-python/oslo-log
parentf0ddcad13515f66d2f3bf827d33c277bdba7e1dd (diff)
gentoo auto-resync : 13:06:2024 - 00:08:29
Diffstat (limited to 'dev-python/oslo-log')
-rw-r--r--dev-python/oslo-log/Manifest3
-rw-r--r--dev-python/oslo-log/files/oslo-log-6.0.0-py313.patch80
-rw-r--r--dev-python/oslo-log/oslo-log-6.0.0.ebuild8
3 files changed, 89 insertions, 2 deletions
diff --git a/dev-python/oslo-log/Manifest b/dev-python/oslo-log/Manifest
index e1beb5ffb4ab..81e65a0efce1 100644
--- a/dev-python/oslo-log/Manifest
+++ b/dev-python/oslo-log/Manifest
@@ -1,3 +1,4 @@
+AUX oslo-log-6.0.0-py313.patch 3136 BLAKE2B 383cd50ad54458e949d2cd5da045675ce4358463037d4befc9feb5ffa4bd6b2f5b4e8eef27699579ccab8b10081413dc7b4c7aeb5d2eda518ddf8cc499423112 SHA512 27934d951588a6f80ce6ab6dd1056e49b034f04b2a42bfe8b710b3261cc6814641b46ebcb9a77d04f66ae9ff96827552f8a91c6bbef22a3117401ede5127f415
DIST oslo.log-6.0.0.tar.gz 95271 BLAKE2B 13967ea4eeb2ad227d5534027c3a424b0f142ea334a701537ea31341a2a5166fd9c7991206e589be4d3378371bc21331027010005f36d63a13c4d59cd362c308 SHA512 87ab8e5da0f57675095734d62f7d46908c55528f89d118de6c15c3e483a15e2f20cace46d9eb2766dd617d40cc45027faee89edd2c1ef881629237b8b63513f8
-EBUILD oslo-log-6.0.0.ebuild 1354 BLAKE2B c4d267f6f37c9d22086e8c5c51ea51d9269a976fe8382f3a6f6e4f4fb8a62d8209f93f8ca73b347ffbd8a4f20dac1f4be51e6d6aef662ecfcd3564400d1b66f0 SHA512 977dc527a01285451035e3a64404e65e88281eb6583f04567d6ee14552af4a1d161edb5cf2f5727c504ecc998ba4e33148c71704a3d3276c6f7af4da47c0e8c6
+EBUILD oslo-log-6.0.0.ebuild 1519 BLAKE2B 06f0bc82c50bc71be98bf9cb0611ebce4cd27a591e3759a700ca3fdf94b42cc5da671363bd19d63cdebf72e86635eb4f56fefeecd0887bce71c6c513beb8432a SHA512 2d547adb582c8a8ec188331c5c6465566094e34706f1e40a0ef7154f126f82ddabb2e81cbce529c57d0d71c6b08a38098e111d2365fe5234521d065d0d08069d
MISC metadata.xml 914 BLAKE2B 47a0937cefc2cc4c8c4300f4aae699a42c5d659cb6017aa01b87aca14bdcb9f47256c3417cc0178999c452a35ebccd915b020b537a4d688d1d00664b7be1332d SHA512 dfeb43d43608a56c60e62046f1fbef6c6cc794431917d7734caf0b3afb5d1b761c1a04ee01ab0fc4d6051c39a984d6edb25663dae2cf94354192d5f2b8abd6e7
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 <mgorny@gentoo.org>
+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 <mgorny@gentoo.org>
+---
+
+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 <mgorny@gentoo.org>
+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 <mgorny@gentoo.org>
+---
+
+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