Skip to content

fix: instructions in deprecation warning #4121

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 9 commits into
base: main
Choose a base branch
from

Conversation

YuanhengZ
Copy link

Description

The instruction from deprecation warning from litestar/contrib/sqlalchemy/__init__.py is a little bit confusion.
Try to restructured it so that ppl reading this warning can fix it without looking for more documentation.

Also added test that checking this behavior.
Though I have some doubt about this test as it dose not run(test) against any logic.
Added it here to comply with contribution guide.

Closes

Fix #4117

Clarify the instructions in the deprecation warning to specify
importing the module and accessing attributes explicitly.
Introduce a test to ensure proper deprecation warnings are raised when importing from `litestar.contrib.sqlalchemy`. This validates the module's behavior and provides guidance on correct import paths for affected components.
@YuanhengZ YuanhengZ requested review from a team as code owners April 16, 2025 08:39
@YuanhengZ YuanhengZ changed the title Fix instructions in deprecation warning fix: instructions in deprecation warning Apr 16, 2025
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.37%. Comparing base (6225a82) to head (b533459).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4121   +/-   ##
=======================================
  Coverage   98.37%   98.37%           
=======================================
  Files         348      348           
  Lines       15845    15847    +2     
  Branches     1749     1749           
=======================================
+ Hits        15587    15589    +2     
  Misses        123      123           
  Partials      135      135           

☔ 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.

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Instructions from Warning of Depreacted seems wrong
1 participant