capnproto / pycapnp

Cap'n Proto serialization/RPC system - Python bindings
BSD 2-Clause "Simplified" License
458 stars 125 forks source link

[WIP] Python 3.12 Support #330

Closed madhavajay closed 9 months ago

madhavajay commented 9 months ago

I am having some issues building for python 3.12 locally on MacOS.

^~~~~~~~~
capnp/lib/capnp.cpp:45585:28: error: no member named 'allowCancellation' in 'capnp::CallContext<capnp::DynamicStruct, capnp::DynamicStruct>'
    __pyx_v_self->thisptr->allowCancellation();

I saw that allowCancellation was mentioned in the breaking 1.0 release notes but I think pycapnp is still using an older version of capnp right?

Also, do we want to change bundled_version to (1, 0, 1)?

I haven't had time to debug whats going on, but I also don't know how the python version releases are done as I don't see any version information in wheels.yml. Does it just depend on what cibuildwheel version?

https://cibuildwheel.readthedocs.io/en/stable/

⁵ CPython 3.12 is built by default using Python RCs, starting with cibuildwheel 2.15.
haata commented 9 months ago

Thanks for the PR! I've been working on this with @tobiasah. https://github.com/capnproto/pycapnp/commit/bb158228509678f6a7d162b9869ed999f767d696 https://github.com/capnproto/pycapnp/commit/313d0d4c6d62fa77f5e3e7a5db45a411fec580d5

Hopefully (fingers crossed, CI passes again), I can try to get the beta out today.