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

RecursionError: maximum recursion depth exceeded with super(SSLContext, SSLContext).options.__set__(self, value) python 3.12 #961

Closed
alexk4153 opened this issue May 23, 2024 · 2 comments

Comments

@alexk4153
Copy link

Hello to all!!!
Would appreciate some help.

Migrating from python 3.8 to 3.12 and having this issue:
app = msal.ConfidentialClientApplication( /opt/project/env/lib/python3.12/site-packages/msal/application.py:516: in __init__ self.authority = Authority( /opt/project/env/lib/python3.12/site-packages/msal/authority.py:79: in __init__ openid_config = tenant_discovery( /opt/project/env/lib/python3.12/site-packages/msal/authority.py:210: in tenant_discovery resp = http_client.get(tenant_discovery_endpoint, **kwargs) /opt/project/env/lib/python3.12/site-packages/msal/individual_cache.py:269: in wrapper value = function(*args, **kwargs) /opt/project/env/lib/python3.12/site-packages/requests/sessions.py:600: in get return self.request("GET", url, **kwargs) /opt/project/env/lib/python3.12/site-packages/requests/sessions.py:587: in request resp = self.send(prep, **send_kwargs) /opt/project/env/lib/python3.12/site-packages/requests/sessions.py:701: in send r = adapter.send(request, **kwargs) /opt/project/env/lib/python3.12/site-packages/requests/adapters.py:486: in send resp = conn.urlopen( /opt/project/env/lib/python3.12/site-packages/urllib3/connectionpool.py:715: in urlopen httplib_response = self._make_request( /opt/project/env/lib/python3.12/site-packages/urllib3/connectionpool.py:404: in _make_request self._validate_conn(conn) /opt/project/env/lib/python3.12/site-packages/urllib3/connectionpool.py:1058: in _validate_conn conn.connect() /opt/project/env/lib/python3.12/site-packages/urllib3/connection.py:400: in connect self.ssl_context = create_urllib3_context( /opt/project/env/lib/python3.12/site-packages/urllib3/util/ssl_.py:312: in create_urllib3_context context.options |= options /usr/local/lib/python3.12/ssl.py:562: in options super(SSLContext, SSLContext).options.__set__(self, value) /usr/local/lib/python3.12/ssl.py:562: in options super(SSLContext, SSLContext).options.__set__(self, value) E RecursionError: maximum recursion depth exceeded !!! Recursion detected (same locals & position)

This runs part of a test suite of python.
What I tried to so far:

  1. eventlet.monkey_patch()
  2. downgrading eventlet and dnspython as said in this issue Eventlet 35.2, and 36.1 both fail with dnspython2.6.1 - Python3.12 #957
  3. tried different versions of requets library and urllib3 library, none worked so far.

Any ideas?

@alexk4153
Copy link
Author

Okay it seems to be an issue with with bundled certificates, I downgraded requests to 2.27 and urllib3 to 1.26.18 and eventlet to 0.36.1, and finally installed pip-system-certs 4.0 this resolved the issue, not sure how is this related to eventlet, but this issue is resolved

@4383
Copy link
Member

4383 commented May 28, 2024

Thanks for details

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

No branches or pull requests

2 participants