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

Rename resp.body to resp.text #1578

Closed
kgriffs opened this issue Oct 7, 2019 · 7 comments · Fixed by #1764
Closed

Rename resp.body to resp.text #1578

kgriffs opened this issue Oct 7, 2019 · 7 comments · Fixed by #1764
Labels
good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! maintenance
Milestone

Comments

@kgriffs
Copy link
Member

kgriffs commented Oct 7, 2019

For both the WSGI and ASGI interfaces, rename Response.body to Response.text to provide a better contrast to Response.data. Response.body should then be made a deprecated alias.

Don't forget to also grep the docstrings and /docs for references to 'body' and update them accordingly.

NOTE: It may be best to wait to implement this issue until #1573 is merged to avoid conflicts.

@kgriffs kgriffs added good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks! maintenance labels Oct 7, 2019
@kgriffs kgriffs added this to the Version 3.0 milestone Oct 7, 2019
@ahmedpyarali2
Copy link

@kgriffs i'll try to do it.

@vytas7
Copy link
Member

vytas7 commented Nov 27, 2019

@MrPycharm great 👍

I added blocked-by-release just to reflect upon the relation to merging ASGI branch/the first async alpha release, but you can start working on it in the meanwhile. Just that we'll probably want to merge the mentioned large PR first, and you may have to do a second round of changes if that's OK @MrPycharm .

@ahmedpyarali2
Copy link

@vytas7 sure.

@vytas7
Copy link
Member

vytas7 commented Jul 1, 2020

@MrPycharm thought just checking if you were still working on this?
And sorry for not removing the label earlier. This is no longer blocked on any issues as #1573 landed some months ago.

@ahmedpyarali2
Copy link

Hi @vytas7, apologies for not updating here. I might not be able to complete it because I am caught up in some urgent things these days.

@vytas7
Copy link
Member

vytas7 commented Jul 1, 2020

No worries! I'm then leaving the needs contributor label for now, but don't hesitate to let us know if you wish to grab this (or another) issue again!

@ahmedpyarali2
Copy link

Sure @vytas7 I'll pick it up again if I get a chance to :)

ashutoshvarma added a commit to ashutoshvarma/falcon that referenced this issue Aug 22, 2020
rename Response.body with Response.text.
Response.body is now deprecated alias for Response.text

fix falconry#1578
ashutoshvarma added a commit to ashutoshvarma/falcon that referenced this issue Aug 23, 2020
rename Response.body with Response.text.
Response.body is now deprecated alias for Response.text

fix falconry#1578
@vytas7 vytas7 added in progress and removed needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks! labels Aug 28, 2020
@vytas7 vytas7 added needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks! and removed in progress labels Nov 29, 2020
@CaselIT CaselIT added in progress and removed needs contributor Comment on this issue if you'd like to volunteer to work on this. Thanks! labels Dec 12, 2020
vytas7 added a commit that referenced this issue Dec 17, 2020
* refactor(Response): deprecate Response.body

rename Response.body with Response.text.
Response.body is now deprecated alias for Response.text

fix #1578

* docs(Response): change all reference to body with text

* chore: rename also HTTPStatus body attribute to text

* docs: improve documentation, add changelog

* test: filter warnings

* chore: make mypy happy

* docs: update some further body reference to text

Co-authored-by: Vytautas Liuolia <vytautas.liuolia@gmail.com>
Co-authored-by: Federico Caselli <cfederico87@gmail.com>
Co-authored-by: Kurt Griffiths <mail@kgriffs.com>
openstack-mirroring pushed a commit to openstack/freezer-api that referenced this issue Dec 1, 2024
The str(url) function in SQLAlchemy hides the password.
For a URL string that is to be re-used, use
render_as_string(hide_password=False).

this also replaces usege of falcon resp.body to resp.text [1]

[1] falconry/falcon#1578

Change-Id: Ib8a393fd626f5515ef92632a5236120c3ccbde05
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue Dec 1, 2024
* Update freezer-api from branch 'master'
  to c826b3ab1f41c83c31e8e3b5c27a28d24f2dbd66
  - do not use str(url) to stringify a URL for subsequent use
    
    The str(url) function in SQLAlchemy hides the password.
    For a URL string that is to be re-used, use
    render_as_string(hide_password=False).
    
    this also replaces usege of falcon resp.body to resp.text [1]
    
    [1] falconry/falcon#1578
    
    Change-Id: Ib8a393fd626f5515ef92632a5236120c3ccbde05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Comment on this issue if you'd like to volunteer to work on this. Thanks! maintenance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants