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

Implement history for ClientResponseError. #1742

Merged
merged 3 commits into from
Mar 22, 2017
Merged

Implement history for ClientResponseError. #1742

merged 3 commits into from
Mar 22, 2017

Conversation

penguinolog
Copy link
Contributor

What do these changes do?

ClientResponseError will contain history from ClientResponse.

Are there changes in behavior for the user?

User can extract redirect history from exception and use it for error investigation purposes.

Related issue number

#1741

ClientResponseError will contain history from ClientResponse.
Implememnts: #1741
History type is tuple
@@ -25,11 +25,13 @@ class ClientResponseError(ClientError):
:param request_info: instance of RequestInfo
"""

def __init__(self, request_info, *, code=0, message='', headers=None):
def __init__(self, request_info, *, code=0, message='', headers=None,
history=None):
Copy link
Member

Choose a reason for hiding this comment

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

let's make it required. we always pass history.

@fafhrd91
Copy link
Member

great! thanks.

@penguinolog
Copy link
Contributor Author

I have code-style question: no type-hints - it's project code-style, or it's allowed hinting with py3.3 backward compatibility?

@fafhrd91
Copy link
Member

we started before type-hinting, we need to support py3.4
I guess, we can add typing to dependency.

if you want to use type-hinting, make another PR

@fafhrd91
Copy link
Member

Do you want me to wait with merge of this pr?

@penguinolog
Copy link
Contributor Author

penguinolog commented Mar 22, 2017 via email

@fafhrd91 fafhrd91 merged commit ef0a3f0 into aio-libs:master Mar 22, 2017
@fafhrd91
Copy link
Member

Ok, good

@penguinolog penguinolog deleted the history branch March 23, 2017 09:06
@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.

2 participants