Skip to content

v0.5.1

Latest

Choose a tag to compare

@jeandet jeandet released this 10 May 21:19

Bug fixes

  • remove_events_from_catalogue checked membership by Python id(), which broke whenever the caller resolved the event via get_events(uuid=...) (the 0.5.0 fast path returns wrappers backed by _LazyBackendEntity, a different Python object from the one stored in catalogue.events). Membership is now compared on the SQL primary key, matching add_events_to_catalogue.
  • After event.remove(permanently=True), catalogue.events kept the deleted ORM Event in its in-memory collection. A later add_events_to_catalogue() with a freshly created event reusing the same UUID was wrongly rejected as "already in catalogue". Backend.remove now detaches the event from every catalogue's events collection before session.delete.
  • The fast-path query was leaking _LazyBackendEntity proxies into SQLAlchemy relationships. Wrapper→backend boundaries (add/remove_events_to_catalogue, _BackendBasedEntity.remove) now resolve proxies to identity-mapped ORM entities before handing them to SQLAlchemy.

Two regression tests cover both scenarios.

Full Changelog: v0.5.0...v0.5.1