-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix SSL connection testing in Python 3.7 #1661
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
Changes from all commits
84846a2
0ded822
699cbf5
ad8e31e
4e8fa5c
6dca97d
2f5d358
165ac85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ docs/_build | |
integration-test/ | ||
tests-env/ | ||
.pytest_cache/ | ||
venv/ | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,9 @@ pushd servers | |
fi | ||
echo | ||
echo "Extracting kafka ${kafka} binaries" | ||
if [ ! -d ../$kafka ]; then | ||
mkdir ../$kafka | ||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Like the |
||
tar xzvf ${KAFKA_ARTIFACT} -C ../$kafka/ | ||
rm -rf ../$kafka/kafka-bin | ||
mv ../$kafka/${KAFKA_ARTIFACT/%.t*/} ../$kafka/kafka-bin | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -357,6 +357,13 @@ def connect(self): | |
ret = self._sock.connect_ex(self._sock_addr) | ||
except socket.error as err: | ||
ret = err.errno | ||
except ValueError as err: | ||
# Python 3.7 and higher raises ValueError if a socket | ||
# is already connected | ||
if sys.version_info >= (3, 7): | ||
ret = None | ||
else: | ||
raise err | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC, you only need this to be |
||
|
||
# Connection succeeded | ||
if not ret or ret == errno.EISCONN: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me to add, but as a separate commit from the SSL fix.
However your commit history is a mess, so normally I'd merge this PR by squashing... but that would conflict with above...