Skip to content

3.1.0

Choose a tag to compare

@d3vyce d3vyce released this 12 Apr 16:54
· 16 commits to main since this release

Highlights

M2M helpers

Three new helpers in fastapi_toolsets.db for managing Many-to-Many associations without touching the ORM collection — safe to use inside nested transactions and lock_tables contexts where lazy-loading would raise MissingGreenlet.

  • m2m_add — insert one or more associations into the secondary table (ON CONFLICT DO NOTHING available via ignore_conflicts=True)
  • m2m_remove — delete specific associations; idempotent if the association doesn't exist
  • m2m_set — atomically replace the full association set (delete all, then insert the new set); passing no related instances clears the association entirely

More detail in the documentation

What's Changed

Features

  • auto eager-load relationships in register_fixtures (#243)
  • add get_field_by_attr fixtures helper (#245)
  • add M2M helpers (#247)

Internal

  • bump pytest from 9.0.2 to 9.0.3 (#238)
  • bump ty from 0.0.27 to 0.0.29 (#239)
  • bump zensical from 0.0.31 to 0.0.32 (#240)
  • bump ruff from 0.15.8 to 0.15.9 (#241)

Full Changelog: v3.0.3...v3.1.0