Skip to content

v0.0.19

New: ParamInfo and MethodInterface Pydantic models

Pure-data Pydantic models that describe a callable's signature without requiring a GlobalRef or live callable reference.

  • ParamInfo — serializable parameter metadata: name, type_str, default, is_optional, description, annotation (excluded from serialization). Replaces the old ArgInfo NamedTuple.
  • MethodInterface — serializable callable signature: params, return_type, doc, return_annotation (excluded). Built via MethodInterface.from_callable(), which resolves stringified annotations from from __future__ import annotations using typing.get_type_hints().
  • MethodInterface.validate_simple_type_args() — structural type comparison for DAG wiring validation.

Changed: Method now composes MethodInterface with optional gref

Method is refactored from a GlobalRef-centric wrapper to a composition of MethodInterface + optional GlobalRef:

  • gref is now GlobalRef | None — closures, lambdas, and bound methods work without a GlobalRef.
  • interface: MethodInterface is eagerly built from the callable.
  • args, args_by_name, return_annotation, doc delegate to the interface.
  • Fragment registration no longer uses a GlobalRef("__fragment__:name") hack; it passes the callable directly with Method(callable, name=name).

Changed: CLI helpers moved to free functions

param_to_value, is_turn_on_flag, param_arg_help, param_opt_help are now free functions in cli.py operating on ParamInfo, replacing the former methods on ArgInfo.

Changed: Decorator consolidation

All compose decorators (inline, dag_factory, nsnode, require_cache, mountable, mount_required) now live in namespace.py. The _inline.py module is deleted. Import inline from lythonic.compose.namespace.

Changed: Fragment method discovery

_discover_fragment_methods now skips all private attributes (names starting with _) unconditionally, instead of scanning them for decorator markers.

Removed

  • ArgInfo — replaced by ParamInfo.
  • gref.is_async() usage — replaced by asyncio.iscoroutinefunction() on the callable directly.
  • lythonic.compose._inline module — inline moved to namespace.py.
  • inline re-export from lythonic.compose — import from lythonic.compose.namespace instead.