public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Steve Traylen <steve.traylen@cern.ch>
To: git-commits@fedoraproject.org
Subject: [rpms/python-jsonschema] 2488367: py3.15 pprint test changes
Date: Mon, 15 Jun 2026 07:29:59 GMT	[thread overview]
Message-ID: <178150859999.1.11288624927303867543.rpms-python-jsonschema-d46c48b73c7a@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-06-15  7:29 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=178150859999.1.11288624927303867543.rpms-python-jsonschema-d46c48b73c7a@fedoraproject.org \
    --to=steve.traylen@cern.ch \
    --cc=git-commits@fedoraproject.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