Skip to content

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

Merged
vstinner merged 1 commit intopython:masterfrom
vstinner:asyncio_ssl
Dec 9, 2019
Merged

bpo-39006: Fix asyncio when the ssl module is missing#17524
vstinner merged 1 commit intopython:masterfrom
vstinner:asyncio_ssl

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner 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
Copy link
Copy Markdown
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
Copy link
Copy Markdown
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
Copy link
Copy Markdown
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
@vstinner vstinner deleted the asyncio_ssl branch December 9, 2019 14:02
@miss-islington
Copy link
Copy Markdown
Contributor

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

miss-islington pushed 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 <[email protected]>
@bedevere-bot
Copy link
Copy Markdown

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

@bedevere-bot
Copy link
Copy Markdown

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

miss-islington pushed 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants