Repository navigation
Releases
v0.29.0
v0.28.0 — explicit ingestion and passive resolvers
genro-bag 0.28.0
Breaking ingestion API coordinated with @genrojs/bag 0.11.0 (issue #69).
- Constructors and modern fill methods accept native dicts/lists, with recursive
conversion by default, literal labels, padded list labels and shared leaves. - TYTX readers accept ordinary JSON, typed containers and explicitly marked Bags.
Modern from_json is a deprecated alias. Explicit legacy codecs are retained. - Typed leaf values survive Python/JS conversion; Bag subtype metadata is preserved.
- Resolver signatures remain verified recursively. Legacy XML adapters forward
signing, expiry and indentation options, including nested nodes/attributes. - Eager/reactive refresh and timer options are removed. Resolvers remain synchronous
in Python, preserving the 0.27.0 contracts for cache, events and parameter preparation. - Requires genro-toolbox >=0.18.0, genro-tytx >=0.16.2 and httpx >=0.28.0.
All dependents must read the migration note
and update constructor, reader, list-path and refresh calls as applicable.
Validation: 1,109 core tests on Python 3.11/3.14; CI Python 3.11/3.12; 158 tests across four legacy suites; wheel/sdist build and Ruff passed.
Coordinated JavaScript release: 0.11.0.
v0.27.0
What's Changed
Full Changelog: v0.26.0...v0.27.0
v0.26.0
What's Changed
Full Changelog: v0.25.1...v0.26.0
v0.25.1
genro-bag 0.25.0
Changes
- Reject an empty path in native
Bag.set_itemwithValueError, without mutation. Successful writes return a BagNode. This fixes the silent Bag return/no-op introduced in 0.24.0; compatibilitysetItemretains legacy empty-path merge behavior. - Honor resolver
read_onlyclass defaults and explicit overrides. Readonly cached results stay in the resolver, never in the containing node. - Remove resolver
kw; use declared parameter attributes and the extras-onlykwargsview. The engine prepares parameters throughon_loadingonce per actual load attempt and restores temporary context after exceptions or nested calls. - Update built-in resolvers, documentation and regression tests.
Compatibility
Native empty-label writes are no longer accepted, including the older empty-node creation behavior. Builders should validate empty identifiers and produce their own application-level errors. This release alone does not guarantee a particular builder ConfigError.
Resolver implementations using .kw must migrate as described in docs/resolvers/custom.md. See BREAKING_CHANGES.md for the complete 0.25.0 contract.
Validation: 959 Python tests passed; Ruff checks and source/wheel builds passed.
genro-bag 0.24.0
genro-bag 0.24.0
This release establishes the reviewed synchronous Bag contract and the Python/JavaScript alignment used by Genro integration.
- Keep readonly resolver caches inside the resolver; parameter changes invalidate cached results independently of node storage.
- Reject reset on nodes without a resolver without modifying the node.
- Align update, replacement, traversal, full paths, sorting, sums and XML behavior with the reviewed contracts.
- Retain approved legacy entry points through compatibility mixins; retire formulas, validation and unused APIs as documented.
This release contains intentional breaking changes. Read BREAKING_CHANGES.md before upgrading, especially numeric resolver cache durations, traversal, sum and deprecated filling APIs.
Validation: 921 Python tests passed; local distribution build checked. Genro application/browser acceptance is a separate integration follow-up.
v0.23.1
v0.23.0 — synchronous resolvers and GenroPy compatibility
Release 0.23.0
This release makes Bag and its resolvers synchronous and adds compatibility for
selected historical GenroPy consumers. It does not install the GenroPy
implementation switch; that integration is a separate framework change.
Breaking changes
- Resolver loads and callbacks execute synchronously on the caller's stack.
There is no automatic event-loop or threadpool dispatch. - Async callbacks, awaitable results and async-only resolver implementations
raise explicit errors.BagAsyncCbResolverremains an importable migration
error, not an asynchronous implementation. - Automatic
intervalrefresh is no longer supported. Schedule external work
in the application and explicitly update or refresh Bag values. - HTTP resolvers use a synchronous client. Code running in an event loop must
account for blocking I/O; Bag does not move that work to another thread. - A list of
(label, value)or(label, value, attributes)tuples now creates
named nodes. To store such a tuple as a positional value, provide an explicit
mapping, for exampleBag({'0': ('label', value)}).
Construction and compatibility
- Single node tuples and sequences of node tuples support named values and
attributes. Attribute mappings are copied; invalid attributes preserve
fill_fromatomicity. Ordinary lists and lists of lists remain positional. - Existing directory paths, including
pathlib.Path, mount a lazy
DirectoryResolver under the directory basename. Nested directories and XML
files load synchronously on demand. - Selected historical camel-case methods and signatures are provided on the
actual Bag, BagNode and BagResolver classes. Application subclasses retain
the same base-class identity. - Added or corrected node lookup, menu row construction, merge/traversal,
formatting, legacy keyword handling, legacy XML wire encoding and pickle
behavior used by the GenroPy integration. getNodeByAttrsearches loaded values without expanding lazy hierarchical
data. The snake-case query keeps its existing behavior.- Pickled runtime state omits transient subscribers and parent links, with
back-reference restoration on loading. Legacy mutating preparation/restoration
methods remain distinct from normal nonmutating serialization. - Reactive synchronous refresh occurs after node attributes have been updated.
Scope and migration
This is bounded compatibility, not complete equivalence with the historical
GenroPy Bag. Formula/validation/diff APIs and automatic asynchronous behavior
are not restored. The constructor does not accept _template_kwargs; callers
must perform intended template substitution themselves. The historical
misspelling _template_kargs is ignored when a source is supplied.
Use the matching GenroPy integration and its explicit
implementation="genro-bag" setting to replace historical imports in that
framework. Installing this package alone does not modify GenroPy imports.