[issue13115] tp_as_{number, sequence, mapping} can't be set using PyType_FromSpec

2011-10-06 Thread Andrew Wilkins
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

[issue12687] Python 3.2 fails to load protocol 0 pickle

2011-08-05 Thread Andrew Wilkins
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 '