Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pydantic-core for
openSUSE:Factory checked in at 2026-09-28 10:35:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pydantic-core (Old)
and /work/SRC/openSUSE:Factory/.python-pydantic-core.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pydantic-core"
Mon Sep 28 10:35:26 2026 rev:16 rq:1379940 version:2.46.5
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pydantic-core/python-pydantic-core.changes
2026-09-01 15:45:46.495346022 +0200
+++
/work/SRC/openSUSE:Factory/.python-pydantic-core.new.383539/python-pydantic-core.changes
2026-09-28 10:36:28.043858955 +0200
@@ -1,0 +2,5 @@
+Wed Sep 23 10:58:32 UTC 2026 - Markéta Machová <[email protected]>
+
+- Add upstream pytest91.patch to fix tests with pytest 9.1
+
+-------------------------------------------------------------------
New:
----
pytest91.patch
----------(New B)----------
New:
- Add upstream pytest91.patch to fix tests with pytest 9.1
----------(New E)----------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pydantic-core.spec ++++++
--- /var/tmp/diff_new_pack.FcETzB/_old 2026-09-28 10:36:28.763889136 +0200
+++ /var/tmp/diff_new_pack.FcETzB/_new 2026-09-28 10:36:28.764889178 +0200
@@ -33,6 +33,8 @@
URL: https://github.com/pydantic/pydantic/tree/main/pydantic-core
Source0:
https://files.pythonhosted.org/packages/source/p/pydantic-core/pydantic_core-%{version}.tar.gz
Source1: vendor.tar.xz
+# PATCH-FIX-UPSTREAM https://github.com/pydantic/pydantic/pull/13357 Fix test
failures with pytest >= 9.1.0
+Patch0: pytest91.patch
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module inline-snapshot}
BuildRequires: %{python_module maturin >= 1}
++++++ pytest91.patch ++++++
>From f257d0155c6643fbda9516af6b2c4ca082ed7651 Mon Sep 17 00:00:00 2001
From: Colin Watson <[email protected]>
Date: Mon, 29 Jun 2026 07:53:22 +0100
Subject: [PATCH] Fix test failures with pytest >= 9.1.0 (#13357)
---
.../tests/benchmarks/test_micro_benchmarks.py | 51 ++++++++++++-------
.../benchmarks/test_serialization_micro.py | 9 ++--
tests/test_docstrings.py | 4 +-
tests/validators/test_union.py | 14 ++---
tests/test_deprecated_fields.py | 33 ++++++++----
tests/test_docs.py | 6 +--
tests/test_utils.py | 4 +-
tests/test_validators.py | 2 +-
uv.lock | 6 +--
9 files changed, 82 insertions(+), 47 deletions(-)
diff --git a/tests/benchmarks/test_micro_benchmarks.py
b/tests/benchmarks/test_micro_benchmarks.py
index 65efdce7cfc..b7123445c6d 100644
--- a/tests/benchmarks/test_micro_benchmarks.py
+++ b/tests/benchmarks/test_micro_benchmarks.py
@@ -39,7 +39,8 @@
class TestBenchmarkSimpleModel:
@pytest.fixture(scope='class')
- def core_validator_fs(self):
+ @classmethod
+ def core_validator_fs(cls):
class CoreModel:
__slots__ = '__dict__', '__pydantic_fields_set__',
'__pydantic_extra__', '__pydantic_private__'
@@ -81,7 +82,8 @@ def test_core_json_fs(self, core_validator_fs, benchmark):
class TestModelLarge:
@pytest.fixture(scope='class')
- def core_model_validator(self):
+ @classmethod
+ def core_model_validator(cls):
class CoreModel:
__slots__ = '__dict__', '__pydantic_fields_set__',
'__pydantic_extra__', '__pydantic_private__'
@@ -567,7 +569,8 @@ def test_bytes_core(benchmark):
class TestBenchmarkDateTime:
@pytest.fixture(scope='class')
- def core_validator(self):
+ @classmethod
+ def core_validator(cls):
class CoreModel:
__slots__ = '__dict__', '__pydantic_fields_set__',
'__pydantic_extra__', '__pydantic_private__'
@@ -581,19 +584,23 @@ class CoreModel:
)
@pytest.fixture(scope='class')
- def datetime_raw(self):
+ @classmethod
+ def datetime_raw(cls):
return datetime.now(timezone.utc) + timedelta(days=1)
@pytest.fixture(scope='class')
- def datetime_str(self, datetime_raw):
+ @classmethod
+ def datetime_str(cls, datetime_raw):
return str(datetime_raw)
@pytest.fixture(scope='class')
- def python_data_dict(self, datetime_raw):
+ @classmethod
+ def python_data_dict(cls, datetime_raw):
return {'dt': datetime_raw}
@pytest.fixture(scope='class')
- def json_dict_data(self, datetime_str):
+ @classmethod
+ def json_dict_data(cls, datetime_str):
return json.dumps({'dt': datetime_str})
@pytest.mark.benchmark(group='datetime model - python')
@@ -631,7 +638,8 @@ def test_core_future_str(self, benchmark, datetime_str):
class TestBenchmarkDateX:
@pytest.fixture(scope='class')
- def validator(self):
+ @classmethod
+ def validator(cls):
return SchemaValidator(core_schema.date_schema())
@pytest.mark.benchmark(group='date from date')
@@ -712,7 +720,8 @@ def validate_with_expected_error():
class TestBenchmarkUUID:
@pytest.fixture(scope='class')
- def core_validator(self):
+ @classmethod
+ def core_validator(cls):
class CoreModel:
__slots__ = '__dict__', '__pydantic_fields_set__',
'__pydantic_extra__', '__pydantic_private__'
@@ -726,11 +735,13 @@ class CoreModel:
)
@pytest.fixture(scope='class')
- def validator(self):
+ @classmethod
+ def validator(cls):
return SchemaValidator(core_schema.uuid_schema())
@pytest.fixture(scope='class')
- def pydantic_validator(self):
+ @classmethod
+ def pydantic_validator(cls):
def to_UUID(v: Any) -> UUID:
if isinstance(v, UUID):
return v
@@ -780,19 +791,23 @@ def test_uuid_from_uuid_pyd(self, benchmark,
pydantic_validator):
benchmark(pydantic_validator.validate_python,
UUID('12345678-1234-5678-1234-567812345678'))
@pytest.fixture(scope='class')
- def uuid_raw(self):
+ @classmethod
+ def uuid_raw(cls):
return UUID('12345678-1234-5678-1234-567812345678')
@pytest.fixture(scope='class')
- def uuid_str(self, uuid_raw):
+ @classmethod
+ def uuid_str(cls, uuid_raw):
return str(uuid_raw)
@pytest.fixture(scope='class')
- def python_data_dict(self, uuid_raw):
+ @classmethod
+ def python_data_dict(cls, uuid_raw):
return {'u': uuid_raw}
@pytest.fixture(scope='class')
- def json_dict_data(self, uuid_str):
+ @classmethod
+ def json_dict_data(cls, uuid_str):
return json.dumps({'u': uuid_str})
@pytest.mark.benchmark(group='uuid model - python')
@@ -1361,11 +1376,13 @@ def f(v: int, info: core_schema.ValidationInfo) -> int:
class TestBenchmarkDecimal:
@pytest.fixture(scope='class')
- def validator(self):
+ @classmethod
+ def validator(cls):
return SchemaValidator(core_schema.decimal_schema())
@pytest.fixture(scope='class')
- def pydantic_validator(self):
+ @classmethod
+ def pydantic_validator(cls):
Decimal = decimal.Decimal
def to_decimal(v: str) -> decimal.Decimal:
diff --git a/tests/benchmarks/test_serialization_micro.py
b/tests/benchmarks/test_serialization_micro.py
index a7c7a54ef5f..6712d0a5e7e 100644
--- a/tests/benchmarks/test_serialization_micro.py
+++ b/tests/benchmarks/test_serialization_micro.py
@@ -10,7 +10,8 @@
class TestBenchmarkSimpleModel:
@pytest.fixture(scope='class')
- def core_schema(self):
+ @classmethod
+ def core_schema(cls):
class CoreModel:
__slots__ = '__dict__', '__pydantic_fields_set__',
'__pydantic_extra__', '__pydantic_private__'
@@ -32,11 +33,13 @@ class CoreModel:
}
@pytest.fixture(scope='class')
- def core_validator(self, core_schema):
+ @classmethod
+ def core_validator(cls, core_schema):
return SchemaValidator(core_schema)
@pytest.fixture(scope='class')
- def core_serializer(self, core_schema):
+ @classmethod
+ def core_serializer(cls, core_schema):
return SchemaSerializer(core_schema)
data = {'name': 'John', 'age': 42, 'friends': list(range(200)),
'settings': {f'v_{i}': i / 2.0 for i in range(50)}}
diff --git a/tests/test_docstrings.py b/tests/test_docstrings.py
index bfde27c3d0a..d8057432d1f 100644
--- a/tests/test_docstrings.py
+++ b/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')
[email protected]('example', find_examples(str(PYDANTIC_CORE_DIR /
'README.md')), ids=str)
[email protected]('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/validators/test_union.py b/tests/validators/test_union.py
index 8169c91535c..268e5a40b56 100644
--- a/tests/validators/test_union.py
+++ b/tests/validators/test_union.py
@@ -61,12 +61,13 @@ class ModelB:
pass
@pytest.fixture(scope='class')
- def schema_validator(self) -> SchemaValidator:
+ @classmethod
+ def schema_validator(cls) -> SchemaValidator:
return SchemaValidator(
schema=core_schema.union_schema(
choices=[
core_schema.model_schema(
- cls=self.ModelA,
+ cls=cls.ModelA,
schema=core_schema.model_fields_schema(
fields={
'a':
core_schema.model_field(schema=core_schema.int_schema()),
@@ -75,7 +76,7 @@ def schema_validator(self) -> SchemaValidator:
),
),
core_schema.model_schema(
- cls=self.ModelB,
+ cls=cls.ModelB,
schema=core_schema.model_fields_schema(
fields={
'c':
core_schema.model_field(schema=core_schema.int_schema()),
@@ -124,12 +125,13 @@ class ModelB:
pass
@pytest.fixture(scope='class')
- def schema_validator(self) -> SchemaValidator:
+ @classmethod
+ def schema_validator(cls) -> SchemaValidator:
return SchemaValidator(
schema=core_schema.union_schema(
choices=[
core_schema.model_schema(
- cls=self.ModelA,
+ cls=cls.ModelA,
schema=core_schema.model_fields_schema(
fields={
'a':
core_schema.model_field(schema=core_schema.int_schema()),
@@ -138,7 +140,7 @@ def schema_validator(self) -> SchemaValidator:
),
),
core_schema.model_schema(
- cls=self.ModelB,
+ cls=cls.ModelB,
schema=core_schema.model_fields_schema(
fields={
'a':
core_schema.model_field(schema=core_schema.int_schema()),