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

fix: Prevent crash with 'gevent' has no attribute 'version_info' #539

Merged
merged 1 commit into from
Jun 12, 2024

Commits on Jun 12, 2024

  1. fix: Prevent crash with 'gevent' has no attribute 'version_info'

    If the `gevent` module is not installed,
    but there is a directory called `gevent`
    or a `gevent.py` file in the current directory,
    then that is already importable and the statment
    `if sys.modules['gevent'].version_info < (1, 4):`
    fails with
    `AttributeError: module 'gevent' has no attribute 'version_info'`
    
    This can happen easily since many libraries like `celery`, `grpc`, `opentracing` etc,
    deliver their own file called `gevent.py`.
    
    Signed-off-by: Ferenc Géczi <ferenc.geczi@ibm.com>
    Ferenc- committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    bf6f5d6 View commit details
    Browse the repository at this point in the history