public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-jsonschema] 2488367: py3.15 pprint test changes
@ 2026-06-15 7:29 Steve Traylen
0 siblings, 0 replies; only message in thread
From: Steve Traylen @ 2026-06-15 7:29 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-jsonschema
Branch : 2488367
Commit : d46c48b73c7a1ef7ec4a97dc5e45b86a2055b932
Author : Steve Traylen <steve.traylen@cern.ch>
Date : 2026-05-23T12:15:38+02:00
Stats : +111/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-jsonschema/c/d46c48b73c7a1ef7ec4a97dc5e45b86a2055b932?branch=2488367
Log:
py3.15 pprint test changes
pprint changed output in Python 3.15
Upstream patch:
https://github.com/python-jsonschema/jsonschema/pull/1487
---
diff --git a/1487.patch b/1487.patch
new file mode 100644
index 0000000..3f1c2e5
--- /dev/null
+++ b/1487.patch
@@ -0,0 +1,108 @@
+From 31f5277e7215760c50fa77b5c1e188b6b3fca2cc Mon Sep 17 00:00:00 2001
+From: Steve Traylen <steve.traylen@cern.ch>
+Date: Sat, 23 May 2026 12:05:10 +0200
+Subject: [PATCH] tests: fix test_uses_pprint for Python 3.15 pprint dict
+
+Python 3.15 changed pprint's output for dicts with non-string keys
+
+* https://docs.python.org/3.15/whatsnew/3.15.html#pprint
+* https://github.com/python/cpython/issues/112632
+---
+ jsonschema/tests/test_exceptions.py | 71 +++++++++++++++++++++++++++++
+ 1 file changed, 71 insertions(+)
+
+diff --git a/jsonschema/tests/test_exceptions.py b/jsonschema/tests/test_exceptions.py
+index 358b9242..7863aaa6 100644
+--- a/jsonschema/tests/test_exceptions.py
++++ b/jsonschema/tests/test_exceptions.py
+@@ -1,5 +1,7 @@
+ from unittest import TestCase
++import sys
+ import textwrap
++import unittest
+
+ import jsonpath_ng
+
+@@ -593,6 +595,10 @@ def test_multiple_item_paths(self):
+ schema_path=["items", 0, 1],
+ )
+
++ @unittest.skipIf(
++ sys.version_info >= (3, 15),
++ "pprint dict format changed in 3.15, see test_uses_pprint_py315",
++ )
+ def test_uses_pprint(self):
+ self.assertShows(
+ """
+@@ -650,6 +656,71 @@ def test_uses_pprint(self):
+ validator="maxLength",
+ )
+
++ @unittest.skipIf(
++ sys.version_info < (3, 15),
++ "pprint dict format pre-3.15, see test_uses_pprint",
++ )
++ def test_uses_pprint_py315(self):
++ self.assertShows(
++ """
++ Failed validating 'maxLength' in schema:
++ {
++ 0: 0,
++ 1: 1,
++ 2: 2,
++ 3: 3,
++ 4: 4,
++ 5: 5,
++ 6: 6,
++ 7: 7,
++ 8: 8,
++ 9: 9,
++ 10: 10,
++ 11: 11,
++ 12: 12,
++ 13: 13,
++ 14: 14,
++ 15: 15,
++ 16: 16,
++ 17: 17,
++ 18: 18,
++ 19: 19,
++ }
++
++ On instance:
++ [
++ 0,
++ 1,
++ 2,
++ 3,
++ 4,
++ 5,
++ 6,
++ 7,
++ 8,
++ 9,
++ 10,
++ 11,
++ 12,
++ 13,
++ 14,
++ 15,
++ 16,
++ 17,
++ 18,
++ 19,
++ 20,
++ 21,
++ 22,
++ 23,
++ 24,
++ ]
++ """,
++ instance=list(range(25)),
++ schema=dict(zip(range(20), range(20))),
++ validator="maxLength",
++ )
++
+ def test_does_not_reorder_dicts(self):
+ self.assertShows(
+ """
diff --git a/python-jsonschema.spec b/python-jsonschema.spec
index 20af9ac..1bce86d 100644
--- a/python-jsonschema.spec
+++ b/python-jsonschema.spec
@@ -16,6 +16,8 @@ Release: %autorelease
License: MIT
URL: https://github.com/Julian/jsonschema
Source0: %{pypi_source}
+# py3.15 pprint change
+Patch0: https://github.com/python-jsonschema/jsonschema/pull/1487.patch
BuildArch: noarch
BuildRequires: python3-devel
@@ -39,7 +41,7 @@ Summary: %{summary}
%prep
-%autosetup -n %{pypi_name}-%{version}
+%autosetup -n %{pypi_name}-%{version} -p1
# Requires a checkout of the JSON-Schema-Test-Suite
# https://github.com/json-schema-org/JSON-Schema-Test-Suite
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-15 7:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-15 7:29 [rpms/python-jsonschema] 2488367: py3.15 pprint test changes Steve Traylen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox