public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-json-logger/, dev-python/python-json-logger/files/
@ 2024-07-12  9:12 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-07-12  9:12 UTC (permalink / raw
  To: gentoo-commits

commit:     79b039b0dee6caa2ec126b239a2939530a4d5c31
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 12 08:35:50 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 12 09:12:49 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79b039b0

dev-python/python-json-logger: Enable py3.13

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

 .../files/python-json-logger-2.0.7-py313.patch     | 25 ++++++++++++++++++++++
 .../python-json-logger-2.0.7-r1.ebuild             |  4 +++-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/dev-python/python-json-logger/files/python-json-logger-2.0.7-py313.patch b/dev-python/python-json-logger/files/python-json-logger-2.0.7-py313.patch
new file mode 100644
index 000000000000..8421617783da
--- /dev/null
+++ b/dev-python/python-json-logger/files/python-json-logger-2.0.7-py313.patch
@@ -0,0 +1,25 @@
+diff --git a/tests/test_jsonlogger.py b/tests/test_jsonlogger.py
+index af369d2..068e760 100644
+--- a/tests/test_jsonlogger.py
++++ b/tests/test_jsonlogger.py
+@@ -176,13 +176,17 @@ def test_json_default_encoder(self):
+                          "1900-01-01T00:00:00")
+ 
+     @unittest.mock.patch('time.time', return_value=1500000000.0)
+-    def test_json_default_encoder_with_timestamp(self, time_mock):
++    @unittest.mock.patch('time.time_ns', return_value=1500000000000000000)
++    def test_json_default_encoder_with_timestamp(self, time_ns_mock, time_mock):
+         fr = jsonlogger.JsonFormatter(timestamp=True)
+         self.log_handler.setFormatter(fr)
+ 
+         self.log.info("Hello")
+-
+-        self.assertTrue(time_mock.called)
++        
++        if sys.version_info < (3, 13):
++            self.assertTrue(time_mock.called)
++        else:
++            self.assertTrue(time_ns_mock.called)
+         log_json = json.loads(self.buffer.getvalue())
+         self.assertEqual(log_json.get("timestamp"), "2017-07-14T02:40:00+00:00")
+ 

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
index c6a7e17d8626..f066b81d5d99 100644
--- 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
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
 PYPI_NO_NORMALIZE=1
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
 
 inherit distutils-r1 pypi
 
@@ -24,6 +24,8 @@ distutils_enable_tests pytest
 PATCHES=(
 	# https://github.com/madzak/python-json-logger/pull/188
 	"${FILESDIR}/${P}-py312.patch"
+	# https://github.com/madzak/python-json-logger/pull/192
+	"${FILESDIR}/${P}-py313.patch"
 )
 
 python_test() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-json-logger/, dev-python/python-json-logger/files/
