-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
Replace abort()
with raise SanicException
#1520
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1520 +/- ##
==========================================
+ Coverage 98.11% 98.12% +0.01%
==========================================
Files 129 129
Lines 4403 4436 +33
Branches 746 754 +8
==========================================
+ Hits 4320 4353 +33
Misses 43 43
Partials 40 40 |
I've cherry-picked ab1fe66 from the failing Dependabot PR so that we can verify this actually works when the PR is tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one! Thank you for this!
@mildbyte looks like the tests have failed, not sure if it is related to the PR or the update 🤔 would you be able to take a look at them? 😊 |
@patrick91 Will do, looks like it's also related to some Sanic deprecations. |
I think this is fixed by upgrading sanic-testing to 0.8.2. I did it myself using Poetry (with |
This is for compatibility with newly-released Sanic 21.12 which removed the deprecated `abort()` in sanic-org/sanic#2306. Before that, it was a simple wrapper around `raise SanicException` (https://github.com/sanic-org/sanic/blob/523db190a732177eda5a641768667173ba2e2452/sanic/exceptions.py#L262-L265), so this change makes it explicit and removes the dependency on `abort()`.
for more information, see https://pre-commit.ci
Bumps [sanic](https://github.com/sanic-org/sanic) from 21.9.3 to 21.12.0. - [Release notes](https://github.com/sanic-org/sanic/releases) - [Changelog](https://github.com/sanic-org/sanic/blob/main/CHANGELOG.rst) - [Commits](sanic-org/sanic@v21.9.3...v21.12.0) --- updated-dependencies: - dependency-name: sanic dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
(0.7.0 uses the old `app.test_client` attribute which has been deprecated in Sanic 21.12).
@patrick91 I need some help with getting the CI started off again, don't think I have the permission to trigger the job :) |
@mildbyte done! will do another review in a couple of hours :) |
Ugh. Looks like the test failures are now unrelated to the change directly and are due to unintended |
@mildbyte not 100% sure! I'll take a look at it soon 😊 |
@mildbyte are you fine with skipping the tests? if so I'll merge 😊 |
@patrick91 Go for it, thanks for figuring it out! |
Thanks for contributing to Strawberry! 🎉 You've been invited to join You can also request a free sticker by filling this form: https://forms.gle/dmnfQUPoY5gZbVT67 And don't forget to join our discord server: https://strawberry.rocks/discord 🔥 |
This is for compatibility with newly-released Sanic 21.12.
Description
Sanic 21.12 removed the deprecated
abort()
in sanic-org/sanic#2306. Before that, it was a simple wrapper aroundraise SanicException
(https://github.com/sanic-org/sanic/blob/523db190a732177eda5a641768667173ba2e2452/sanic/exceptions.py#L262-L265), so this change makes it explicit and removes the dependency onabort()
.Note: I haven't tested this yet, relying on Strawberry's CI to catch out compat issues with the currently supported Sanic versions.
Types of Changes
Issues Fixed or Closed by This PR
Fixes the Dependabot bump issue in #1516
Checklist