Skip to content

Recursion bug in python3.6 and gevent.monkey.patch_ssl() #97

Open
@rossengeorgiev

Description

@rossengeorgiev

Continuation from #95

Only in python 3.6 and when using SteamClient, which uses gevent.

Happens when the gevent monkey patches are applied after importing requests module. gevent might have a fix in a future release

code to reproduce

import requests
import gevent.monkey
gevent.monkey.patch_ssl()
requests.get("https://google.com")

Work around

Do the gevent monkey patch before any other code or imports. So at the very top:

import gevent.monkey
gevent.monkey.patch_socket()
gevent.monkey.patch_ssl()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions