public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pydantic] rawhide: Update to 2.14.1 (close RHBZ#2548015)
@ 2026-10-22  6:22 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-10-22  6:22 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-pydantic
Branch : rawhide
Commit : d95bb14faedb0423c088d92bcdc113b67945f23f
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-10-14T11:37:58+01:00
Stats  : +6/-200 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pydantic/c/d95bb14faedb0423c088d92bcdc113b67945f23f?branch=rawhide

Log:
Update to 2.14.1 (close RHBZ#2548015)

---
diff --git a/53706f8f95585f2ae0cee43c1df944956dd2a31f.patch b/53706f8f95585f2ae0cee43c1df944956dd2a31f.patch
deleted file mode 100644
index 22ccec7..0000000
--- a/53706f8f95585f2ae0cee43c1df944956dd2a31f.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 53706f8f95585f2ae0cee43c1df944956dd2a31f Mon Sep 17 00:00:00 2001
-From: Colin Watson <cjwatson@debian.org>
-Date: Sun, 28 Jun 2026 15:49:47 +0100
-Subject: [PATCH] Don't parameterize tests using non-Collection iterables
-
-This is deprecated as of pytest 9.1; see
-https://docs.pytest.org/en/stable/deprecations.html#class-scoped-fixture-as-instance-method.
----
- pydantic-core/tests/test_docstrings.py | 4 ++--
- tests/test_docs.py                     | 6 +++---
- tests/test_utils.py                    | 4 ++--
- tests/test_validators.py               | 2 +-
- 4 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/pydantic-core/tests/test_docstrings.py b/pydantic-core/tests/test_docstrings.py
-index bfde27c3d0..d8057432d1 100644
---- a/pydantic-core/tests/test_docstrings.py
-+++ b/pydantic-core/tests/test_docstrings.py
-@@ -18,7 +18,7 @@ def find_examples(*args, **kwargs):
- 
- @pytest.mark.skipif(CodeExample is None or sys.platform not in {'linux', 'darwin'}, reason='Only on linux and macos')
- @pytest.mark.parametrize(
--    'example', find_examples(str(PYDANTIC_CORE_DIR / 'python/pydantic_core/core_schema.py')), ids=str
-+    'example', list(find_examples(str(PYDANTIC_CORE_DIR / 'python/pydantic_core/core_schema.py'))), ids=str
- )
- @pytest.mark.thread_unsafe  # TODO investigate why pytest_examples seems to be thread unsafe here
- def test_docstrings(example: CodeExample, eval_example: EvalExample):
-@@ -33,7 +33,7 @@ def test_docstrings(example: CodeExample, eval_example: EvalExample):
- 
- 
- @pytest.mark.skipif(CodeExample is None or sys.platform not in {'linux', 'darwin'}, reason='Only on linux and macos')
--@pytest.mark.parametrize('example', find_examples(str(PYDANTIC_CORE_DIR / 'README.md')), ids=str)
-+@pytest.mark.parametrize('example', list(find_examples(str(PYDANTIC_CORE_DIR / 'README.md'))), ids=str)
- @pytest.mark.thread_unsafe  # TODO investigate why pytest_examples seems to be thread unsafe here
- def test_readme(example: CodeExample, eval_example: EvalExample):
-     eval_example.set_config(line_length=100, quotes='single')
-diff --git a/tests/test_docs.py b/tests/test_docs.py
-index 314dc8db6e..ac988769c2 100644
---- a/tests/test_docs.py
-+++ b/tests/test_docs.py
-@@ -171,7 +171,7 @@ def run_example(example: CodeExample, eval_example: EvalExample, mocker: Any) ->
- @pytest.mark.thread_unsafe
- @pytest.mark.filterwarnings('ignore:(parse_obj_as|schema_json_of|schema_of) is deprecated.*:DeprecationWarning')
- @pytest.mark.skipif(bool(skip_reason), reason=skip_reason or 'not skipping')
--@pytest.mark.parametrize('example', find_examples(str(SOURCES_ROOT), skip=sys.platform == 'win32'), ids=str)
-+@pytest.mark.parametrize('example', list(find_examples(str(SOURCES_ROOT), skip=sys.platform == 'win32')), ids=str)
- def test_docstrings_examples(example: CodeExample, eval_example: EvalExample, tmp_path: Path, mocker):
-     if str(example.path).startswith(str(SOURCES_ROOT / 'v1')):
-         pytest.skip('skip v1 examples')
-@@ -195,7 +195,7 @@ def set_cwd():
- @pytest.mark.thread_unsafe
- @pytest.mark.filterwarnings('ignore:(parse_obj_as|schema_json_of|schema_of) is deprecated.*:DeprecationWarning')
- @pytest.mark.skipif(bool(skip_reason), reason=skip_reason or 'not skipping')
--@pytest.mark.parametrize('example', find_examples(str(DOCS_ROOT), skip=sys.platform == 'win32'), ids=str)
-+@pytest.mark.parametrize('example', list(find_examples(str(DOCS_ROOT), skip=sys.platform == 'win32')), ids=str)
- def test_docs_examples(example: CodeExample, eval_example: EvalExample, tmp_path: Path, mocker):
-     global INDEX_MAIN
-     if example.path.name == 'index.md':
-@@ -215,7 +215,7 @@ def test_docs_examples(example: CodeExample, eval_example: EvalExample, tmp_path
- @pytest.mark.skipif(bool(skip_reason), reason=skip_reason or 'not skipping')
- @pytest.mark.skipif(sys.version_info >= (3, 13), reason='python-devtools does not yet support python 3.13')
- @pytest.mark.parametrize(
--    'example', find_examples(str(DOCS_ROOT / 'integrations/devtools.md'), skip=sys.platform == 'win32'), ids=str
-+    'example', list(find_examples(str(DOCS_ROOT / 'integrations/devtools.md'), skip=sys.platform == 'win32')), ids=str
- )
- def test_docs_devtools_example(example: CodeExample, eval_example: EvalExample, tmp_path: Path):
-     from ansi2html import Ansi2HTMLConverter
-diff --git a/tests/test_utils.py b/tests/test_utils.py
-index f0b0b71d9e..3b8f2afefa 100644
---- a/tests/test_utils.py
-+++ b/tests/test_utils.py
-@@ -368,7 +368,7 @@ def test_smart_deepcopy_immutable_non_sequence(obj, mocker):
-     assert smart_deepcopy(obj) is deepcopy(obj) is obj
- 
- 
--@pytest.mark.parametrize('empty_collection', (collection() for collection in BUILTIN_COLLECTIONS))
-+@pytest.mark.parametrize('empty_collection', [collection() for collection in BUILTIN_COLLECTIONS])
- def test_smart_deepcopy_empty_collection(empty_collection, mocker):
-     mocker.patch('pydantic._internal._utils.deepcopy', side_effect=RuntimeError)  # make sure deepcopy is not used
-     if not isinstance(empty_collection, (tuple, frozenset)):  # empty tuple or frozenset are always the same object
-@@ -377,7 +377,7 @@ def test_smart_deepcopy_empty_collection(empty_collection, mocker):
- 
- @pytest.mark.thread_unsafe(reason='Monkeypatching')
- @pytest.mark.parametrize(
--    'collection', (c.fromkeys((1,)) if issubclass(c, dict) else c((1,)) for c in BUILTIN_COLLECTIONS)
-+    'collection', [c.fromkeys((1,)) if issubclass(c, dict) else c((1,)) for c in BUILTIN_COLLECTIONS]
- )
- def test_smart_deepcopy_collection(collection, mocker):
-     expected_value = object()
-diff --git a/tests/test_validators.py b/tests/test_validators.py
-index aaff88cf9e..4c53b64cfd 100644
---- a/tests/test_validators.py
-+++ b/tests/test_validators.py
-@@ -1600,7 +1600,7 @@ class Model(BaseModel):
-     assert dict(Model(x=1, y=1)) == {'x': 2, 'y': 2}
- 
- 
--@pytest.mark.parametrize('validator_classmethod,root_validator_classmethod', product(*[[True, False]] * 2))
-+@pytest.mark.parametrize('validator_classmethod,root_validator_classmethod', list(product(*[[True, False]] * 2)))
- def test_root_validator_classmethod(validator_classmethod, root_validator_classmethod):
-     root_val_values = []
- 

diff --git a/e3fe82eba47c78758a21d8413c52063fc105550e.patch b/e3fe82eba47c78758a21d8413c52063fc105550e.patch
deleted file mode 100644
index bd59446..0000000
--- a/e3fe82eba47c78758a21d8413c52063fc105550e.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From e3fe82eba47c78758a21d8413c52063fc105550e Mon Sep 17 00:00:00 2001
-From: Colin Watson <cjwatson@debian.org>
-Date: Sun, 28 Jun 2026 15:52:39 +0100
-Subject: [PATCH] Fix use of pytest.warns(match=...)
-
-When called with a callable as a positional argument after the expected
-warning, `pytest.warns` either ignores the `match` keyword argument
-(pytest < 9.1.0) or passes it on to the provided callable (pytest >=
-9.1.0).  In the former case it was merely ineffective, masking an
-apparent bug (#13356), while in the latter case it results in
-`TypeError: ... got an unexpected keyword argument 'match'`.
----
- tests/test_deprecated_fields.py | 33 +++++++++++++++++++++++----------
- 1 file changed, 23 insertions(+), 10 deletions(-)
-
-diff --git a/tests/test_deprecated_fields.py b/tests/test_deprecated_fields.py
-index b17f037ede2..a677a8301bc 100644
---- a/tests/test_deprecated_fields.py
-+++ b/tests/test_deprecated_fields.py
-@@ -25,7 +25,8 @@ class Model(BaseModel):
- 
-     instance = Model(a=1, b=1, c=1)
- 
--    pytest.warns(DeprecationWarning, lambda: instance.a, match='^$')
-+    with pytest.warns(DeprecationWarning, match='^$'):
-+        instance.a
- 
-     with pytest.warns(DeprecationWarning, match='^This is deprecated$'):
-         b = instance.b
-@@ -52,9 +53,12 @@ class Model(BaseModel):
- 
-     instance = Model(a=1)
- 
--    pytest.warns(DeprecationWarning, lambda: instance.a, match='^$')
--    pytest.warns(DeprecationWarning, lambda: instance.b, match='^This is deprecated$')
--    pytest.warns(DeprecationWarning, lambda: instance.c, match='^This is deprecated$')
-+    with pytest.warns(DeprecationWarning, match='^$'):
-+        instance.a
-+    with pytest.warns(DeprecationWarning, match='^This is deprecated$'):
-+        instance.b
-+    with pytest.warns(DeprecationWarning, match='^This is deprecated$'):
-+        instance.c
- 
- 
- def test_deprecated_fields_field_validator():
-@@ -147,10 +151,17 @@ def p5(self) -> int:
- 
-     instance = Model()
- 
--    pytest.warns(DeprecationWarning, lambda: instance.p1, match='^This is deprecated$')
--    pytest.warns(DeprecationWarning, lambda: instance.p2, match='^This is deprecated$')
--    pytest.warns(DeprecationWarning, lambda: instance.p4, match='^This is deprecated$')
--    pytest.warns(DeprecationWarning, lambda: instance.p5, match='^This is deprecated$')
-+    with pytest.warns(DeprecationWarning, match='^This is deprecated$'):
-+        instance.p1
-+    # TODO: This should be match='^This is deprecated$' instead, but the
-+    # overriding mechanism has apparently never worked:
-+    # https://github.com/pydantic/pydantic/issues/13356
-+    with pytest.warns(DeprecationWarning, match=r'^This is deprecated \(this message is overridden\)$'):
-+        instance.p2
-+    with pytest.warns(DeprecationWarning, match='^This is deprecated$'):
-+        instance.p4
-+    with pytest.warns(DeprecationWarning, match='^This is deprecated$'):
-+        instance.p5
- 
-     with pytest.warns(DeprecationWarning, match='^$'):
-         p3 = instance.p3
-@@ -219,7 +230,8 @@ class Model(BaseModel):
- 
-     instance = Model(a=1, b=1)
- 
--    pytest.warns(DeprecationWarning, lambda: instance.a, match='deprecated')
-+    with pytest.warns(DeprecationWarning, match='deprecated'):
-+        instance.a
- 
- 
- def test_computed_field_deprecated_class_access() -> None:
-@@ -257,7 +269,8 @@ class Model(BaseModel):
- 
-     m = Model()
- 
--    pytest.warns(DeprecationWarning, lambda: m.a, match='test')
-+    with pytest.warns(DeprecationWarning, match='test'):
-+        m.a
- 
- 
- def test_deprecated_field_with_assignment() -> None:

diff --git a/python-pydantic.spec b/python-pydantic.spec
index 3fc49b5..f92e6e7 100644
--- a/python-pydantic.spec
+++ b/python-pydantic.spec
@@ -1,7 +1,7 @@
 %bcond tests 1
 
 Name:           python-pydantic
-Version:        2.13.5
+Version:        2.14.1
 #%%global srcversion %%{lua:return(rpm.expand("%%{version}"):gsub("~",""))}
 Release:        %autorelease
 Summary:        Data validation using Python type hinting
@@ -11,11 +11,6 @@ License:        MIT
 URL:            https://github.com/pydantic/pydantic
 Source:         %{url}/archive/v%{version}/pydantic-%{version}.tar.gz
 
-# Fix test failures with pytest >= 9.1.0 (non-Collection iterables in parametrize)
-Patch:          https://github.com/pydantic/pydantic/commit/53706f8f95585f2ae0cee43c1df944956dd2a31f.patch
-# Fix use of pytest.warns(match=...) with pytest >= 9.1.0
-Patch:          https://github.com/pydantic/pydantic/commit/e3fe82eba47c78758a21d8413c52063fc105550e.patch
-
 BuildArch:      noarch
 
 BuildRequires:  tomcli
@@ -44,11 +39,11 @@ BuildRequires:  %{py3_dist jsonschema}
 BuildRequires:  %{py3_dist cloudpickle}
 # devtools is not packaged; ansi2html is used only with devtools
 # sqlalchemy is "used in docs tests" that we do not run
-# pytest-memray is a profiler, therefore unwanted downstream
+# pytest-memray/memray is a profiler, therefore unwanted downstream
 %endif
 
 %global _description %{expand:
-Data validation and settings management using python type hinting.}
+%{summary}.}
 
 %description %{_description}
 
@@ -77,10 +72,10 @@ This package includes the documentation for Pydantic in Markdown format.
 rm -rv pydantic-core/
 
 # Delete pytest addopts. We don't care about benchmarking or coverage.
-tomcli-set pyproject.toml del 'tool.pytest.ini_options.addopts'
+tomcli-set pyproject.toml del tool.pytest.addopts
 # Work around patched-out pytest-run-parallel plugin dependency (avoid
 # "pytest.PytestUnknownMarkWarning: Unknown pytest.mark.thread_unsafe" error)
-tomcli-set pyproject.toml append 'tool.pytest.ini_options.markers' \
+tomcli-set pyproject.toml append tool.pytest.markers \
     'thread_unsafe: mark as incompatible with patched-out pytest-run-parallel'
 
 

diff --git a/sources b/sources
index 3ad3e28..da3adf1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (pydantic-2.13.5.tar.gz) = fd607e9bb5599737638401e9dedb4baa454b7f308b461319d59913b603f6e072354c40b161802c8198ee0961052207a2a4da7b861da6fbfd14f2dbb0f61ba762
+SHA512 (pydantic-2.14.1.tar.gz) = 70d4a6513f49e4644c07acc7eba2fde0e05724db8ac8fb9777414ae65dbb30f796db94d5843e869d7a1655eb0f2c09f230454a394c095b97fcf5088795cc8493

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-22  6:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22  6:22 [rpms/python-pydantic] rawhide: Update to 2.14.1 (close RHBZ#2548015) Benjamin A. Beasley

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