Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-psygnal for openSUSE:Factory 
checked in at 2025-04-30 19:04:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-psygnal (Old)
 and      /work/SRC/openSUSE:Factory/.python-psygnal.new.30101 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-psygnal"

Wed Apr 30 19:04:32 2025 rev:7 rq:1273548 version:0.12.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-psygnal/python-psygnal.changes    
2025-02-04 19:34:56.807537059 +0100
+++ /work/SRC/openSUSE:Factory/.python-psygnal.new.30101/python-psygnal.changes 
2025-04-30 19:04:38.426971570 +0200
@@ -1,0 +2,7 @@
+Wed Apr 30 05:00:03 UTC 2025 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Add patch support-pydantic-211.patch:
+  * Support Pydantic 2.11 changes by not calling model_fields on
+    instances.
+
+-------------------------------------------------------------------

New:
----
  support-pydantic-211.patch

BETA DEBUG BEGIN:
  New:
- Add patch support-pydantic-211.patch:
  * Support Pydantic 2.11 changes by not calling model_fields on
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-psygnal.spec ++++++
--- /var/tmp/diff_new_pack.1gKXEk/_old  2025-04-30 19:04:38.974994415 +0200
+++ /var/tmp/diff_new_pack.1gKXEk/_new  2025-04-30 19:04:38.978994582 +0200
@@ -23,12 +23,13 @@
 License:        BSD-3-Clause
 URL:            https://github.com/pyapp-kit/psygnal
 Source:         
https://files.pythonhosted.org/packages/source/p/psygnal/psygnal-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM gh#pyapp-kit/psygnal#364
+Patch0:         support-pydantic-211.patch
 BuildRequires:  %{python_module hatch-vcs}
 BuildRequires:  %{python_module hatchling >= 1.8.0}
 BuildRequires:  %{python_module pip}
 BuildRequires:  python-rpm-macros
 # SECTION test requirements
-BuildRequires:  %{python_module mypy_extensions}
 BuildRequires:  %{python_module attrs}
 BuildRequires:  %{python_module dask}
 BuildRequires:  %{python_module msgspec}
@@ -37,12 +38,9 @@
 BuildRequires:  %{python_module pytest >= 6.0}
 BuildRequires:  %{python_module pytest-cov}
 BuildRequires:  %{python_module toolz}
-BuildRequires:  %{python_module typing-extensions >= 3.7.4.2}
 BuildRequires:  %{python_module wrapt}
 # /SECTION
 BuildRequires:  fdupes
-Requires:       python-mypy_extensions
-Requires:       python-typing-extensions >= 3.7.4.2
 Suggests:       python-dask
 Suggests:       python-ipython
 Suggests:       python-numpy

++++++ support-pydantic-211.patch ++++++
>From e26b74711c598d383112c3450e044d6389fd8be8 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <ste...@wedontsleep.org>
Date: Wed, 30 Apr 2025 14:53:55 +1000
Subject: [PATCH] Don't use deprecated model_fields access

Pydantic 2.11 has deprecated accessing model_fields from instances of
the model class, instead requiring callers to use the class itself.

Fixes #356
---
 src/psygnal/_evented_model.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/psygnal/_evented_model.py b/src/psygnal/_evented_model.py
index 31f90f98..c1cf1c57 100644
--- a/src/psygnal/_evented_model.py
+++ b/src/psygnal/_evented_model.py
@@ -111,7 +111,7 @@ def _get_defaults(
     ) -> dict[str, Any]:
         """Get possibly nested default values for a Model object."""
         dflt = {}
-        for k, v in obj.model_fields.items():
+        for k, v in type(obj).model_fields.items():
             d = v.get_default()
             if (
                 d is None
@@ -547,7 +547,7 @@ def update(self, values: Union["EventedModel", dict], 
recurse: bool = True) -> N
     def reset(self) -> None:
         """Reset the state of the model to default values."""
         model_config = _get_config(self)
-        model_fields = _get_fields(self)
+        model_fields = _get_fields(type(self))
         for name, value in self._defaults.items():
             if isinstance(value, EventedModel):
                 cast("EventedModel", getattr(self, name)).reset()

Reply via email to