Skip to content

Prepare Air 0.49.0 - #1166

Open
audreyfeldroy wants to merge 9 commits into
mainfrom
agent/release-0.49.0
Open

Prepare Air 0.49.0#1166
audreyfeldroy wants to merge 9 commits into
mainfrom
agent/release-0.49.0

Conversation

@audreyfeldroy

@audreyfeldroy audreyfeldroy commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

Prepare Air 0.49.0 for release and backport the complete backend-neutral work staged in Writerstead's vendored Air tree.

  • make AirModel persistence backend-neutral through the AirModelBackend protocol
  • preserve the AirDatabase convenience base and DatabaseNotConfigured error
  • move PostgreSQL transport, SQL, schema, and lifecycle concerns out of Air core
  • remove the bundled asyncpg extra and automatic DATABASE_URL/app.db behavior
  • port AirForm.render_csrf() for custom form layouts
  • include the post-0.48.1 HTML/Jinja improvements merged in Docs improvements #1162
  • document migration to AirPostgres and other external backends
  • add AirModel, field/model API, Railway, and WebAssembly documentation to navigation and LLM exports
  • collect the full 0.49.0 release notes, including air check, WebAssembly support, form/HTML improvements, and fixes merged since 0.48.1

Release impact

This is a breaking migration for applications that use Air's former built-in PostgreSQL integration. Model definitions and public CRUD calls remain stable, but applications must install and configure AirPostgres explicitly.

AirPostgres 0.2.0 is prepared as the companion backend release. AirD1 has also been extracted, reviewed, and validated against this Air release line.

Validation

  • rebased onto current main after Docs improvements #1162
  • just qa
  • just test — 705 passed
  • strict MkDocs build
  • verified generated field/model API pages, AirModel and WebAssembly pages, navigation, and llms-full.txt
  • built the exact committed sdist and wheel from a clean archive
  • installed the wheel in a clean Python 3.13 environment and verified version 0.49.0 and public backend imports
  • AirPostgres — 126 tests on Python 3.13 and 3.14, 92% coverage, docs build, CI green
  • AirD1 — 14 tests, 95% coverage, CI green
  • Writerstead vendored Air matches every shared PR file byte-for-byte
  • Writerstead — 17 tests passed; Worker bundle and Wrangler dry-run passed; workflow lint passed

Publication

This PR prepares the release only. Pushing tag v0.49.0 will trigger the trusted PyPI publication workflow, which requires approval in the protected pypi environment.

@audreyfeldroy
audreyfeldroy marked this pull request as ready for review August 11, 2026 03:56
AirModel can now declare former physical table and column names that
development backends use to preserve data across deliberate renames.

The new legacy_database_tables() and legacy_database_columns() classmethods
are opt-in: defaults stay empty, and production schema changes still go
through reviewed, versioned SQL migrations.
Air gains one CSRF validation path shared by forms and plain endpoints:

- require_csrf() dependency helper returns a 403 on failure, so callers can
  guard a route with a single `if resp := await require_csrf(...)` line.
- AirForm.csrf_max_age lets a long-lived form extend token validity without
  lengthening the window for every other form.
- The unused ValidCsrfToken type is removed in favor of the single validation.

Also add reusable slugify, header_get, parse_cache_control_directives, and
is_public_without_no_store helpers, re-exported from the top-level package.
Air 0.49.0 was shaped by building WriterStead, which now runs on Air in
production with accounts, subscriptions, forms, and author sites.

Note that real-world use in the release notes, README, docs showcase, and a
source-level note, so readers can see Air is proven in production while
remaining free and open source.
Add the new legacy_table_names / legacy_column_names capability to the 0.49.0
release notes. Also stop naming the not-yet-published AirD1 package anywhere in
Air; swappable-backend examples now reference AirPostgres alone.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant