-
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
Conversation
Fix SSL connection testing in Python 3.7
Thanks for this! A couple of comments... I have no convenient way to test this, so which environment(s) have you tested it in? |
Co-Authored-By: seanthegeek <[email protected]>
@jeffwidman Python 3.7 on Windows and Python 3.6 on Debian Buster. |
+1 |
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.
Can you clean up the commit history?
if sys.version_info >= (3, 7): | ||
ret = None | ||
else: | ||
raise err |
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.
IIRC, you only need this to be raise
and it will re-raise the most recent one
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Like the .gitignore
change, this feels like a distinct PR / commit which wouldn't happen if I merge by squashing
@@ -15,3 +15,4 @@ docs/_build | |||
integration-test/ | |||
tests-env/ | |||
.pytest_cache/ | |||
venv/ |
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...
Hi, With the following code:
I get an error:
Python 3.7.1 on OSX connecting to Aiven Kafka 2.0.1 Similarly, on linux:
Python 3.7.1 |
Hi, I'm getting a similar (but not exactly the same) error as @mooperd 's when calling
Update: I was able to fix the issue above by catching the
|
Superseded by PR #1669 |
@mooperd / @joagain I just merged #1669. Please try the latest |
I did: pip install git+https://github.com/dpkp/kafka-python after #1669 was merged and I need to add except OSError as well, otherwise I get the same: If I add the OSError catch there, it works for me (OSX, python 3.7.0) |
@danjo133 can you add this as a separate issue? Or better yet a new PR so that we can discuss the actual code change? Commenting on old issues just tends to get lost in the noise... |
Closes issue #1549
This change is