summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-06-04 12:33:37 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-06-04 12:33:37 +0200
commit7ee7a39cd848d3401f5c12549d56bc77bc37d419 (patch)
tree8841e82833ff12ac031871d78942803f6bd4c774
parentcefaa6522d60c4daecf01083641b874235f07bb3 (diff)
parent8359cf76506610b1e3c552f2012f6657c57fb489 (diff)
downloadcython-7ee7a39cd848d3401f5c12549d56bc77bc37d419.tar.gz
Merge branch '0.29.x'
-rw-r--r--CHANGES.rst6
-rw-r--r--Cython/Utility/CythonFunction.c3
-rw-r--r--tests/run/fused_types.pyx1
3 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 5077d461b..9641718f6 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -454,6 +454,12 @@ Other changes
Bugs fixed
----------
+* The ``@classmethod`` decorator no longer rejects unknown input from other decorators.
+ Patch by David Woods. (Github issue #3660)
+
+* Fused types could leak into unrelated usages.
+ Patch by David Woods. (Github issue #3642)
+
* Now uses ``Py_SET_SIZE()`` and ``Py_SET_REFCNT()`` in Py3.9+ to avoid low-level
write access to these object fields.
Patch by Victor Stinner. (Github issue #3639)
diff --git a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
index 4fb0f9cf9..599109e58 100644
--- a/Cython/Utility/CythonFunction.c
+++ b/Cython/Utility/CythonFunction.c
@@ -1484,8 +1484,7 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
// python classes
return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
}
- else
- {
+ else {
return PyClassMethod_New(method);
}
}
diff --git a/tests/run/fused_types.pyx b/tests/run/fused_types.pyx
index 823d22ace..3dddb7e14 100644
--- a/tests/run/fused_types.pyx
+++ b/tests/run/fused_types.pyx
@@ -485,6 +485,7 @@ def test_fused_in_check():
print(in_check_2[float, double](1.0, 2.0))
print(in_check_3[float](1.0))
+
### see GH3642 - presence of cdef inside "unrelated" caused a type to be incorrectly inferred
cdef unrelated(cython.floating x):
cdef cython.floating t = 1