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
Add config option to skip Touchup step, for debugging purposes #2361
Conversation
077b217
to
131d2ef
Compare
…if touchup skipped.
131d2ef
to
a4beed3
Compare
…tartup. Add a test to ensure user-defined signals will still throw not-found. Add comment to cli args about future change in default behaviour.
# Conflicts: # sanic/app.py # sanic/cli/app.py # sanic/cli/arguments.py
Codecov Report
@@ Coverage Diff @@
## main #2361 +/- ##
=============================================
+ Coverage 87.109% 87.226% +0.117%
=============================================
Files 60 60
Lines 5027 5034 +7
Branches 905 907 +2
=============================================
+ Hits 4379 4391 +12
+ Misses 475 472 -3
+ Partials 173 171 -2
Continue to review full report at Codecov.
|
I've implemented the changes as suggested above. Still, I'd like to see |
3a4b4d6
to
8776908
Compare
That seems reasonable. I would also apply that in if app.state.is_debug:
app.config.SKIP_TOUCHUP = True One more question though: do you think it would be better if the config were not in the negative? app.config.TOUCHUP = False |
@ashleysommer How is this looking? Can we get this merged soon? |
Oh, sorry. I thought I'd finished with this. I'll check if I made those changes in my branch. |
Yeah, if we have |
Now set TOUCHUP config to False when running in debug mode
Good to go now |
Nice 😎 Looks like there was one place where the config swap was missed. Just pushed the fix for you. |
I have not tested this yet, but this might also solve some of the problems with test coverage 🤔. Maybe this is something I will check next week after the release. |
Doh! I missed the second test. Thanks. |
…-org#2361) Co-authored-by: Adam Hopkins <adam@amhopkins.com>
This new option allows you to configure the App to skip the Touchup step at startup.
This is useful for debugging purposes, it means you can again set breakpoints into sanic methods like
handle_request
and have them work as expected at runtime.This option also sets
fail_not_found
to False for built-in system signals, so the code can still dispatch signals and not get a NotFound exception.Tests added for coverage.