Skip to content

refactor(sqlalchemy): move deprecated contrib.sqlalchemy module to plugins.sqlalchemy #4069

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

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

Conversation

provinzkraut
Copy link
Member

No description provided.

JacobCoffee and others added 30 commits March 22, 2025 11:40
* 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 <[email protected]>
* 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 <[email protected]>

* Update litestar/openapi/config.py

* fix: remove whitespace

* fix: import table formatting

(i hope)

---------

Co-authored-by: Jacob Coffee <[email protected]>
…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 <[email protected]>
Co-authored-by: Peter Schutt <[email protected]>
fix(docs): adjust build script
* Backport static files path traversal fix
* make route handlers functional decorators
…deprecated params of internal `ExceptionHandlerMiddleware` (#3435)

* refactor!: Remove deprecated `app` param of `Response.to_asgi_response` (#3393)
* Remove 'app' parameter from `.to_asgi_response`
* Remove debug param
* Remove exception_handlers param
* Remove litestar.middleware.exceptions
Port parse_values_from_connection_kwargs changes
@cofin cofin force-pushed the v3/remove-contrib-sqlalchemy branch from 6c6b2ed to 6e86013 Compare April 13, 2025 18:36
@github-actions github-actions bot removed area/file-system area/logging area/contrib This PR involves changes to the contrib (Deprecated) area/handlers This PR involves changes to the handlers area/signature area/types This PR involves changes to the custom types labels Apr 13, 2025
@cofin cofin changed the title refactor(sqlalchemy):! move deprecated contrib.sqlalchemy module to plugins.sqlalchemy feat(sqlalchemy):! move deprecated contrib.sqlalchemy module to plugins.sqlalchemy Apr 13, 2025
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR also removes the Pagination and repository ABC that was conditionally imported when AA was missing.

Copy link

codecov bot commented Apr 13, 2025

Codecov Report

Attention: Patch coverage is 37.06294% with 90 lines in your changes missing coverage. Please review.

Project coverage is 96.35%. Comparing base (e751d20) to head (dfc3d35).
Report is 432 commits behind head on v3.0.

Files with missing lines Patch % Lines
litestar/plugins/sqlalchemy/repository.py 0.00% 22 Missing ⚠️
litestar/plugins/sqlalchemy/exceptions.py 0.00% 13 Missing ⚠️
litestar/plugins/sqlalchemy/filters.py 0.00% 13 Missing ⚠️
litestar/plugins/sqlalchemy/service.py 0.00% 13 Missing ⚠️
litestar/plugins/sqlalchemy/types.py 0.00% 13 Missing ⚠️
litestar/plugins/sqlalchemy/utils.py 0.00% 11 Missing ⚠️
litestar/plugins/sqlalchemy/__init__.py 87.50% 1 Missing and 1 partial ⚠️
litestar/plugins/sqlalchemy/operations.py 0.00% 2 Missing ⚠️
litestar/datastructures/headers.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             v3.0    #4069      +/-   ##
==========================================
- Coverage   98.25%   96.35%   -1.91%     
==========================================
  Files         322      331       +9     
  Lines       14672    15328     +656     
  Branches     2332     1692     -640     
==========================================
+ Hits        14416    14769     +353     
- Misses        117      427     +310     
+ Partials      139      132       -7     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cofin cofin changed the title feat(sqlalchemy):! move deprecated contrib.sqlalchemy module to plugins.sqlalchemy refactor(sqlalchemy): move deprecated contrib.sqlalchemy module to plugins.sqlalchemy Apr 13, 2025
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/datastructures area/dependencies This PR involves changes to the dependencies area/docs This PR involves changes to the documentation area/middleware This PR involves changes to the middleware area/plugins This PR involves changes to the plugins area/private-api This PR involves changes to the privatized API area/testing pr/internal size: large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants