Skip to content

v3.1.0

Choose a tag to compare

@kennethreitz kennethreitz released this 22 Mar 11:57
· 77 commits to main since this release

What's New

New features:

  • HTTP method filtering — @api.route("/data", methods=["GET"])
  • Lifespan context managers for startup/shutdown
  • api.exception_handler() for custom error handling
  • api.graphql() one-liner GraphQL setup
  • resp.file() to serve files with auto content-type detection
  • Before-request hooks now short-circuit when status code is set
  • req.path_params, req.client, req.is_json properties
  • uuid and path route convertors
  • PEP 561 py.typed marker

Bug fixes:

  • Fix multipart parser losing headers when parts have multiple headers
  • Fix url_for() with typed route params ({id:int})
  • Fix resp.body encoding crash on bytes content
  • Fix GraphQL text query missing await
  • Fix Python 3.9 compatibility for type annotations

Breaking changes:

  • pip install responder now installs everything (GraphQL, OpenAPI, CLI) — no more extras
  • Removed poethepoet task runner
  • Minimum Python version is 3.9

Stats: 159 tests, 96% coverage.