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

[requests] loosen HTTPError constructor #10776

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

hsheth2
Copy link
Contributor

@hsheth2 hsheth2 commented Sep 25, 2023

Follow up on #10766, should help with #10764

@github-actions

This comment has been minimized.

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.

Thanks, we need one more change.

@@ -16,7 +16,7 @@ class JSONDecodeError(InvalidJSONError): ...
class HTTPError(RequestException):
request: Request | PreparedRequest
Copy link
Collaborator

Choose a reason for hiding this comment

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

We also need to add None to request.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

cloud-init (https://github.com/canonical/cloud-init)
- tests/unittests/sources/azure/test_errors.py:169: error: Missing named argument "request" for "HTTPError"  [call-arg]
- tests/unittests/sources/azure/test_imds.py:64: error: Missing named argument "request" for "HTTPError"  [call-arg]
- tests/unittests/sources/test_azure.py:343: error: Missing named argument "request" for "HTTPError"  [call-arg]

paasta (https://github.com/yelp/paasta)
- paasta_tools/mesos_maintenance.py:213: error: Missing named argument "request" for "HTTPError"  [call-arg]

apprise (https://github.com/caronc/apprise)
- test/helpers/rest.py:63: error: Missing named argument "request" for "HTTPError"  [call-arg]
- test/test_attach_http.py:59: error: Missing named argument "request" for "HTTPError"  [call-arg]
- test/test_config_http.py:54: error: Missing named argument "request" for "HTTPError"  [call-arg]

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.

Thanks!

@srittau srittau merged commit ec52bf1 into python:main Sep 27, 2023
47 checks passed
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.

None yet

2 participants