Skip to content

Commit

Permalink
Python 3.10 doesn't look up __annotations__ in getset descr?
Browse files Browse the repository at this point in the history
  • Loading branch information
tiran committed Sep 29, 2021
1 parent c9530de commit 722331b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/wrapt/_wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,10 @@ static PyGetSetDef WraptCallableObjectProxy_getset[] = {
(setter)WraptObjectProxy_set_module, 0 },
{ "__doc__", (getter)WraptObjectProxy_get_doc,
(setter)WraptObjectProxy_set_doc, 0 },
#if PY_VERSION_HEX >= 0x030a0000
{ "__annotations__", (getter)WraptObjectProxy_get_annotations,
(setter)WraptObjectProxy_set_annotations, 0 },
#endif
{ NULL },
};

Expand Down Expand Up @@ -1912,6 +1916,10 @@ static PyGetSetDef WraptPartialCallableObjectProxy_getset[] = {
(setter)WraptObjectProxy_set_module, 0 },
{ "__doc__", (getter)WraptObjectProxy_get_doc,
(setter)WraptObjectProxy_set_doc, 0 },
#if PY_VERSION_HEX >= 0x030a0000
{ "__annotations__", (getter)WraptObjectProxy_get_annotations,
(setter)WraptObjectProxy_set_annotations, 0 },
#endif
{ NULL },
};

Expand Down Expand Up @@ -2448,6 +2456,10 @@ static PyGetSetDef WraptFunctionWrapperBase_getset[] = {
(setter)WraptObjectProxy_set_module, 0 },
{ "__doc__", (getter)WraptObjectProxy_get_doc,
(setter)WraptObjectProxy_set_doc, 0 },
#if PY_VERSION_HEX >= 0x030a0000
{ "__annotations__", (getter)WraptObjectProxy_get_annotations,
(setter)WraptObjectProxy_set_annotations, 0 },
#endif
{ "_self_instance", (getter)WraptFunctionWrapperBase_get_self_instance,
NULL, 0 },
{ "_self_wrapper", (getter)WraptFunctionWrapperBase_get_self_wrapper,
Expand Down Expand Up @@ -2637,6 +2649,10 @@ static PyGetSetDef WraptBoundFunctionWrapper_getset[] = {
(setter)WraptObjectProxy_set_module, 0 },
{ "__doc__", (getter)WraptObjectProxy_get_doc,
(setter)WraptObjectProxy_set_doc, 0 },
#if PY_VERSION_HEX >= 0x030a0000
{ "__annotations__", (getter)WraptObjectProxy_get_annotations,
(setter)WraptObjectProxy_set_annotations, 0 },
#endif
{ NULL },
};

Expand Down Expand Up @@ -2747,6 +2763,10 @@ static PyGetSetDef WraptFunctionWrapper_getset[] = {
(setter)WraptObjectProxy_set_module, 0 },
{ "__doc__", (getter)WraptObjectProxy_get_doc,
(setter)WraptObjectProxy_set_doc, 0 },
#if PY_VERSION_HEX >= 0x030a0000
{ "__annotations__", (getter)WraptObjectProxy_get_annotations,
(setter)WraptObjectProxy_set_annotations, 0 },
#endif
{ NULL },
};

Expand Down

0 comments on commit 722331b

Please sign in to comment.