-
-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Labels
Description
Some Pygame types do not support weak references, which can be an obstacle in some use cases such as caching:
File "/usr/lib/python3.13/weakref.py", line 348, in __new__
self = ref.__new__(type, ob, callback)
TypeError: cannot create weak reference to 'pygame._sdl2.video.Texture' object
File "/usr/lib/python3.13/weakref.py", line 348, in __new__
self = ref.__new__(type, ob, callback)
TypeError: cannot create weak reference to 'pygame.freetype.Font' object
Similar classes (pygame.Surface
and pygame.Font
for example) do support weak referencing, so I would suggest more consistently supporting it. Would a PR for this be welcome?