microsoft/bocpy v0.3.1
microsoft/bocpy
Captured source
source ↗published Apr 7, 2026seen Jun 26captured 3whttp 200method plain
v0.3.1
Repository: microsoft/bocpy
Tag: v0.3.1
Published: 2026-04-07T12:50:46Z
Prerelease: no
Release notes: CownCapsule serialization support for nested cowns.
Bug Fixes
- Removed the ownership check in
_cown_sharedthat prevented a
CownCapsule from being serialized to XIData when it was the value of another Cown. The check was unnecessary — _cown_shared only stores a pointer and ownership is enforced at acquire time.
Improvements
- Added
CownCapsule.__reduce__withCOWN_INCREFpinning so that a
CownCapsule embedded in a container (dict, list, etc.) can survive the pickle round-trip used by object_to_xidata. A module-level reconstructor (_cown_capsule_from_pointer) inherits the pin without a redundant COWN_INCREF, and validates the process ID on unpickle to guard against cross-process misuse.