@ 2025-02-27 13:08 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2025-02-27 13:08 UTC (permalink / raw
  To: gentoo-commits

commit:     33a80cdc4c9187752b35b11bc837ba89cc3407c1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 27 11:02:50 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 27 13:06:12 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33a80cdc

dev-python/python-json-logger: Remove old

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

 dev-python/python-json-logger/Manifest             |  2 --
 .../files/python-json-logger-2.0.7-py312.patch     | 38 ----------------------
 .../files/python-json-logger-2.0.7-py313.patch     | 25 --------------
 .../python-json-logger-2.0.7-r1.ebuild             | 34 -------------------
 .../python-json-logger-3.2.0.ebuild                | 33 -------------------
 5 files changed, 132 deletions(-)

diff --git a/dev-python/python-json-logger/Manifest b/dev-python/python-json-logger/Manifest
index 975c921f6109..de8010ad66cc 100644
--- a/dev-python/python-json-logger/Manifest
+++ b/dev-python/python-json-logger/Manifest
@@ -1,3 +1 @@
-DIST python-json-logger-2.0.7.tar.gz 10508 BLAKE2B 818abaa8007db2226beb7e9f9b6326c4c59e11827c740496bfde491a495b8580b74c483b4bead58525942009ae84643758b8fec4dc0ba85e2c1c2deff2445bcf SHA512 a3056f6c07386410204e65d027504df49d890b5c4577a0460077bc698c9104ab8720d6db107153766611f4f22141c0b2b57dbdacba75a7078638945937922f5e
-DIST python_json_logger-3.2.0.tar.gz 16160 BLAKE2B 076eb8b5c54f47b774eb093ccc3ff9aabf453a57e841ff2d19670ef92fe3928f9820fb2edecf81b570dc08c5a9b0c073f78e6b4c6d1abdde1995f24d27852b74 SHA512 dcb819634e8ff5e694777f9386ee264bb3978d89ddc873aac5b51a7694e9cb78a3920881d6fa3832f6c94c9648fdec6c39d5d8c9b8cc00f7ed8fa0c2317d4221
 DIST python_json_logger-3.2.1.tar.gz 16287 BLAKE2B 7c25119202e8b1c98ef97a27670290151de0edbcf7b0d4b8aae733e379d53d0747df1306677c669d33d4b83259341b2ae74b322a578703e9268bc307d4cc2a65 SHA512 731ee10223c688602f1c89800cdd8f6045917239d796a08dd8317a210b98e02afb4d894c74d897675ad526112e46534570e78a8d3686b4c2009f2b4c41b925b2

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
deleted file mode 100644
index 1cab3b851ff6..000000000000
--- a/dev-python/python-json-logger/files/python-json-logger-2.0.7-py312.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-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/files/python-json-logger-2.0.7-py313.patch b/dev-python/python-json-logger/files/python-json-logger-2.0.7-py313.patch
deleted file mode 100644
index 8421617783da..000000000000
--- a/dev-python/python-json-logger/files/python-json-logger-2.0.7-py313.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/tests/test_jsonlogger.py b/tests/test_jsonlogger.py
-index af369d2..068e760 100644
---- a/tests/test_jsonlogger.py
-+++ b/tests/test_jsonlogger.py
-@@ -176,13 +176,17 @@ def test_json_default_encoder(self):
-                          "1900-01-01T00:00:00")
- 
-     @unittest.mock.patch('time.time', return_value=1500000000.0)
--    def test_json_default_encoder_with_timestamp(self, time_mock):
-+    @unittest.mock.patch('time.time_ns', return_value=1500000000000000000)
-+    def test_json_default_encoder_with_timestamp(self, time_ns_mock, time_mock):
-         fr = jsonlogger.JsonFormatter(timestamp=True)
-         self.log_handler.setFormatter(fr)
- 
-         self.log.info("Hello")
--
--        self.assertTrue(time_mock.called)
-+        
-+        if sys.version_info < (3, 13):
-+            self.assertTrue(time_mock.called)
-+        else:
-+            self.assertTrue(time_ns_mock.called)
-         log_json = json.loads(self.buffer.getvalue())
-         self.assertEqual(log_json.get("timestamp"), "2017-07-14T02:40:00+00:00")
- 

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
deleted file mode 100644
index 1196fbf29b12..000000000000
--- a/dev-python/python-json-logger/python-json-logger-2.0.7-r1.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# 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..13} 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 ~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"
-	# https://github.com/madzak/python-json-logger/pull/192
-	"${FILESDIR}/${P}-py313.patch"
-)
-
-python_test() {
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	epytest
-}

diff --git a/dev-python/python-json-logger/python-json-logger-3.2.0.ebuild b/dev-python/python-json-logger/python-json-logger-3.2.0.ebuild
deleted file mode 100644
index 2b11127f7179..000000000000
--- a/dev-python/python-json-logger/python-json-logger-3.2.0.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} 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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-
-BDEPEND="
-	test? (
-		dev-python/freezegun[${PYTHON_USEDEP}]
-		dev-python/tzdata[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests pytest
-
-python_test() {
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	epytest
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-27 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 13:08 [gentoo-commits] repo/gentoo:master commit in: dev-python/python-json-logger/, dev-python/python-json-logger/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-07-12  9:12 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox