From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-json-logger/files/, dev-python/python-json-logger/
Date: Fri, 12 Jul 2024 09:12:55 +0000 (UTC) [thread overview]
Message-ID: <1720775568.14cc15400768b67db7807a3ab6990799ae8a765c.mgorny@gentoo> (raw)
commit: 14cc15400768b67db7807a3ab6990799ae8a765c
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 12 08:33:13 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 12 09:12:48 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14cc1540
dev-python/python-json-logger: Add a proper fix for py3.12
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../files/python-json-logger-2.0.7-py312.patch | 38 ++++++++++++++++++++++
.../python-json-logger-2.0.7-r1.ebuild | 32 ++++++++++++++++++
2 files changed, 70 insertions(+)
diff --git a/dev-python/python-json-logger/files/python-json-logger-2.0.7-py312.patch b/dev-python/python-json-logger/files/python-json-logger-2.0.7-py312.patch
new file mode 100644
index 000000000000..1cab3b851ff6
--- /dev/null
+++ b/dev-python/python-json-logger/files/python-json-logger-2.0.7-py312.patch
@@ -0,0 +1,38 @@
+From 0ce621a8dd9dfa708a920c0ad90df8f7593b6110 Mon Sep 17 00:00:00 2001
+From: cache-miss <cache-miss>
+Date: Sat, 9 Mar 2024 18:27:24 +0800
+Subject: [PATCH] add taskName to reserved_attrs which was added in python 3.12
+
+Closes: https://github.com/madzak/python-json-logger/pull/188
+---
+ src/pythonjsonlogger/jsonlogger.py | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py
+index e250c7e..a911478 100644
+--- a/src/pythonjsonlogger/jsonlogger.py
++++ b/src/pythonjsonlogger/jsonlogger.py
+@@ -6,6 +6,7 @@ import logging
+ import json
+ import re
+ from datetime import date, datetime, time, timezone
++import sys
+ import traceback
+ import importlib
+
+@@ -23,6 +24,12 @@ RESERVED_ATTRS: Tuple[str, ...] = (
+ 'msecs', 'message', 'msg', 'name', 'pathname', 'process',
+ 'processName', 'relativeCreated', 'stack_info', 'thread', 'threadName')
+
++if sys.version_info >= (3, 12):
++ RESERVED_ATTRS = (
++ *RESERVED_ATTRS,
++ "taskName",
++ )
++
+
+
+ def merge_record_extra(
+--
+2.45.2
+
diff --git a/dev-python/python-json-logger/python-json-logger-2.0.7-r1.ebuild b/dev-python/python-json-logger/python-json-logger-2.0.7-r1.ebuild
new file mode 100644
index 000000000000..c6a7e17d8626
--- /dev/null
+++ b/dev-python/python-json-logger/python-json-logger-2.0.7-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Standard python logging to output log data as json objects"
+HOMEPAGE="
+ https://github.com/madzak/python-json-logger/
+ https://pypi.org/project/python-json-logger/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/madzak/python-json-logger/pull/188
+ "${FILESDIR}/${P}-py312.patch"
+)
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest
+}
reply other threads:[~2024-07-12 9:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1720775568.14cc15400768b67db7807a3ab6990799ae8a765c.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