* [gentoo-commits] repo/gentoo:master commit in: dev-python/commentjson/, dev-python/commentjson/files/
@ 2024-06-23 16:20 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2024-06-23 16:20 UTC (permalink / raw
To: gentoo-commits
commit: aba05f4359ec49457e61bf26691d337c7e377e75
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 23 13:00:57 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jun 23 16:18:53 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aba05f43
dev-python/commentjson: Fix tests, enable py3.13
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
| 12 ++++++++---
| 24 ++++++++++++++++++++++
2 files changed, 33 insertions(+), 3 deletions(-)
--git a/dev-python/commentjson/commentjson-0.9.0-r2.ebuild b/dev-python/commentjson/commentjson-0.9.0-r2.ebuild
index 6ebede96a2b3..66ef695160cc 100644
--- a/dev-python/commentjson/commentjson-0.9.0-r2.ebuild
+++ b/dev-python/commentjson/commentjson-0.9.0-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 2021-2023 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
inherit distutils-r1
@@ -34,7 +34,13 @@ BDEPEND="
distutils_enable_tests unittest
src_prepare() {
+ local PATCHES=(
+ # https://github.com/vaidik/commentjson/pull/54
+ "${FILESDIR}/${P}-py312.patch"
+ )
+
+ distutils-r1_src_prepare
+
# remove lark-parser dependency to allow painless upgrade to lark
sed -e '/lark-parser/d' -i setup.py || die
- distutils-r1_src_prepare
}
--git a/dev-python/commentjson/files/commentjson-0.9.0-py312.patch b/dev-python/commentjson/files/commentjson-0.9.0-py312.patch
new file mode 100644
index 000000000000..dbdcfe488f83
--- /dev/null
+++ b/dev-python/commentjson/files/commentjson-0.9.0-py312.patch
@@ -0,0 +1,24 @@
+From 04ad293f800039c0221ff010236e589a4ba7079d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 23 Jun 2024 14:54:42 +0200
+Subject: [PATCH] Update test skips for Python 3.12+
+
+Python 3.12 moves testing for `Infinity` and other constants
+into `test_json/test_decode.py::test_parse_constant`.
+---
+ commentjson/tests/test_json/test_decode.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/commentjson/tests/test_json/test_decode.py b/commentjson/tests/test_json/test_decode.py
+index 6971c44..8f5e904 100644
+--- a/commentjson/tests/test_json/test_decode.py
++++ b/commentjson/tests/test_json/test_decode.py
+@@ -69,3 +69,8 @@ def test_string_with_utf8_bom(self):
+ 'test case is not supported by commentjson.'))
+ def test_negative_index(self):
+ pass
++
++ @unittest.skipIf(version >= (3, 12),
++ 'Infinity as a value is not supported yet')
++ def test_parse_constant(self):
++ pass
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-23 16:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-23 16:20 [gentoo-commits] repo/gentoo:master commit in: dev-python/commentjson/, dev-python/commentjson/files/ 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