Skip to content

Releases: jasujm/hrefs

Version 0.14

05 Feb 19:06

Choose a tag to compare

Added

  • Support Python 3.13
  • Distribute py.typed with the package

Fixed

  • Fix matching mounted routes in newer versions of Starlette

Removed

  • Support for EOL Python versions prior to 3.9
  • Dependency to typing_extensions

Version 0.13

05 Dec 20:32

Choose a tag to compare

Changed

  • Refactor BaseReferrableModel internals. This is mainly for maintainability reasons. The API remains the same, but the new implementation removes some earlier restrictions, such as forbidding recursive hyperlinks as primary key.

Fixed

  • Support forward references in hyperlinks in pydantic v2

Version 0.12

18 Nov 20:36

Choose a tag to compare

Added

  • Support Python 3.12
  • Experimental support for pydantic v2

Changed

  • Failing to parse Href due to incompatible input type throws ValueError instead of TypeError to remain compatible withpydantic v2
  • Tests and documentation now refer pydantic v2 APIs as an alternative, whenever the v1 API is deprecated
  • Unparameterized Href causes error on model definition time, instead of model validation time

Deprecated

  • Href.__modify_href_schema__() and Href.validate() are only used by pydantic v1, and no longer part of the public API

Fixed

  • Unwrapping of path parameters when the model key contains recursive hyperlinks

Version 0.11.1

01 Sep 19:49

Choose a tag to compare

Changed

  • Specify pydantic<2 in requirements, since the library doesn't yet work with pydantic>=2
  • Documentation fixes

Version 0.11

01 Sep 14:54

Choose a tag to compare

Fixed

  • Fixed JSON encoding error with recent FastAPI versions
  • Fixed starlette.HrefMiddleware not being compatible with lifespans

Deprecated

  • Python 3.7 is EOL. It is still allowed, but no longer tested.

Version 0.10

18 Mar 22:53

Choose a tag to compare

Changed

  • Some configuration errors in the Starlette integration (missing details_view route, model key not compatible with the route parameters etc.) now throw a custom hrefs.ReferrableModelError instead of pydantic.ValidationError

Fixed

  • Fixed incorrect documentation
  • Fixed a bug in Starlette integration not correctly finding details view if there are mounts
  • Fixed a bug in Starlette integration not correctly handling mounts without name

Version 0.9

17 Mar 19:22

Choose a tag to compare

Changed

  • Clean up and improve unit tests
  • Improve documentation about testing
  • Make starlette.HrefMiddleware support websocket routes

Fixed

  • Support starlette version 0.26.0 and above

Version 0.8

05 Mar 09:54

Choose a tag to compare

Added:

  • The hrefs.model.HrefResolver based hyperlink resolution mechanism to replace tight coupling between model classes and the web framework
  • Starlette integration now supports routes mounted via sub-application

Fixed:

  • Starlette integration silently ignoring some errors when converting URL to model key

Deprecated:

  • hrefs.starlette.ReferrableModel since referrable models should now inherit hrefs.BaseReferrableModel directly

Version 0.7

20 Feb 17:03

Choose a tag to compare

Added

  • Support for query parameters in URLs

Changed

  • Simplified type hints and removed a bunch of code requiring suppression of pylint and mypy warnings

Deprecated

Version 0.6.1

18 Feb 19:40

Choose a tag to compare

Fixed

  • Documentation proofreading