Numpy is warning about ndarray.__class_getitem__ being a pure-python class method
When using numpy 1.22 with pypy3.8+, a warning is emitted:
lib/pypy3.8/site-packages/numpy/core/_add_newdocs.py:2826: UserWarning: add_newdoc was used on a pure-python object <bound method __class_getitem__ of <class 'numpy.ndarray'>>. Prefer to attach it directly to the source.
add_newdoc('numpy.core.multiarray', 'ndarray', ('__class_getitem__',
This is due to the check isintance(ndarray.__class_getitem__, types.MethodType)
which returns True on PyPy, False on CPYthon. It seems the way we are creating class methods from C should be tweaked.