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

Check for ExceptionMiddlware removal in starlette.exceptions #1282

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

lrafeei
Copy link
Contributor

@lrafeei lrafeei commented Jan 7, 2025

After Starlette v0.45.0 the import proxy for ExceptionMiddleware was removed from starlette.exceptions (and now only resides in starlette.middleware.exceptions).

This PR adds an additional checker to make sure that, when checking for double instrumentation, the import proxy exists (which is when this particular issue would occur).

Copy link

github-actions bot commented Jan 7, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON bandit 1 0 4.49s
✅ PYTHON black 1 0 0 0.76s
✅ PYTHON flake8 1 0 0.41s
✅ PYTHON isort 1 0 0 0.28s
✅ PYTHON pylint 1 0 2.01s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@hmstepanek hmstepanek marked this pull request as ready for review January 7, 2025 23:48
@hmstepanek hmstepanek requested a review from a team as a code owner January 7, 2025 23:48
@mergify mergify bot added the tests-failing label Jan 8, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.40%. Comparing base (4c06d26) to head (3b5e14e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1282      +/-   ##
==========================================
- Coverage   79.68%   79.40%   -0.28%     
==========================================
  Files         201      201              
  Lines       22174    22174              
  Branches     3519     3519              
==========================================
- Hits        17669    17607      -62     
- Misses       3355     3424      +69     
+ Partials     1150     1143       -7     

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

@TimPansino TimPansino changed the base branch from main to develop-tests January 8, 2025 23:44
@TimPansino TimPansino merged commit 34e7024 into develop-tests Jan 8, 2025
49 of 56 checks passed
@TimPansino TimPansino deleted the starlette-deprecation-fix branch January 8, 2025 23:45
@mergify mergify bot removed the tests-failing label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants