Skip to content

fix: conditionally pass enable_cleanup_closed to aiohttp TCPConnector#17367

Merged
2 commits merged intoBerriAI:mainfrom
Joilence:fix/aiohttp-enable-cleanup-closed-deprecation
Dec 3, 2025
Merged

fix: conditionally pass enable_cleanup_closed to aiohttp TCPConnector#17367
2 commits merged intoBerriAI:mainfrom
Joilence:fix/aiohttp-enable-cleanup-closed-deprecation

Conversation

@Joilence
Copy link
Copy Markdown
Contributor

@Joilence Joilence commented Dec 2, 2025

Title

fix: conditionally pass enable_cleanup_closed to aiohttp TCPConnector

Relevant issues

N/A (addresses deprecation warning, no existing issue)

Pre-Submission checklist

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement

    Change is trivial and dependent on python versions, please let me know if still need to add tests.

  • I have added a screenshot of my new test passing locally - N/A

  • My PR passes all unit tests on make test-unit - No new tests added; existing tests unaffected

  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix

Changes

To avoid warning:

.venv/lib/python3.13/site-packages/aiohttp/connector.py:963: DeprecationWarning: enable_cleanup_closed ignored because https://github.com/python/cpython/pull/118960 is fixed in Python version sys.version_info(major=3, minor=13, micro=5, releaselevel='final', serial=0)

Fixes deprecation warning on Python 3.12.7+ and 3.13.1+ where enable_cleanup_closed is no longer needed.

Fixes deprecation warning on Python 3.12.7+ and 3.13.1+ where
enable_cleanup_closed is no longer needed since the underlying
CPython SSL connection leak bug was fixed.

See: python/cpython#118960
@vercel
Copy link
Copy Markdown

vercel bot commented Dec 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Ready Ready Preview Comment Dec 2, 2025 5:09pm

@Joilence Joilence marked this pull request as ready for review December 2, 2025 17:05
@ghost ghost merged commit 17faea9 into BerriAI:main Dec 3, 2025
5 of 7 checks passed
@LoadingZhang
Copy link
Copy Markdown
Contributor

@Joilence it looks like not merged by conflict

This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants