Deprecate changing the status code of a response after it has been prepared#1480
Merged
asvetlov merged 1 commit intoaio-libs:masterfrom Dec 13, 2016
Merged
Deprecate changing the status code of a response after it has been prepared#1480asvetlov merged 1 commit intoaio-libs:masterfrom
asvetlov merged 1 commit intoaio-libs:masterfrom
Conversation
Member
|
I prefer considering the PR as bug fix and raise |
2ac27a3 to
d318878
Compare
…ses a RuntimeError
d318878 to
d729e4c
Compare
Contributor
Author
|
@asvetlov works for me, I have updated the PR to raise a RuntimeError (+ added an entry in CHANGES.rst and added a test) |
Current coverage is 98.85% (diff: 100%)@@ master #1480 diff @@
==========================================
Files 30 30
Lines 6982 6984 +2
Methods 0 0
Messages 0 0
Branches 1162 1163 +1
==========================================
+ Hits 6902 6904 +2
Misses 40 40
Partials 40 40
|
Member
|
Done! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changing the status of a Response after it has been prepared doesn't do anything and should raise an exception imo.
Since breaking all apps that do this might not be an option, I've added a warning when this happens and I would suggest changing the warning to an exception in the next major release (not sure what the policy on breaking changes is, so up to you!)
(this PR is missing updates in CHANGES/…, I can add those if this looks good to you)