Repository navigation
Tags
Tags
Prepare 9.1.0 release (#684) 9.1.0rc1 has been out for five days. Since then `main` has gained only the JSON `Response` fix from 9.0.1 (#638), docs edits, and contributor tooling, so it's ready to ship as the final 9.1.0 of both `cadwyn` and `cadwyn-core`. This sets both packages to 9.1.0 and pins `cadwyn-core==9.1.0` in `cadwyn`. It also folds the `[9.1.0rc1]` and `[Unreleased]` changelog entries into a single `[9.1.0]` section, so 9.0 users can read every change in one place. A line at the top says which three entries 9.1.0rc1 didn't have. To publish, create the GitHub Release `9.1.0` after merge. That runs the PyPI workflow and deploys the docs as 9.1 and `latest`. `make check` passes locally. Created with Claude Opus 5.5 in Claude Code (T3 Code).
Release 9.0.1: return a plain JSON Response with the bytes the endpoi… …nt returned (#672) Backport of #671 to 9.0. Refs #638. A versioned endpoint that returned a plain `Response` with JSON bytes and a content type of exactly `application/json` reached clients double-encoded as a JSON string. Cadwyn decided how to decode a response's body by its class but how to encode it back by its header. Now a body that Cadwyn decoded as text is always encoded back as text. This also sets the version to 9.0.1, moves the changelog entry under [9.0.1], and runs CI on the new 9.x.x maintenance branch. Thanks to @ununto for the first fix in #650. Created with Claude Opus 5.5 in Claude Code (T3 Code), reviewed by GPT-6.1 Sol in Codex. Co-authored-by: ununto <297261210+ununto@users.noreply.github.com>
Release 8.2.1: return a plain JSON Response with the bytes the endpoi… …nt returned (#673) Backport of #671 to 8.x. Refs #638. A versioned endpoint that returned a plain `Response` with JSON bytes and a content type of exactly `application/json` reached clients double-encoded as a JSON string. Cadwyn decided how to decode a response's body by its class but how to encode it back by its header. Now a body that Cadwyn decoded as text is always encoded back as text. This also sets the version to 8.2.1, moves the changelog entry under [8.2.1], runs CI on the new 8.x.x maintenance branch, and skips thenewstack.io in the link check (#615). Thanks to @ununto for the first fix in #650. Created with Claude Opus 5.5 in Claude Code (T3 Code), reviewed by GPT-6.1 Sol in Codex. Co-authored-by: ununto <297261210+ununto@users.noreply.github.com>
Document what standalone migration means for your own loop (#669) Testing 9.1.0rc1 on Apache Airflow found three things the docs didn't tell a project that replaces its own migration loop with `migrate_request()` and `migrate_response()` (#203): - **Requests are validated in the older version first.** Without schema instructions, the older version has HEAD's fields and validators, so a migration can't rename or remove something HEAD rejects. The fix is to describe the old shape with schema instructions. Request migrations get the validated data. Response migrations get the body as passed, and the result is validated afterwards. - **`CadwynHeadRequestValidationError` isn't a `ValueError`**, unlike Pydantic's `ValidationError`. It's raised when the migrated request doesn't fit HEAD's model, or `to_version`'s. - **`import cadwyn_core` fails next to any other version of `cadwyn`, 9.0 included.** A project that requires `cadwyn-core` in one package and `cadwyn` in another should require at least the same version of both. A release candidate needs its own version in the requirement, since `>=9.1` excludes `9.1.0rc1`. `VersionBundle.version_values` is now part of the supported API, since callers need it to check a version before they migrate. The changelog entries go under `[9.1.0rc1]`, which isn't published yet. Created with Claude Opus 5.5 in Claude Code (T3 Code); reviewed by GPT-6.1 Sol in Codex.
Make the TypeVar namespace error name the same models on every run (#636 ) When a generic used without type args and the models nested in it share a type parameter, Cadwyn picked one of those models to resolve the parameter's quoted bound, constraints, or default. That choice changed validation, not just the error message. With `Outer.item: T`, `Outer.node: Node[T]`, and `T` bound to `"Node"`, picking `Node` kept `T` as it was, so the older `Outer` validated the latest `Node`: the old shape got a 422 and the latest-only shape passed silently. Which model got picked depended on set order. Sorting the models by module and qualname, as this PR first did, still left classes from the same factory in arbitrary order and crashed on a `None` module. Cadwyn keeps a parameter as it is when its fallback refers back to the model that uses it, because pydantic resolves a quoted reference to a model to that model's copy. But it does that only within that copy itself, and only for that model's own name. Now the parameter stays as it is only if a single model's fields use it and its fallback names no other model that changes in that version; otherwise Cadwyn versions it, or fails at startup as main does. For example, with `T` bound to `Union["A", "B"]` and used by both `A` and `B`, the copy of `A` would resolve `"B"` to the latest `B`, so this fails at startup. All of those models must resolve the fallback to the same classes (Cadwyn fails at startup otherwise), so any of them can resolve it: Cadwyn takes the generic itself if it uses the parameter, or else its first nested model in field order, without sorting. The startup error names the generic and lists the models in that order, with the generic first. Tests cover both owner orders, factory classes with the same module and qualname, a nested model whose `__module__` is `None`, and a bound or constraints that name both models using the parameter, in both field orders. A parameter used only by a nested model and bound to the outer generic, such as `inner: Inner[T]` with `T` bound to `"Page"` in `Page`, fails at startup again instead of keeping `T`. This error was added during 9.0.0 development, so it needs no CHANGELOG entry. Refs #584. Created with Claude Opus 5.5 in T3 Code.
Prepare 8.2.0 release (#542) Bumps the version to 8.2.0 and moves the unreleased CHANGELOG entries under it. The release has one possibly breaking change (#496: override form fields that accept any value now get their own value), plus fixes for form models on FastAPI 0.158.2+ (#495, #496, #529), unions of form models, `Json[...]` fields (#523), Flag enums (#522), recursive type aliases (#524), the `cadwyn` command, and the documentation (every example is now tested). Also points the #523 entry's link to Known limitations at the release docs instead of `/dev/`. Doesn't publish anything: PyPI publishing only runs when a GitHub release is created.
Prepare 8.1.1 release (#504) Bumps the version to 8.1.1 and moves the unreleased CHANGELOG entries under it: the fix for docs dashboard links that repeated the root path (#501, #503) and the per-release documentation versions (#499). Doesn't publish anything: PyPI publishing only runs when a GitHub release is created.
Prepare 8.1.0 release (#498) Bumps the version to 8.1.0 and moves the unreleased CHANGELOG entries under it: the fix for form-model endpoints on FastAPI 0.159+ (#497), the startup warnings for alias instructions that keep the field's old key (#492), and the design-decisions docs. Doesn't publish anything: PyPI publishing only runs when a GitHub release is created.
Shorten the 8.0.0 changelog (#483) Rewrites the 8.0.0 section of CHANGELOG.md from about 5,300 words to about 1,070. Each bullet now states the change in one or two sentences and links to the docs for the details: generic models, inherited fields, versioned dependencies, and self-referencing models. Related fixes are grouped into sub-lists. No code changes.
PreviousNext