aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2022-02-06 12:00:09 +0100
committerChristian Tismer <tismer@stackless.com>2022-02-08 22:30:58 +0100
commitc69b51fc296e484c30582d5d2fdaf40619cc43fe (patch)
tree1c0d888221e4c048e3f60cbc5c41e7a6232bcf54
parent6daa3e6d592fa383d16038a670945a2c78872c8d (diff)
PyPySide: Remove a disambiguation patch no longer needed
CPython always had a differentiation between PyMethod and PyCFunction which PyPy did not have and regarded as quite artificial. When NumPy suddenly started to grow warnings about this in a recent version, the PyPy team quickly added such a distinction, and we get rid of a patch. :) This patch was introduced on 2021-11-09: "PyPySide: Fix BindingManager::getOverride and others" [ChangeLog][PySide6] After PyPy lerned to distinguish between PyMethod and PyCFunction, we could remove a patch. Task-number: PYSIDE-535 Change-Id: I441ae7756331b5deccf67e261a7919e4d3e1e1f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/shiboken6/libshiboken/pep384impl.cpp12
-rw-r--r--sources/shiboken6/libshiboken/pep384impl.h9
2 files changed, 0 insertions, 21 deletions
diff --git a/sources/shiboken6/libshiboken/pep384impl.cpp b/sources/shiboken6/libshiboken/pep384impl.cpp
index ae1a3bcd9..fd862b7b0 100644
--- a/sources/shiboken6/libshiboken/pep384impl.cpp
+++ b/sources/shiboken6/libshiboken/pep384impl.cpp
@@ -637,18 +637,6 @@ PyMethod_Self(PyObject *im)
}
#endif // Py_LIMITED_API
-#ifdef PYPY_VERSION
-
-// PYSIDE-535: PyPy does not differentiate builtin methods and methods.
-// But they differ because they have no __module__ attribute.
-int PyMethod_Check(PyObject *op)
-{
- return PyPyMethod_Check(op) &&
- PyObject_HasAttr(op, Shiboken::PyMagicName::module());
-}
-
-#endif
-
/*****************************************************************************
*
* Support for funcobject.h
diff --git a/sources/shiboken6/libshiboken/pep384impl.h b/sources/shiboken6/libshiboken/pep384impl.h
index 32d8d6fa5..134199788 100644
--- a/sources/shiboken6/libshiboken/pep384impl.h
+++ b/sources/shiboken6/libshiboken/pep384impl.h
@@ -415,15 +415,6 @@ LIBSHIBOKEN_API PyObject *PyMethod_Self(PyObject *);
#define PyMethod_GET_FUNCTION(op) PyMethod_Function(op)
#endif
-#ifdef PYPY_VERSION
-
-// PYSIDE-535: PyPy does not differentiate builtin methods and methods.
-// But they differ because they have no __module__ attribute.
-#undef PyMethod_Check
-LIBSHIBOKEN_API int PyMethod_Check(PyObject *op);
-
-#endif
-
/*****************************************************************************
*
* RESOLVED: code.h