Skip to content

v3.3.0

Choose a tag to compare

@HollowTheSilver HollowTheSilver released this 12 May 05:27
· 4 commits to main since this release

CascadeUI v3.3.0 ships PostgreSQL persistence with cross-process scoped invalidation, opens SQL-capable backends to user domain tables via a new Capability.RAW_SQL flag, adds end-to-end local file attachment support across V1 and V2, and introduces a pre-flight V2 placement validator so invalid component trees raise a local ValueError instead of returning HTTP 400 from Discord.

Added

  • PostgresBackend for PostgreSQL persistence via the new pycascadeui[postgres] extra. asyncpg-backed connection pool with LISTEN / NOTIFY on a dedicated listener connection for cross-process scoped invalidation. Configure with PostgresBackend(dsn=...).
  • Backend extensibility via Capability.RAW_SQL on SQLiteBackend and PostgresBackend. Four raw query methods (execute, fetch, executemany, fetch_one) plus async transaction() for user domain tables. placeholder_style ClassVar reports parameter syntax for portable SQL across backends.
  • V2 placement validator on StatefulLayoutView -- walks the component tree before every Discord round-trip and raises ValueError with a path string + fix on placements Discord 400s on (nesting, accessory misuse, Modal-only types, size bound violations). Opt out with validate_placement = False.
  • file_attachment(url, *, spoiler=False) V2 builder completes the V2 media family alongside gallery() and image_section().
  • Local file attachments across view.send() and view.refresh() -- both V1 and V2 accept file= / files=; mid-session swaps go through refresh(attachments=[...]). V2 media builders accept discord.File directly via the new MediaInput type alias. The new cascadeui.fetch_as_file(url, filename, ...) helper absorbs the aiohttp + BytesIO + discord.File construction pattern into one await. examples/v2_attachments.py covers the four attachment shapes.

Install

pip install pycascadeui==3.3.0

See the full CHANGELOG for complete detail including all internal helpers, type aliases, and documentation additions.

Full Changelog: v3.2.0...v3.3.0