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

Deprecate changing the status code of a response after it has been prepared #1480

Merged
merged 1 commit into from
Dec 13, 2016

Conversation

arthurdarcet
Copy link
Contributor

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)

@asvetlov
Copy link
Member

asvetlov commented Dec 13, 2016

I prefer considering the PR as bug fix and raise RuntimeError without deprecation period.
I doubt if there are many improper uses of .set_status in existing code base.

@arthurdarcet
Copy link
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)

@codecov-io
Copy link

codecov-io commented Dec 13, 2016

Current coverage is 98.85% (diff: 100%)

Merging #1480 into master will increase coverage by <.01%

@@             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          

Powered by Codecov. Last update b7757cd...d729e4c

@asvetlov asvetlov merged commit 0a95a67 into aio-libs:master Dec 13, 2016
@asvetlov
Copy link
Member

Done!
Thank you for contribution.

@arthurdarcet arthurdarcet deleted the patch-1 branch December 13, 2016 14:14
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants