New submission from Andrew Wilkins :
I've written an extension using Py_LIMITED_API, and I've created a type using
PyType_FromSpec with the slot "Py_sq_length" defined. The slot is not being
picked up, i.e. len(MyType()) fails. I can see that tp_as_sequence has not been
Andrew Wilkins added the comment:
In _pickle.c, the load_put function calls _Unpickler_Readline, which may
prefetch data and place it after the line read in with "readline". load_put
then calls PyLong_FromString, which doesn't like the trailing data after the
'