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 339801581C1 for ; Fri, 12 Jul 2024 09:12:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3BFDE2BC06E; Fri, 12 Jul 2024 09:12:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 264F52BC06E for ; Fri, 12 Jul 2024 09:12:58 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 64BE934306C for ; Fri, 12 Jul 2024 09:12:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A0A181D44 for ; Fri, 12 Jul 2024 09:12:55 +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: <1720775568.14cc15400768b67db7807a3ab6990799ae8a765c.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-json-logger/files/, dev-python/python-json-logger/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/python-json-logger/files/python-json-logger-2.0.7-py312.patch dev-python/python-json-logger/python-json-logger-2.0.7-r1.ebuild X-VCS-Directories: dev-python/python-json-logger/ dev-python/python-json-logger/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 14cc15400768b67db7807a3ab6990799ae8a765c X-VCS-Branch: master Date: Fri, 12 Jul 2024 09:12:55 +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: b7275e9c-4d79-4651-b143-b74ac6d8366c X-Archives-Hash: e6a726f16ee39236b5032e3a7bda45b8 commit: 14cc15400768b67db7807a3ab6990799ae8a765c Author: Michał Górny gentoo org> AuthorDate: Fri Jul 12 08:33:13 2024 +0000 Commit: Michał Górny gentoo 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 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 +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 +}