Notable changes made to cppwg in each release.
0.5.0 - 2026-08-15
- Automatic discovery of explicit C++ template instantiations: the
discover_template_instantiationsoption (scan the sources fortemplate class Foo<2>;), the package-levelsource_cpp_patternsglob (default["*.cpp"]) naming which sources to scan, anddiscover_arg_excludes(e.g.{SPACE_DIM: [1]}) to drop unwanted discovered instantiations by named template parameter (#73). auto_includesoption to auto-include project-type headers, including template-argument types (#97).typecastersoption to auto-include pybind11 typecasters (#95).exclude_inherited_overridesoption to skip redundant inherited-override.defs (#101).- Enum wrapping: a module-level
enumsconfig list with anexport_valuesoption controlling.def(py::enum_...).export_values()for unscoped enums (#113). - Struct wrapping and public data-member exposure (#116).
- A
get_class_cpp_source_includeshook for custom generators, allowing them to declare their own C++ class source includes (#99). - Templated Python call syntax:
TemplateClass(Foo[2]) andTemplateMethod(obj.Bar[T]()) descriptors, wired into the shapes and cells examples (#70). cppwg genpackagesubcommand that generates a Python package layer from the wrapper config. cppwg emits acppwg_package_model.jsondescribing the wrapped modules and classes;genpackageturns that plus apackage_layout.yamlinto a per-subpackage_generated.py(#102).- Coverage measurement via Codecov, targeting ~99% (#20).
- Logfile rotation for the
-l/--logfileoption. - Support for Python 3.14 (#130).
- Consolidated a templated class's instantiations into a single wrapper file pair
(
Foo.cppwg.cpp/Foo.cppwg.hpp) instead of one pair per instantiation (Foo_2.cppwg.cpp,Foo_3.cppwg.cpp, ...); the generated Python class names (Foo_2,Foo_3) are unchanged (#30). - Replaced the hand-written
TemplateClassDictscaffolding in the shapes and cells examples with a generatedTemplateClassstub.TemplateClassDictwas a module-level dict-like instance, soFoowas not a class;TemplateClassis subclassed, makingFooa real class object that resolvesFoo[2]via__class_getitem__(likelist[int]) (#70). - Sped up wrapper generation with a base-class virtual-signature index and caching in the inherited-override check (#125).
- Scoped source collection to the project's own source: CMake build trees are
pruned from the walk (any directory containing a
CMakeCache.txt, assuming an out-of-source build), and the explicit-instantiation scan is restricted to the modulesource_locationswhen set. Previously a same-named class from a vendored dependency or example tree under the source root could be conflated with a wrapped class and corrupt its discovered/pruned template instantiations (#125). - Unified the C++ argument/return exclusion options (
arg_type_excludes,return_type_excludes,constructor_arg_type_excludes) and applied them to free functions as well as class methods and constructors (#91). - Housekeeping: consolidated duplicated logic into helpers, including exclusion
predicates, a single
BASE_INFO_OPTIONSschema, and shared default-argument, registration-name, and wrapper-filename helpers (#119).
calldef_excludes: usearg_type_excludesand/orreturn_type_excludesinstead. The parser now warns when it is used; it is still honoured as botharg_type_excludesandreturn_type_excludesfor backward compatibility (#91).
- The unused
extra_codeconfig option; useprefix_code/suffix_code(#92).
exclude_inherited_overridesset at module or class level was silently ignored (only package level was parsed) (#101).- A
KeyErrorwhen a config listed explicit variables, a dead generated-file skip in source collection, and a crash in the defaultPackageInfowhen no config file was given (#20).
0.4.1 - 2026-06-30
- Cross-module inheritance (#88, #89).
0.4.0 - 2026-06-29
--castxml_cflagsoption (#78).--overwriteoption (#82).- Support for custom C++ exception classes (#84).
- Dropped Python 3.8 and 3.9; added support for Python 3.13 (#76).
- Switched the example projects' conda builds to rattler-build (#80).
- Handling of numeric arguments (#67, #68, #69).
0.3.4 - 2024-11-22
--castxml_compileroption (#66).
- castxml is now a system requirement rather than being installed automatically from pip; clang is now a recommended system dependency (#66).
0.3.3 - 2024-11-13
- Stabilised class sorting for deterministic wrapper output (#65).
0.3.2 - 2024-11-08
- Example conda build, with typecaster examples for PETSc, VTK and Boost uBLAS (#63).
0.3.1 - 2024-10-08
- The example template-class syntax accepts types in arguments (#62).
0.3.0 - 2024-09-30
- The Python name format for a templated class
Foo<A,B>changes fromFooA_BtoFoo_A_B(#55). - Wrapper module names changed from
<module>.main.cppto_<package>_<module>.main.cppwg.cpp, and a.cppwgextension was added towrapper_header_collection.cppwg.hpp(#58).
- Example of
Foo[2,2]-style syntax for templated classes, and asource_file_pathconfig key (#60).
- Cosmetic enhancements to the generated wrappers, and updates to YAML parsing (#55, #56, #59, #61).
0.2.1 - 2024-09-23
- Automatic sorting of classes by dependence (#53, #54).
- Console log level is
ERRORwith--quiet, otherwiseINFO; the file log level is alwaysINFO(#52).
0.2.0 - 2024-09-16
- Prefix text for generated wrappers.
- Excluding classes from wrapping via the
excludedconfig key. - Listing of unknown classes in the logs.
- Log output to a file via
--logfile. - pybind11 fetched with CMake
FetchContentin the example.
0.1.0 - 2024-08-05
- Excluding constructors by signature (#47).
- Prefix text for generated wrappers (#48).
- Template parameters in method default arguments (#44).
- Wrappers for initializer lists of the form
foo = {}in method default arguments (#45).
0.0.1 - 2024-05-07
- Locally pip-installable via
pip install .and callable from the command line. - Tested on Python 3.8 to 3.12.
- Compatibility with C++ standards later than C++11.
- Wrapping of templated classes with only a single explicit instantiation.
- Wrapping of templated classes with signatures like
template <type A, B=A>. - Handling of template parameters in method default arguments.
0.0.1-alpha - 2024-03-12
Initial release.