This update introduces several major features focused on library coverage,
type safety, and concurrent session management.
Key features and changes:
- Implemented generate :all mode for libraries. This allows users to
generate bindings for all public symbols in a Python module rather than
just those detected via static analysis. It includes support for
recursive submodule introspection via the Introspector.
- Introduced context-aware type mapping. The TypeMapper now builds a
registry of discovered classes to resolve Python type references to
their corresponding generated Elixir modules. This enabled the removal
of hardcoded ML type mappings for libraries like NumPy and Torch.
- Enhanced session management and affinity. Added support for multiple
isolated Python sessions within the same application. Introduced
affinity modes (hint, strict_queue, and strict_fail_fast) to control
worker routing for stateful references.
- Improved generated code quality. Method signatures now automatically
skip implicit self and cls parameters. Parameter names that conflict
with Elixir reserved words (e.g., and, or, not) are prefixed with py_
to ensure valid syntax. Added method deduplication to handle
overlapping signatures found during introspection.
- Added a comprehensive multi-session example demonstrating isolation
patterns and affinity behavior under load.
- Updated ConfigHelper to support multi-pool configurations and default
affinity settings per pool.
- Internal changes include refactored test support for more reliable
Python dependency resolution and expanded test coverage for the new
generation modes and type resolution logic.
- Updated documentation and README to cover the new concurrency patterns
and affinity configurations.