Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶
Changed¶
- Internal reorganization (non-breaking):
builders.mojowas split into per-protocol modules —type_protocol.mojo(TypeProtocolBuilder),number.mojo(NumberProtocolBuilder),mapping.mojo(MappingProtocolBuilder), andsequence.mojo(SequenceProtocolBuilder) — to mirror the file organization of the upstream stdlib PR https://github.com/modular/modular/pull/6453.builders.mojois now a thin re-export shim, so thefrom pontoneer.builders import ...path still works. - The slot-index constants (
_PySlotIndex) moved to a new internalslots.mojomodule; the shared_install_/_lift_/_conv_slot-installation helpers moved intoadapters.mojo. Both are internal and not re-exported. The public API (from pontoneer import ...) is unchanged.
[0.6.2] - 2026-03-22¶
Changed¶
- Replaced all
fnkeyword occurrences withdefacross the library and tests, following the Mojo nightly deprecation offnin favour ofdef. - Release workflow now appends the Mojo compiler date to the version string (
x.y.z-YYYYMMDD), making the exact nightly dependency explicit in every release artifact.
[0.6.0] - 2026-03-15¶
Changed¶
rich_comparehandlers in the columnar example and type-protocol test converted from@staticmethod+UnsafePointer[Self, MutAnyOrigin]to plain value-receiver methods (def rich_compare(self, ...)), demonstrating the existing value-receiver overload ofTypeProtocolBuilder.def_richcompare.- Call-count tracking in the columnar example moved from a
Dict[String, Int]field onDataFrameto a process-global_Globaldict, keeping the struct layout lean and avoiding copies on every method call.
[0.5.0] - 2026-03-14¶
Added¶
BufferProtocolBuilder[T]— installsbf_getbufferandbf_releasebufferslots, enabling zero-copy access to Mojo struct internals frommemoryview,numpy.frombuffer,bytes(), and any other buffer consumer.BufferInfo— user-friendly struct returned by thebf_getbufferhandler, describing a 1D C-contiguous buffer (buf,nitems,itemsize,format,readonly).- Both symbols are exported from the top-level
pontoneerpackage and documented in the newdocs/api/buffer.mdreference page.
[0.4.0] - 2026-03-13¶
Added¶
MappingProtocolBuilder.def_setitemnow accepts amut-receiver handler (fn(mut self, key: PythonObject, value: Variant[PythonObject, Int]) raises -> None), allowing mutations to persist without a rawUnsafePointer.SequenceProtocolBuilder.def_setitemlikewise accepts amut-receiver handler (fn(mut self, index: Int, value: Variant[PythonObject, Int]) raises -> None).NumberProtocolBuilderin-place operators (def_iadd,def_isub,def_imul,def_ifloordiv,def_imod,def_imul,def_ior,def_iand,def_ixor,def_ilshift,def_irshift,def_itruediv,def_imatmul,def_ipow) now acceptmut-receiver handlers.
Removed¶
- Value-receiver overloads for all in-place (
def_i*) methods inNumberProtocolBuilder— a copy-based receiver cannot persist mutations, making those overloads incorrect for in-place semantics.
Changed¶
examples/columnarmapping protocol handlers (py__len__,py__getitem__,py__setitem__) converted from@staticmethod+UnsafePointerto regularself/mut selfmethods.
[0.3.5] - 2026-03-11¶
Added¶
- All protocol builder
def_*methods that returnPythonObjectnow also accept handler functions that return any type satisfyingConvertibleToPython & ImplicitlyCopyable. The correct overload is resolved at compile time with no runtime overhead.
[0.3.4] - 2026-03-11¶
Added¶
- All protocol builder
def_*methods now accept value-receiver handler functions (e.g.fn(self: MyStruct) -> Int) in addition to the existing pointer-receiver (UnsafePointer[T, MutAnyOrigin]) overloads. Both raising and non-raising value-receiver handlers are accepted via a single overload (Mojo coercesfn(T) -> Rtofn(T) raises -> Rautomatically for value types).
[0.3.3] - 2026-03-11¶
Added¶
- Protocol builder
def_*methods now accept non-raising handler functions (e.g.fn(...) -> Twithoutraises), in addition to the existing raising overloads. The correct overload is selected automatically at compile time with no runtime overhead.
[0.3.2] - 2026-03-11¶
Changed¶
- All four protocol builders (
TypeProtocolBuilder,MappingProtocolBuilder,NumberProtocolBuilder,SequenceProtocolBuilder) now take aself_typecompile-time parameter (e.g.MappingProtocolBuilder[DataFrame](tb)). - Handler functions registered via
def_len,def_getitem,def_richcompare, etc. now receiveUnsafePointer[T, MutAnyOrigin]as their first argument instead of a rawPythonObject, eliminating the per-methoddowncast_value_ptr/_get_self_ptrboilerplate. - Added internal
_unwrap_self[T]helper inadapters.mojothat performs the typed downcast and aborts with a clear message on type mismatch.
0.3.0¶
Release under the modular-community channel.
0.2.3¶
Build debug.
0.2.2¶
Build debug.
[0.2.1] - 2026-03-08¶
Added¶
- Focused integration tests for all four protocol builders: mapping, number, sequence, and type protocol (
tests/) pixi run test-alltask and per-protocoltest-*/build-test-*tasks
Changed¶
- Builder method chains now use parenthesised multi-line style, consistent with the Mojo formatter
[0.2.0] - 2026-03-08¶
Changed¶
- Renamed internal modules:
protocols.mojo→utils.mojo,protocol_adapters.mojo→adapters.mojo,protocol_type_builder.mojo→builders.mojo - Replaced
PontoneerTypeBuilderwith four focused builders:TypeProtocolBuilder,MappingProtocolBuilder,NumberProtocolBuilder,SequenceProtocolBuilder
[0.1.1] - 2026-03-07¶
Fix pixi.lock and debug prefix.dev release process.
[0.1.0] - 2026-03-07¶
Added¶
PyTypeObjectSlottag struct with slot constants:mp_length,mp_getitem,mp_setitem,tp_richcompareNotImplementedError— raise from a rich compare handler to returnPy_NotImplementedRichCompareOpsconstants:Py_LT,Py_LE,Py_EQ,Py_NE,Py_GT,Py_GEPontoneerTypeBuilder— wrapsPythonTypeBuilderand addsdef_methodoverloads for all four protocol slots- Columnar DataFrame example demonstrating all four slots (
examples/columnar/)