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

bpo-39006: Fix asyncio when the ssl module is missing #17524

Merged
merged 1 commit into from Dec 9, 2019

Conversation

@vstinner
Copy link
Member

vstinner commented Dec 9, 2019

Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.

https://bugs.python.org/issue39006

Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
@asvetlov

This comment has been minimized.

Copy link
Contributor

asvetlov commented Dec 9, 2019

Thanks, @vstinner
I've missed that we run tests without ssl module also.
I (wrongly) thought we dropped this configuration from the supported matrix at some time.

@vstinner

This comment has been minimized.

Copy link
Member Author

vstinner commented Dec 9, 2019

"I've missed that we run tests without ssl module also. I (wrongly) thought we dropped this configuration from the supported matrix at some time."

See https://bugs.python.org/issue39006 : it looks like a bug on the buildbot.

But I chose to write a fix since the code already handles ImportError on "import ssl".

If you consider that ssl is requires, test_asyncio must be skipped if ssl is missing and code handling ImportError should be removed.

IMHO supporting missing ssl doesn't require too much maintenance and so can be kept ;-)

@asvetlov

This comment has been minimized.

Copy link
Contributor

asvetlov commented Dec 9, 2019

@vstinner you are right.
The patch is correct, please merge it.

@vstinner vstinner merged commit 82b4950 into python:master Dec 9, 2019
4 checks passed
4 checks passed
Azure Pipelines PR #20191209.14 succeeded
Details
bedevere/issue-number Issue number 39006 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@vstinner vstinner deleted the vstinner:asyncio_ssl branch Dec 9, 2019
@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Dec 9, 2019

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒🤖

miss-islington added a commit to miss-islington/cpython that referenced this pull request Dec 9, 2019
Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
(cherry picked from commit 82b4950)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Dec 9, 2019

GH-17527 is a backport of this pull request to the 3.8 branch.

@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Dec 9, 2019

GH-17528 is a backport of this pull request to the 3.7 branch.

miss-islington added a commit to miss-islington/cpython that referenced this pull request Dec 9, 2019
Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
(cherry picked from commit 82b4950)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington added a commit that referenced this pull request Dec 9, 2019
Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
(cherry picked from commit 82b4950)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington added a commit that referenced this pull request Dec 9, 2019
Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
(cherry picked from commit 82b4950)

Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.