Handle PySocks ProxyConnectionError#202
Merged
temoto merged 2 commits intohttplib2:masterfrom Oct 11, 2021
Merged
Conversation
f0ca992 to
007089f
Compare
temoto
reviewed
Sep 26, 2021
Member
temoto
left a comment
There was a problem hiding this comment.
Thanks for working on this!
Please, extract it to function errno_from_exception or some better name, then I can add documenting comments.
Contributor
Author
Contributor
Author
|
Is anything else needed to be done for this PR, @temoto? |
In the presence of PySocks, httplib2 falls back on it instead of its own bundled `socks.py`. However, exception `ProxyConnectionError` produced by PySocks is a bit different that expected, it lacks `args`. An attempt to extract `errno` from it fails with `IndexError: tuple index out of range` (see httplib2#170). The patch addresses this.
Member
|
@ivanyu sorry, I was trying to restore CI on Github Actions before doing any merges. It's in master now. Thank you for your work. Please emote rocket if you need this in pypi sooner. |
Member
|
Released in |
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Nov 10, 2021
0.20.2 auth: support pyparsing v3 (AttributeError downcaseTokens) httplib2/httplib2#207 proxy: correct extraction of errno from pysocks ProxyConnectionError httplib2/httplib2#202 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Nov 10, 2021
0.20.2 auth: support pyparsing v3 (AttributeError downcaseTokens) httplib2/httplib2#207 proxy: correct extraction of errno from pysocks ProxyConnectionError httplib2/httplib2#202 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Nov 10, 2021
0.20.2 auth: support pyparsing v3 (AttributeError downcaseTokens) httplib2/httplib2#207 proxy: correct extraction of errno from pysocks ProxyConnectionError httplib2/httplib2#202 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Nov 10, 2021
0.20.2 auth: support pyparsing v3 (AttributeError downcaseTokens) httplib2/httplib2#207 proxy: correct extraction of errno from pysocks ProxyConnectionError httplib2/httplib2#202 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Nov 10, 2021
0.20.2 auth: support pyparsing v3 (AttributeError downcaseTokens) httplib2/httplib2#207 proxy: correct extraction of errno from pysocks ProxyConnectionError httplib2/httplib2#202 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Nov 11, 2021
0.20.2 auth: support pyparsing v3 (AttributeError downcaseTokens) httplib2/httplib2#207 proxy: correct extraction of errno from pysocks ProxyConnectionError httplib2/httplib2#202 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
halstead
pushed a commit
to openembedded/meta-openembedded
that referenced
this pull request
Nov 11, 2021
0.20.2 auth: support pyparsing v3 (AttributeError downcaseTokens) httplib2/httplib2#207 proxy: correct extraction of errno from pysocks ProxyConnectionError httplib2/httplib2#202 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
HerrMuellerluedenscheid
pushed a commit
to HerrMuellerluedenscheid/meta-openembedded
that referenced
this pull request
Jan 16, 2022
0.20.2 auth: support pyparsing v3 (AttributeError downcaseTokens) httplib2/httplib2#207 proxy: correct extraction of errno from pysocks ProxyConnectionError httplib2/httplib2#202 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
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.
In the presence of PySocks, httplib2 falls back on it instead of its own bundled
socks.py. However, exceptionProxyConnectionErrorproduced by PySocks is a bit different that expected, it lacksargs. An attempt to extracterrnofrom it fails withIndexError: tuple index out of range(see #170). The patch addresses this.