zopefoundation / zodbpickle

Fork of Python's pickle module to work with ZODB
Other
17 stars 15 forks source link

Support py3.9 and above. #60

Closed pfw closed 3 years ago

pfw commented 3 years ago

I'd really like to add this as something between a comment on an issue and a pull request as my C skills are quite rusty and although it builds and all the tests pass it should really be looked over closely.

The changes for _PyObject_LookupAttrId came from here: https://github.com/python/cpython/commit/98c4433a81a4cd88c7438adbee1f2aa486188ca3

Py_Size(x) = y to Py_SET_SIZE(x, y) and _PyObject_HasAttrId to _PyObject_LookupAttrId

pfw commented 3 years ago

Sorry I messed up on 3.9, I'll fix that up.

pfw commented 3 years ago

I'll leave this open for the moment but although it works on 3.9 and 3.10 it fails to build on versions below... I'll see if I can figure out how to support both but might be running into limits of C skills.

jamadden commented 3 years ago

Thanks for this PR! I've opened #61 to restore support for older versions of Python.

pfw commented 3 years ago

Good one, thanks.