[PR #26693] fix: downgrade gevent to 24.11.1 to resolve Python 3.12 SSL error #31517

Open
opened 2026-02-21 20:49:37 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/26693

State: open
Merged: No


Description

Fixes #26689

This PR resolves a critical bug where gevent 25.9.1 causes RecursionError when establishing SSL/TLS connections on Python 3.12.

Bug Details

Error Message:

RecursionError: maximum recursion depth exceeded in comparison

Affected Environment:

  • Python 3.12
  • gevent 25.9.1
  • Deployments using gevent worker class (e.g., Google Cloud Run)
  • Operations requiring cloud storage access via SSL/TLS

Steps to Reproduce

  1. Deploy Dify 1.9.1 on Python 3.12 environment with gevent worker
  2. Attempt to access cloud storage (S3, GCS, etc.)
  3. Observe RecursionError during SSL/TLS connection establishment

Expected Behavior

SSL/TLS connections should be established successfully without recursion errors.

Solution

Downgrade gevent from 25.9.1 to 24.11.1 to resolve the compatibility issue with Python 3.12's SSL module.

Changes:

  • Updated api/pyproject.toml to pin gevent to 24.11.1

Testing

  • Verified the fix resolves SSL connection errors on Python 3.12
  • Existing tests pass
  • No regression in gevent functionality
**Original Pull Request:** https://github.com/langgenius/dify/pull/26693 **State:** open **Merged:** No --- ## Description Fixes #26689 This PR resolves a critical bug where gevent 25.9.1 causes `RecursionError` when establishing SSL/TLS connections on Python 3.12. ## Bug Details **Error Message:** ``` RecursionError: maximum recursion depth exceeded in comparison ``` **Affected Environment:** - Python 3.12 - gevent 25.9.1 - Deployments using gevent worker class (e.g., Google Cloud Run) - Operations requiring cloud storage access via SSL/TLS ## Steps to Reproduce 1. Deploy Dify 1.9.1 on Python 3.12 environment with gevent worker 2. Attempt to access cloud storage (S3, GCS, etc.) 3. Observe RecursionError during SSL/TLS connection establishment ## Expected Behavior SSL/TLS connections should be established successfully without recursion errors. ## Solution Downgrade gevent from 25.9.1 to 24.11.1 to resolve the compatibility issue with Python 3.12's SSL module. **Changes:** - Updated `api/pyproject.toml` to pin gevent to `24.11.1` ## Testing - [ ] Verified the fix resolves SSL connection errors on Python 3.12 - [ ] Existing tests pass - [ ] No regression in gevent functionality
yindo added the pull-request label 2026-02-21 20:49:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#31517