Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-atom for openSUSE:Factory 
checked in at 2026-09-09 16:20:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-atom (Old)
 and      /work/SRC/openSUSE:Factory/.python-atom.new.1265 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-atom"

Wed Sep  9 16:20:32 2026 rev:17 rq:1376524 version:0.12.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-atom/python-atom.changes  2025-10-30 
17:10:55.813448807 +0100
+++ /work/SRC/openSUSE:Factory/.python-atom.new.1265/python-atom.changes        
2026-09-09 16:22:48.920189379 +0200
@@ -1,0 +2,6 @@
+Wed Sep  9 05:19:27 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch no-pyweakref-get-object.patch:
+  * Do not call PyWeakref_GET_OBJECT, use PyWeakref_GetRef instead.
+
+-------------------------------------------------------------------

New:
----
  no-pyweakref-get-object.patch

----------(New B)----------
  New:
- Add patch no-pyweakref-get-object.patch:
  * Do not call PyWeakref_GET_OBJECT, use PyWeakref_GetRef instead.
----------(New E)----------

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

Other differences:
------------------
++++++ python-atom.spec ++++++
--- /var/tmp/diff_new_pack.UtszZw/_old  2026-09-09 16:22:50.043236315 +0200
+++ /var/tmp/diff_new_pack.UtszZw/_new  2026-09-09 16:22:50.046236440 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-atom
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,8 @@
 License:        BSD-3-Clause
 URL:            https://github.com/nucleic/atom
 Source:         
https://files.pythonhosted.org/packages/source/a/atom/atom-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM gh#nucleic/atom#273
+Patch0:         no-pyweakref-get-object.patch
 BuildRequires:  %{python_module cppy >= 1.2.0}
 BuildRequires:  %{python_module devel >= 3.10}
 BuildRequires:  %{python_module pip}
@@ -34,9 +36,6 @@
 BuildRequires:  c++_compiler
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-%if 0%{?python_version_nodots} < 311
-Requires:       python-typing-extensions
-%endif
 %python_subpackages
 
 %description
@@ -46,7 +45,7 @@
 model binding behaviour for the Enaml UI framework.
 
 %prep
-%setup -q -n atom-%{version}
+%autosetup -p1 -n atom-%{version}
 
 %build
 export CFLAGS="%{optflags} -fno-strict-aliasing"

++++++ no-pyweakref-get-object.patch ++++++
>From b6b1e69eaae6f06a0a689e247b3423b709b5b2ad Mon Sep 17 00:00:00 2001
From: Steve Kowalik <[email protected]>
Date: Wed, 9 Sep 2026 15:09:57 +1000
Subject: [PATCH] Wrap use of PyWeakref_GET_OBJECT if we need it

Python 3.15 removes PyWeakref_GET_OBJECT, and the path forward is by
using PyWeakref_GetRef, which was only added in Python 3.13. Add a
wrapper for it if required, and switch to using PyWeakref_GetRef
everywhere that called PyWeakref_GET_OBJECT.
---
 atom/src/methodwrapper.cpp | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/atom/src/methodwrapper.cpp b/atom/src/methodwrapper.cpp
index 4bc8cbf5..6a4ec38d 100644
--- a/atom/src/methodwrapper.cpp
+++ b/atom/src/methodwrapper.cpp
@@ -6,12 +6,22 @@
 | The full license is in the file LICENSE, distributed with this software.
 |----------------------------------------------------------------------------*/
 #include <cppy/cppy.h>
+
+#if PY_VERSION_HEX < 0x030D0000
+// Can be removed when Python < 3.13 is no longer supported
+static inline int PyWeakref_GetRef(PyObject *ref, PyObject **pobj) {
+    PyObject *obj = PyWeakref_GET_OBJECT(ref);
+    *pobj = obj;
+    Py_XINCREF(*pobj);
+    return 1;
+}
+#endif
+
 #include "methodwrapper.h"
 #include "catom.h"
 #include "catompointer.h"
 #include "packagenaming.h"
 
-
 namespace atom
 {
 
@@ -38,10 +48,12 @@ MethodWrapper_dealloc( MethodWrapper* self )
 PyObject*
 MethodWrapper__call__( MethodWrapper* self, PyObject* args, PyObject* kwargs )
 {
-    PyObject* im_self = PyWeakref_GET_OBJECT( self->im_selfref );
+    PyObject* raw_im_self = nullptr;
+    PyWeakref_GetRef( self->im_selfref, &raw_im_self );
+    cppy::ptr im_self( raw_im_self );
     if( im_self != Py_None )
     {
-        cppy::ptr method( PyMethod_New( self->im_func, im_self ) );
+        cppy::ptr method( PyMethod_New( self->im_func, im_self.get() ) );
         if( !method )
             return 0;
         return PyObject_Call( method.get(), args, kwargs );
@@ -57,8 +69,12 @@ MethodWrapper_richcompare( MethodWrapper* self, PyObject* 
other, int op )
     {
         if( PyMethod_Check( other ) && PyMethod_GET_SELF( other ) )
         {
+            PyObject* raw_im_self = nullptr;
+            PyWeakref_GetRef( self->im_selfref, &raw_im_self );
+            cppy::ptr im_self( raw_im_self ); // Automatically handles DECREF 
when exiting scope
+
             if( ( self->im_func == PyMethod_GET_FUNCTION( other ) ) &&
-                ( PyWeakref_GET_OBJECT( self->im_selfref ) == 
PyMethod_GET_SELF( other ) ) )
+                ( im_self.get() == PyMethod_GET_SELF( other ) ) )
                 Py_RETURN_TRUE;
             Py_RETURN_FALSE;
         }
@@ -80,7 +96,10 @@ MethodWrapper_richcompare( MethodWrapper* self, PyObject* 
other, int op )
 int
 MethodWrapper__bool__( MethodWrapper* self )
 {
-    if( PyWeakref_GET_OBJECT( self->im_selfref ) != Py_None )
+    PyObject* raw_im_self = nullptr;
+    PyWeakref_GetRef( self->im_selfref, &raw_im_self );
+    cppy::ptr im_self( raw_im_self );
+    if( im_self.get() != Py_None )
         return 1;
     return 0;
 }

Reply via email to