public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pygame] rawhide: Fix Cython 3.3 compatibility
@ 2026-11-10 18:44 Lumir Balhar
  0 siblings, 0 replies; only message in thread
From: Lumir Balhar @ 2026-11-10 18:44 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/pygame
Branch : rawhide
Commit : f4bdd7c085cfe4c556f1c4350f8459e7923e5a55
Author : Lumir Balhar <lbalhar@redhat.com>
Date   : 2026-11-04T08:18:35+01:00
Stats  : +33/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/pygame/c/f4bdd7c085cfe4c556f1c4350f8459e7923e5a55?branch=rawhide

Log:
Fix Cython 3.3 compatibility

---
diff --git a/4912.patch b/4912.patch
new file mode 100644
index 0000000..51bb40c
--- /dev/null
+++ b/4912.patch
@@ -0,0 +1,27 @@
+From 4113984c90f8fe2acf93924fd60147071cb5c444 Mon Sep 17 00:00:00 2001
+From: Lumir Balhar <lbalhar@redhat.com>
+Date: Wed, 4 Nov 2026 08:06:14 +0100
+Subject: [PATCH] Fix Cython 3.3 compatibility: remove illegal __dict__
+ assignment in __cinit__
+
+Cython 3.3.0 made accessing cdef __dict__ directly an error when the
+attribute is declared in an extension type. The self.__dict__ = {}
+initialization in Sprite.__cinit__ is now rejected. Removing it is safe
+because Cython initializes the __dict__ slot automatically when
+cdef dict __dict__ is declared.
+---
+ src_c/cython/pygame/_sprite.pyx | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src_c/cython/pygame/_sprite.pyx b/src_c/cython/pygame/_sprite.pyx
+index 52d0c984c6..44cbbe8935 100644
+--- a/src_c/cython/pygame/_sprite.pyx
++++ b/src_c/cython/pygame/_sprite.pyx
+@@ -145,7 +145,6 @@ cdef class Sprite:
+     cdef dict __dict__
+ 
+     def __cinit__(self):
+-        self.__dict__ = {}
+         self.__g = set() # The groups the sprite is in
+ 
+     def __init__(self, *groups):

diff --git a/pygame.spec b/pygame.spec
index 187b67c..bef50c1 100644
--- a/pygame.spec
+++ b/pygame.spec
@@ -1,6 +1,6 @@
 Name:           pygame
 Version:        2.6.1
-Release:        14%{?dist}
+Release:        15%{?dist}
 Summary:        Python modules for writing games
 
 License:        LGPL-2.0-or-later
@@ -26,6 +26,8 @@ BuildRequires:  gcc
 Patch:          pygame-2.6.1-python-3.15-fix.patch
 # https://github.com/pygame/pygame/pull/4849
 Patch:          pygame-2.6.1-setuptools-82-fix.patch
+# Fix Cython 3.3 compatibility: __dict__ is now a special attribute in extension types
+Patch:          https://github.com/pygame/pygame/pull/4912.patch
 
 %global _description\
 Pygame is a set of Python modules designed for writing games. It is\
@@ -117,6 +119,9 @@ PYTHONPATH="$RPM_BUILD_ROOT%{python3_sitearch}" %{__python3} test/rect_test.py
 %{_includedir}/python*/%{name}/
 
 %changelog
+* Wed Nov 04 2026 Lumír Balhar <lbalhar@redhat.com> - 2.6.1-15
+- Fix compatibility with Cython 3.3
+
 * Mon Oct 19 2026 Gwyn Ciesla <gwync@protonmail.com> - 2.6.1-14
 - Require libxmp, see 2554603
 

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

only message in thread, other threads:[~2026-11-10 18:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 18:44 [rpms/pygame] rawhide: Fix Cython 3.3 compatibility Lumir Balhar

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