Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Remove deprecated litestar.middleware.exceptions module and deprecated params of internal ExceptionHandlerMiddleware #3435

Open
wants to merge 13 commits into
base: v3.0
Choose a base branch
from

Conversation

provinzkraut
Copy link
Member

@provinzkraut provinzkraut commented Apr 27, 2024

Description

  • Remove deprecated module litestar.middleware.exceptions
  • Remove deprecated app param of ExceptionHandlerMiddleware
  • Remove deprecated exception_handlers param of ExceptionHandlerMiddleware

Closes

@provinzkraut provinzkraut requested review from a team as code owners April 27, 2024 07:26
@github-actions github-actions bot added area/asgi area/docs This PR involves changes to the documentation area/private-api This PR involves changes to the privatized API Breaking 🔨 size: small type/feat pr/internal labels Apr 27, 2024
Copy link

codecov bot commented Apr 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.26%. Comparing base (a4d7ea1) to head (5c13610).

Additional details and impacted files
@@            Coverage Diff             @@
##             v3.0    #3435      +/-   ##
==========================================
+ Coverage   97.99%   98.26%   +0.26%     
==========================================
  Files         326      323       -3     
  Lines       14537    14495      -42     
  Branches     2302     2294       -8     
==========================================
- Hits        14246    14243       -3     
+ Misses        154      118      -36     
+ Partials      137      134       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

JacobCoffee and others added 9 commits April 28, 2024 13:19
* Trigger documentation build

* Trigger documentation build

* docs: update to v3 style

* docs: move some things to litestar.dev repo, change versioning, add environment tag

* docs: update landing page

* chore: update lockfile

* chore: add AA upper constraint

* fix(docs): re-colonize

* docs: enable sphinx-togglebutton

* docs: use current year var

* deps: update deps

* fix(docs): do not link __name__ for now

* fix(docs): use correct link to page

---------

Co-authored-by: Peter Schutt <peter.github@proton.me>
* Remove deprecated StaticFiles and StaticFilesConfig
* remove special casing of static files app from handlers/router
* remove outdated docs sections
* Add what's new section
* Rename tests for consistency
This PR changes behavior of parameters that are typed in a union with `None`. Prior behavior was to implicitly default their value to `None` if a value wasn't provided making an apparently non-optional parameter (i.e., no declared default) actually optional. Surprising behavior at best, dangerous at worst.

New behavior is to throw a client error when a parameter without a default is not provided.
* refactor: removes deprecated OpenAPIController

This PR removes all deprecated elements of OpenAPIConfig and the OpenAPIController, removes any obsolete tests and refactors tests that were parametrized to test both OpenAPIController and the router-based approach.

* docs: What's new entry

* Update docs/usage/openapi/ui_plugins.rst

Co-authored-by: Jacob Coffee <jacob@z7x.org>

* Update litestar/openapi/config.py

* fix: remove whitespace

* fix: import table formatting

(i hope)

---------

Co-authored-by: Jacob Coffee <jacob@z7x.org>
…e` (#3393)

* Remove 'app' parameter from `.to_asgi_response`
Remove the deprecated utility functions, `get_litestar_scope_state``, ``set_litestar_scope_state``, ``delete_litestar_scope_state``, and ``is_sync_or_async_generator``.
* remove handler names
* Remove option handler creation from HTTPRoute
* Remove methods attribute from BaseRoute
* Move kwargs model to handlers and creation to on_registration
* Store kwargs model on handlers instead of routes
* Simplify HTTPRoute route_handler_map creation
* Simplify Router.route_handler_method_map
* Relax typing of HTTPRoute
* Move handling logic to route handlers
* Remove scope_type
* Don't pass route to HTTPRouteHandler during handling
* Don't pass scope to handle methods
* Resolve and establish connections in routes; Only pass connections to handlers

---------

Co-authored-by: Jacob Coffee <jacob@z7x.org>
Co-authored-by: Peter Schutt <peter.github@proton.me>
fix(docs): adjust build script
@provinzkraut provinzkraut force-pushed the remove-exception-handler-middleware-debug-param branch from dd8c727 to 5c13610 Compare May 19, 2024 14:00
Copy link

sonarcloud bot commented May 19, 2024

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/asgi area/docs This PR involves changes to the documentation area/private-api This PR involves changes to the privatized API Breaking 🔨 pr/internal size: small type/feat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants