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

Unexpected SSL warning #1108

jamadden opened this Issue Feb 17, 2018 · 1 comment


None yet
1 participant

jamadden commented Feb 17, 2018

  • gevent version: 1.3a1
  • Python version: 2.7.?
  • Operating System: macOS


I'm hearing reports that for some users, even though from gevent import monkey; monkey.patch_all() is the first line in their script, they still get the SSL warning introduced in #1016. That's unexpected and disturbing.

I'm seeking more details now. I know these users use buildout, so I'm wondering if the buildout wrapper script for their entry point is somehow leading to an SSL import?

@jamadden jamadden added this to the 1.3 milestone Feb 17, 2018


This comment has been minimized.


jamadden commented Feb 17, 2018

The issue is with pkg_resources on Python 2. pkg_resources is used to create namespace packages, and so is commonly found in files.

It goes like this:

import <namespace_package> -> import pkg_resources -> import urllib -> import ssl

This doesn't happen on Python 3 because urllib is a package with no contents of its own, but on python 2 it's a module that happens to import ssl.

What I'm thinking of is just disabling the warning on Python 2 if we find pkg_resources has been imported. (I think the warning has value on Python 2 in other cases to avoid surprises when migrating to Python 3.)

jamadden added a commit that referenced this issue Feb 19, 2018

jamadden added a commit that referenced this issue Feb 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment