Skip to content

[requests] Add _content to Response #4353

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

Merged
merged 1 commit into from
Jul 22, 2020
Merged

Conversation

jermenkoo
Copy link
Contributor

@jermenkoo jermenkoo commented Jul 22, 2020

requests module defines _content as https://github.com/psf/requests/blob/8149e9fe54c36951290f198e90d83c8a0498289c/requests/models.py#L819-L836 and pyre was complaining about this missing

def foo(...) -> None:
    response = requests.Response()
    # pyre-fixme[16]: `Response` has no attribute `_content`.
    response._content = content

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, _content can also be False, but I'm fine with this.

@srittau srittau merged commit 09718c6 into python:master Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants