Repository: getlogbook/logbook (language: python)

Issue:
Building fails with cython 3.0.0
Running cython3 logbook/_speedups.pyx fails:
```
+ /usr/bin/cython3 logbook/_speedups.pyx                                                      
                                                                                              
Error compiling Cython file:                                                                  
------------------------------------------------------------                                  
...                                                                                           
        return getattr(obj.group, self.name)                                                  
                                                                                              
    def __set__(self, obj, value):                                                            
        setattr(obj, self._name, value)                                                       
                                                                                              
    def __del__(self, obj):                                                                   
    ^                                                                                         
------------------------------------------------------------                                  
                                                                                              
logbook/_speedups.pyx:54:4: Special method __del__ has wrong number of arguments (2 declared, 1 expected)
```


Discussion / hints:
I'll fix this before the next release

Fix patch:
diff --git a/src/logbook/_speedups.pyx b/src/logbook/_speedups.pyx
index b85961f..a4bb55a 100644
--- a/src/logbook/_speedups.pyx
+++ b/src/logbook/_speedups.pyx
@@ -62,7 +62,7 @@ cdef class group_reflected_property:
     def __set__(self, obj, value):
         setattr(obj, self._name, value)
 
-    def __del__(self, obj):
+    def __delete__(self, obj):
         delattr(obj, self._name)
 
 


Test patch:
diff --git a/tests/test_speedups.py b/tests/test_speedups.py
new file mode 100644
index 0000000..c502df9
--- /dev/null
+++ b/tests/test_speedups.py
@@ -0,0 +1,32 @@
+import importlib
+
+import pytest
+
+
+@pytest.fixture(params=["speedups", "fallback"])
+def speedups_module(request):
+    mod_name = f"logbook._{request.param}"
+    try:
+        return importlib.import_module(mod_name)
+    except ImportError:
+        pytest.skip(f"{mod_name} is not available")
+
+
+def test_group_reflected_property(speedups_module):
+    class Group:
+        foo = "group"
+
+    class A:
+        foo = speedups_module.group_reflected_property("foo", "default")
+
+        def __init__(self, group=None):
+            self.group = group
+
+    a = A()
+    assert a.foo == "default"
+    a.group = Group()
+    assert a.foo == "group"
+    a.foo = "set"
+    assert a.foo == "set"
+    del a.foo
+    assert a.foo == "group"