fix: wrap socket.error exceptions in ConnectionError#93
Open
label-hook[bot] wants to merge 1391 commits into
Open
fix: wrap socket.error exceptions in ConnectionError#93label-hook[bot] wants to merge 1391 commits into
label-hook[bot] wants to merge 1391 commits into
Conversation
Fixed parsing of username and password encoded in the URI
Document contextlib.closing.
Typo in History
Thanks @kevinburke
Update urllib3 to 9346c5c
Add a small note about requests-toolbelt
s/soley/solely
Added info about posted files headers
Fix for 301 redirect and latest PyOpenSSL.
Update link to pip site on docs/user/install.rst
removed unneeded parentheses from if clause
A few instances of the directives were malformed and did not result in hyperlinks in the generated HTML. Change-Id: I94d93de928ee4ff24a48797baf2ac77598a20704
…tives Docs: Fix :class: and :meth: directives
Change-Id: Ied3e600e5673eff48558b634b3c2616d13a3337b
Fix name misspelling
Change-Id: Ic1464f246602b809f3c29fbafd6f36b747d5d5df
Change-Id: Ie38844a40ec7a483e6ce5e56077be344242bcd99
Change-Id: Ic03aa394941367745f3148d299b5313849f77051
The file is empty and not linked from anywhere, resulting in a warning when building the docs. Change-Id: Ib995d094ef525496fe8b2a369e0a0c5b4c7bd2dd
More doc updates
Change-Id: I950c3da727fb97b58d96a872b0d2ed718cc60ba8
- Linkify github usernames - Remove usernames that do not exist Change-Id: Ib88b70a3010e915b3570ae5062c8cb416c9a6462
More line wrapping
Change-Id: Ic88eb128384b3cc9108151c219cd759c7524a4f1
Docs: Using print() function instead print command on advanced & quickstart
Linkify Github usernames in authors list
Removed an unnecessary "to" in the "What are "hostname doesn't match" errors?" section.
Revised wording based on feedback from @sigmavirus24
Update faq.rst
Upgrade urllib3 to 1.9.x
36453b9 to
a0df2cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses issue #92 where raw
socket.errorexceptions were not being caught and wrapped inrequests.exceptions.ConnectionError. Users expect all network-related errors to be wrapped in requests exceptions rather than receiving raw socket errors.Changes
requests/adapters.pyto catchsocket.errorexceptions in theHTTPAdapter.send()methodsocket.errorto the existing exception handling block that catches connection-related errorsrequests.exceptions.ConnectionErrorfor consistent error handlingTesting
The changes were tested against the existing test suite. The baseline test suite was already failing, and this implementation introduced no new test failures, indicating that the socket error handling addition is compatible with existing functionality.
Closes #92
Closes #92