Skip to content

Upgrading fastapi-pagination 0.11 to 0.12

Breaking0.11.4 → 0.12.34Breaking3Platform1Deprecated1New32Changed12Fixed26Other2

BreakingUpgrade verdict

3 breaking changes and a platform requirement change.

  • When you select a single column, you no longer need to pass a transformer to wrap each value.
  • Cursor-based pages now reject a page size larger than 100 by default.
  • There is a new, type-friendly way to customize pages that no longer needs type ignore comments or TYPE_CHECKING workarounds.
  • The package now officially supports Python 3.12.
5 items need code or config changes

Python requirement changed in 0.12.22: >=3.8,<4.0 → <4.0,>=3.8.

Adds typing-extensions >=4.8.0,<5.0.0.

Drops fastapi.

Installs 5 packages in all (was 11).

No longer installs annotated-doc, anyio, idna, opentelemetry-api, starlette.

Breaking3
The sqlalchemy extension no longer requires items_transformer when selecting a scalar field.
items_transformerpaginateselect
Adds a default upper limit of 100 to the CursorParams.size field, so size query params above 100 are rejected.
CursorParams.size
Implements new page customization, replacing Page.with_custom_options with CustomizedPage and typing-compatible helpers.
PagePage.with_custom_optionsCustomizedPageUseNameUseParamsFields
Platform1
Adds official support for Python 3.12.
Deprecated1
Makes old sqlalchemy modules deprecated.
sqlalchemy