diff options
author | Jeroen Demeyer <jeroen.k.demeyer@gmail.com> | 2020-02-18 13:14:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 13:14:46 (GMT) |
commit | 24bba8cf5b8db25c19bcd1d94e8e356874d1c723 (patch) | |
tree | 66da76634598a2a6bc47792cb38019adea634290 /Objects/classobject.c | |
parent | 5d38517aa1836542a5417b724c093bcb245f0f47 (diff) | |
download | cpython-24bba8cf5b8db25c19bcd1d94e8e356874d1c723.zip cpython-24bba8cf5b8db25c19bcd1d94e8e356874d1c723.tar.gz cpython-24bba8cf5b8db25c19bcd1d94e8e356874d1c723.tar.bz2 |
bpo-36347: stop using RESTRICTED constants (GH-12684)
The constants `RESTRICTED` and `PY_WRITE_RESTRICTED` no longer have a meaning in Python 3. Therefore, CPython should not use them.
CC @matrixise
https://bugs.python.org/issue36347
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r-- | Objects/classobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 97f50fa..999b91c 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -145,9 +145,9 @@ static PyMethodDef method_methods[] = { #define MO_OFF(x) offsetof(PyMethodObject, x) static PyMemberDef method_memberlist[] = { - {"__func__", T_OBJECT, MO_OFF(im_func), READONLY|RESTRICTED, + {"__func__", T_OBJECT, MO_OFF(im_func), READONLY, "the function (or other callable) implementing a method"}, - {"__self__", T_OBJECT, MO_OFF(im_self), READONLY|RESTRICTED, + {"__self__", T_OBJECT, MO_OFF(im_self), READONLY, "the instance to which a method is bound"}, {NULL} /* Sentinel */ }; @@ -400,7 +400,7 @@ PyInstanceMethod_Function(PyObject *im) #define IMO_OFF(x) offsetof(PyInstanceMethodObject, x) static PyMemberDef instancemethod_memberlist[] = { - {"__func__", T_OBJECT, IMO_OFF(func), READONLY|RESTRICTED, + {"__func__", T_OBJECT, IMO_OFF(func), READONLY, "the function (or other callable) implementing a method"}, {NULL} /* Sentinel */ }; |