Skip to content

ref: Drop aiohttp < 3.7 - #7007

Merged
sentrivana merged 12 commits into
major/3.0from
ivana/major/drop-support-aiohttp
Aug 5, 2026
Merged

ref: Drop aiohttp < 3.7#7007
sentrivana merged 12 commits into
major/3.0from
ivana/major/drop-support-aiohttp

Conversation

@sentrivana

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

89933 passed | ❌ 2 failed | ⏭️ 5436 skipped | Total: 95371 | Pass Rate: 94.3% | Execution Time: 327m 50s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -7842
Passed Tests 📉 -7041
Failed Tests 📈 +2
Skipped Tests 📉 -803

➕ New Tests (1)

View new tests
  • test_streaming_chat_completion[True-True-False-False]
    • File: tests.integrations.litellm.test_litellm
    • Status: ❌ Failing

❌ Failed Tests

test_streaming_chat_completion[True-True-False-False]

File: tests.integrations.litellm.test_litellm
Suite: py3.10-litellm-v1.89.6
Error: assert 2 == 1 + where 2 = len([{'level': 'error', 'exception': {'values': [{'mechanism': {'type': 'unraisablehook', 'handled': False}, 'module': None, 'type': 'RuntimeError', 'value': 'Cannot install a trace function while another trace function is being installed', 'stacktrace': {'frames': [{'filename': 'threading.py', 'abs_path': '/usr/lib/python3.10/threading.py', 'function': '_bootstrap', 'module': 'threading', 'lineno': 973, 'pre_context': [' # indeed has already been destroyed, so that exceptions in', ' # _bootstrap_inner() during normal business hours are properly', ' # reported. Also, we only suppress them for daemonic threads;', ' # if a non-daemonic encounters this, something else is wrong.', ' try:'], 'context_line': ' self._bootstrap_inner()', 'post_context': [' except:', ' if self._daemonic and _sys is None:', ' return', ' raise', ''], 'vars': {'self': '<Thread(ThreadPoolExecutor-20_3, started 140000314148416)>'}}, {'filename': 'threading.py', 'abs_path': '/usr/lib/python3.10/threading.py', 'function': '_bootstrap_inner', 'module': 'threading', 'lineno': 1011, 'pre_context': [' with _active_limbo_lock:', ' _active[self._ident] = self', ' del _limbo[self]', '', ' if _trace_hook:'], 'context_line': ' _sys.settrace(_trace_hook)', 'post_context': [' if _profile_hook:', ' _sys.setprofile(_profile_hook)', '', ' try:', ' self.run()'], 'vars': {'self': '<Thread(ThreadPoolExecutor-20_3, started 140000314148416)>'}}]}}]}, 'event_id': '7a64db2d055a4aefb0fd235b9ffba05c', 'timestamp': '2026-08-05T07:55:10.201914Z', 'contexts': {'trace': {'trace_id': 'eccffcc9da584cb1aeae09f371520e16', 'span_id': 'ba4c2aadfcf577e1', 'parent_span_id': None}}, 'transaction_info': {}, 'breadcrumbs': {'values': []}, 'extra': {'sys.argv': ['/home/runner/work/sentry-python/sentry-python/.tox/py3.10-litellm-v1.89.6/lib/python3.10/site-packages/pytest/main.py', '-W', 'error::pytest.PytestUnraisableExceptionWarning', 'tests/integrations/litellm', '-o', 'junit_suite_name=py3.10-litellm-v1.89.6', '--junitxml=.junitxml-py3.10-litellm-v1.89.6']}, 'modules': {'sentry-sdk': '2.66.1', 'sniffio': '1.3.1', 'yarl': '1.24.5', 'click': '8.4.2', 'tiktoken': '0.13.0', 'pytest-asyncio': '1.4.0', 'pyyaml': '6.0.3', 'propcache': '0.5.2', 'jinja2': '3.1.6', 'anthropic': '0.120.2', 'importlib_metadata': '8.9.0', 'packaging': '26.2', 'openai': '2.50.0', 'httpx': '0.28.1', 'aiosignal': '1.4.0', 'iniconfig': '2.3.0', 'jsonschema': '4.26.0', 'pydantic': '2.13.4', 'requests': '2.34.2', 'rpds-py': '0.30.0', 'pyasn1': '0.6.4', 'annotated-types': '0.8.0', 'aiohttp': '3.14.3', 'distro': '1.9.0', 'jsonschema-specifications': '2025.9.1', 'typing_extensions': '4.16.0', 'pytest': '9.1.1', 'markupsafe': '3.0.3', 'tomli': '2.4.1', 'referencing': '0.37.0', 'tokenizers': '0.23.1', 'huggingface_hub': '1.25.1', 'coverage': '7.15.3', 'python-dotenv': '1.2.2', 'pyasn1_modules': '0.4.2', 'exceptiongroup': '1.3.1', 'h11': '0.16.0', 'frozenlist': '1.8.0', 'attrs': '26.1.0', 'fastuuid': '0.14.0', 'aiohappyeyeballs': '2.7.1', 'litellm': '1.89.6', 'cffi': '2.1.0', 'google-auth': '2.56.2', 'pluggy': '1.6.0', 'charset-normalizer': '3.4.9', 'multidict': '6.7.1', 'pygments': '2.20.0', 'async-timeout': '5.0.1', 'jiter': '0.16.0', 'zipp': '4.1.0', 'typing-inspection': '0.4.2', 'httpcore': '1.0.9', 'pytest-cov': '7.1.0', 'google-genai': '2.14.0', 'pydantic_core': '2.46.4', 'cryptography': '49.0.0', 'docstring_parser': '0.18.0', 'filelock': '3.32.0', 'websockets': '16.1.1', 'backports.asyncio.runner': '1.2.0', 'anyio': '4.14.2', 'regex': '2026.7.19', 'idna': '3.18', 'tqdm': '4.70.0', 'certifi': '2026.7.22', 'hf-xet': '1.5.2', 'urllib3': '2.7.0', 'tenacity': '9.1.4', 'pycparser': '3.0', 'fsspec': '2026.7.0'}, 'release': 'e45110358246e1fc5998514c7386fd7e246808c1', 'environment': 'production', 'server_name': 'runnervmliwqe', 'sdk': {'name': 'sentry.python.aiohttp', 'version': '2.66.1', 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.66.1'}], 'integrations': ['aiohttp', 'anthropic', 'argv', 'atexit', 'dedupe', 'excepthook', 'google_genai', 'httpx', 'huggingface_hub', 'litellm', 'logging', 'modules', 'openai', 'threading', 'unraisablehook']}, 'platform': 'python'}, {'type': 'transaction', 'transaction': 'litellm test', 'transaction_info': {'source': <TransactionSource.CUSTOM: 'custom'>}, 'contexts': {'trace': {'trace_id': 'ae716ba1446d4ded91eca025b32eecd2', 'span_id': 'ba0c1444b8ccd87c', 'parent_span_id': None, 'op': None, 'description': None, 'origin': 'manual', 'data': {'thread.id': '140003751571456', 'thread.name': 'MainThread'}}}, 'tags': {}, 'timestamp': '2026-08-05T07:55:10.205720Z', 'start_timestamp': '2026-08-05T07:55:10.160918Z', 'spans': [{'trace_id': 'ae716ba1446d4ded91eca025b32eecd2', 'span_id': '9f327a321a54d4f6', 'parent_span_id': 'ba0c1444b8ccd87c', 'same_process_as_parent': True, 'op': 'gen_ai.chat', 'description': 'chat gpt-3.5-turbo', 'start_timestamp': '2026-08-05T07:55:10.164183Z', 'timestamp': '2026-08-05T07:55:10.197840Z', 'origin': 'auto.ai.litellm', 'data': {'thread.id': '140003751571456', 'thread.name': 'MainThread', 'gen_ai.system': 'openai', 'gen_ai.operation.name': 'chat', 'gen_ai.request.messages': '[{"role": "user", "content": "Hello!"}]', 'gen_ai.request.model': 'gpt-3.5-turbo', 'gen_ai.response.streaming': True, 'gen_ai.response.model': 'gpt-3.5-turbo', 'gen_ai.response.text': '{"content": "Test response", "role": "assistant", "tool_calls": "None", "function_call": "None", "provider_specific_fields": "None"}', 'gen_ai.usage.input_tokens': 10, 'gen_ai.usage.output_tokens': 20, 'gen_ai.usage.total_tokens': 30}}, {'trace_id': 'ae716ba1446d4ded91eca025b32eecd2', 'span_id': 'a99879c648dc72f2', 'parent_span_id': '9f327a321a54d4f6', 'same_process_as_parent': True, 'op': 'gen_ai.chat', 'description': 'chat gpt-3.5-turbo', 'start_timestamp': '2026-08-05T07:55:10.164862Z', 'timestamp': '2026-08-05T07:55:10.168357Z', 'origin': 'auto.ai.openai', 'data': {'thread.id': '140003751571456', 'thread.name': 'MainThread', 'gen_ai.system': 'openai', 'gen_ai.response.streaming': True, 'gen_ai.operation.name': 'chat', 'gen_ai.request.model': 'gpt-3.5-turbo', 'gen_ai.request.messages': '[{"role": "user", "content": "Hello!"}]'}}], 'event_id': '80cddc1ad7e9443e881ef043fff47fda', 'extra': {'sys.argv': ['/home/runner/work/sentry-python/sentry-python/.tox/py3.10-litellm-v1.89.6/lib/python3.10/site-packages/pytest/main.py', '-W', 'error::pytest.PytestUnraisableExceptionWarning', 'tests/integrations/litellm', '-o', 'junit_suite_name=py3.10-litellm-v1.89.6', '--junitxml=.junitxml-py3.10-litellm-v1.89.6']}, 'release': 'e45110358246e1fc5998514c7386fd7e246808c1', 'environment': 'production', 'server_name': 'runnervmliwqe', 'sdk': {'name': 'sentry.python.aiohttp', 'version': '2.66.1', 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.66.1'}], 'integrations': ['aiohttp', 'anthropic', 'argv', 'atexit', 'dedupe', 'excepthook', 'google_genai', 'httpx', 'huggingface_hub', 'litellm', 'logging', 'modules', 'openai', 'threading', 'unraisablehook']}, 'platform': 'python', '_meta': {'spans': {'0': {'data': {'gen_ai.request.messages': {'': {'len': 2}}}}, '1': {'data': {'gen_ai.request.messages': {'': {'len': 2}}}}}}}])

Stack Trace
tests/integrations/litellm/test_litellm.py:656: in test_streaming_chat_completion
    assert len(events) == 1
E   assert 2 == 1
E    +  where 2 = len([{'level': 'error', 'exception': {'values': [{'mechanism': {'type': 'unraisablehook', 'handled': False}, 'module': None, 'type': 'RuntimeError', 'value': 'Cannot install a trace function while another trace function is being installed', 'stacktrace': {'frames': [{'filename': 'threading.py', 'abs_path': '/usr/lib/python3.10/threading.py', 'function': '_bootstrap', 'module': 'threading', 'lineno': 973, 'pre_context': ['        # indeed has already been destroyed, so that exceptions in', '        # _bootstrap_inner() during normal business hours are properly', '        # reported.  Also, we only suppress them for daemonic threads;', '        # if a non-daemonic encounters this, something else is wrong.', '        try:'], 'context_line': '            self._bootstrap_inner()', 'post_context': ['        except:', '            if self._daemonic and _sys is None:', '                return', '            raise', ''], 'vars': {'self': '<Thread(ThreadPoolExecutor-20_3, started 140000314148416)>'}}, {'filename': 'threading.py', 'abs_path': '/usr/lib/python3.10/threading.py', 'function': '_bootstrap_inner', 'module': 'threading', 'lineno': 1011, 'pre_context': ['            with _active_limbo_lock:', '                _active[self._ident] = self', '                del _limbo[self]', '', '            if _trace_hook:'], 'context_line': '                _sys.settrace(_trace_hook)', 'post_context': ['            if _profile_hook:', '                _sys.setprofile(_profile_hook)', '', '            try:', '                self.run()'], 'vars': {'self': '<Thread(ThreadPoolExecutor-20_3, started 140000314148416)>'}}]}}]}, 'event_id': '7a64db2d055a4aefb0fd235b9ffba05c', 'timestamp': '2026-08-05T07:55:10.201914Z', 'contexts': {'trace': {'trace_id': 'eccffcc9da584cb1aeae09f371520e16', 'span_id': 'ba4c2aadfcf577e1', 'parent_span_id': None}}, 'transaction_info': {}, 'breadcrumbs': {'values': []}, 'extra': {'sys.argv': ['/home/runner/work/sentry-python/sentry-python/.tox/py3.10-litellm-v1.89.6/lib/python3.10/site-packages/pytest/__main__.py', '-W', 'error::pytest.PytestUnraisableExceptionWarning', 'tests/integrations/litellm', '-o', 'junit_suite_name=py3.10-litellm-v1.89.6', '--junitxml=.junitxml-py3.10-litellm-v1.89.6']}, 'modules': {'sentry-sdk': '2.66.1', 'sniffio': '1.3.1', 'yarl': '1.24.5', 'click': '8.4.2', 'tiktoken': '0.13.0', 'pytest-asyncio': '1.4.0', 'pyyaml': '6.0.3', 'propcache': '0.5.2', 'jinja2': '3.1.6', 'anthropic': '0.120.2', 'importlib_metadata': '8.9.0', 'packaging': '26.2', 'openai': '2.50.0', 'httpx': '0.28.1', 'aiosignal': '1.4.0', 'iniconfig': '2.3.0', 'jsonschema': '4.26.0', 'pydantic': '2.13.4', 'requests': '2.34.2', 'rpds-py': '0.30.0', 'pyasn1': '0.6.4', 'annotated-types': '0.8.0', 'aiohttp': '3.14.3', 'distro': '1.9.0', 'jsonschema-specifications': '2025.9.1', 'typing_extensions': '4.16.0', 'pytest': '9.1.1', 'markupsafe': '3.0.3', 'tomli': '2.4.1', 'referencing': '0.37.0', 'tokenizers': '0.23.1', 'huggingface_hub': '1.25.1', 'coverage': '7.15.3', 'python-dotenv': '1.2.2', 'pyasn1_modules': '0.4.2', 'exceptiongroup': '1.3.1', 'h11': '0.16.0', 'frozenlist': '1.8.0', 'attrs': '26.1.0', 'fastuuid': '0.14.0', 'aiohappyeyeballs': '2.7.1', 'litellm': '1.89.6', 'cffi': '2.1.0', 'google-auth': '2.56.2', 'pluggy': '1.6.0', 'charset-normalizer': '3.4.9', 'multidict': '6.7.1', 'pygments': '2.20.0', 'async-timeout': '5.0.1', 'jiter': '0.16.0', 'zipp': '4.1.0', 'typing-inspection': '0.4.2', 'httpcore': '1.0.9', 'pytest-cov': '7.1.0', 'google-genai': '2.14.0', 'pydantic_core': '2.46.4', 'cryptography': '49.0.0', 'docstring_parser': '0.18.0', 'filelock': '3.32.0', 'websockets': '16.1.1', 'backports.asyncio.runner': '1.2.0', 'anyio': '4.14.2', 'regex': '2026.7.19', 'idna': '3.18', 'tqdm': '4.70.0', 'certifi': '2026.7.22', 'hf-xet': '1.5.2', 'urllib3': '2.7.0', 'tenacity': '9.1.4', 'pycparser': '3.0', 'fsspec': '2026.7.0'}, 'release': 'e45110358246e1fc5998514c7386fd7e246808c1', 'environment': 'production', 'server_name': 'runnervmliwqe', 'sdk': {'name': 'sentry.python.aiohttp', 'version': '2.66.1', 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.66.1'}], 'integrations': ['aiohttp', 'anthropic', 'argv', 'atexit', 'dedupe', 'excepthook', 'google_genai', 'httpx', 'huggingface_hub', 'litellm', 'logging', 'modules', 'openai', 'threading', 'unraisablehook']}, 'platform': 'python'}, {'type': 'transaction', 'transaction': 'litellm test', 'transaction_info': {'source': <TransactionSource.CUSTOM: 'custom'>}, 'contexts': {'trace': {'trace_id': 'ae716ba1446d4ded91eca025b32eecd2', 'span_id': 'ba0c1444b8ccd87c', 'parent_span_id': None, 'op': None, 'description': None, 'origin': 'manual', 'data': {'thread.id': '140003751571456', 'thread.name': 'MainThread'}}}, 'tags': {}, 'timestamp': '2026-08-05T07:55:10.205720Z', 'start_timestamp': '2026-08-05T07:55:10.160918Z', 'spans': [{'trace_id': 'ae716ba1446d4ded91eca025b32eecd2', 'span_id': '9f327a321a54d4f6', 'parent_span_id': 'ba0c1444b8ccd87c', 'same_process_as_parent': True, 'op': 'gen_ai.chat', 'description': 'chat gpt-3.5-turbo', 'start_timestamp': '2026-08-05T07:55:10.164183Z', 'timestamp': '2026-08-05T07:55:10.197840Z', 'origin': 'auto.ai.litellm', 'data': {'thread.id': '140003751571456', 'thread.name': 'MainThread', 'gen_ai.system': 'openai', 'gen_ai.operation.name': 'chat', 'gen_ai.request.messages': '[{"role": "user", "content": "Hello!"}]', 'gen_ai.request.model': 'gpt-3.5-turbo', 'gen_ai.response.streaming': True, 'gen_ai.response.model': 'gpt-3.5-turbo', 'gen_ai.response.text': '{"content": "Test response", "role": "assistant", "tool_calls": "None", "function_call": "None", "provider_specific_fields": "None"}', 'gen_ai.usage.input_tokens': 10, 'gen_ai.usage.output_tokens': 20, 'gen_ai.usage.total_tokens': 30}}, {'trace_id': 'ae716ba1446d4ded91eca025b32eecd2', 'span_id': 'a99879c648dc72f2', 'parent_span_id': '9f327a321a54d4f6', 'same_process_as_parent': True, 'op': 'gen_ai.chat', 'description': 'chat gpt-3.5-turbo', 'start_timestamp': '2026-08-05T07:55:10.164862Z', 'timestamp': '2026-08-05T07:55:10.168357Z', 'origin': 'auto.ai.openai', 'data': {'thread.id': '140003751571456', 'thread.name': 'MainThread', 'gen_ai.system': 'openai', 'gen_ai.response.streaming': True, 'gen_ai.operation.name': 'chat', 'gen_ai.request.model': 'gpt-3.5-turbo', 'gen_ai.request.messages': '[{"role": "user", "content": "Hello!"}]'}}], 'event_id': '80cddc1ad7e9443e881ef043fff47fda', 'extra': {'sys.argv': ['/home/runner/work/sentry-python/sentry-python/.tox/py3.10-litellm-v1.89.6/lib/python3.10/site-packages/pytest/__main__.py', '-W', 'error::pytest.PytestUnraisableExceptionWarning', 'tests/integrations/litellm', '-o', 'junit_suite_name=py3.10-litellm-v1.89.6', '--junitxml=.junitxml-py3.10-litellm-v1.89.6']}, 'release': 'e45110358246e1fc5998514c7386fd7e246808c1', 'environment': 'production', 'server_name': 'runnervmliwqe', 'sdk': {'name': 'sentry.python.aiohttp', 'version': '2.66.1', 'packages': [{'name': 'pypi:sentry-sdk', 'version': '2.66.1'}], 'integrations': ['aiohttp', 'anthropic', 'argv', 'atexit', 'dedupe', 'excepthook', 'google_genai', 'httpx', 'huggingface_hub', 'litellm', 'logging', 'modules', 'openai', 'threading', 'unraisablehook']}, 'platform': 'python', '_meta': {'spans': {'0': {'data': {'gen_ai.request.messages': {'': {'len': 2}}}}, '1': {'data': {'gen_ai.request.messages': {'': {'len': 2}}}}}}}])

✅ Patch coverage is 100.00%. Project has 2335 uncovered lines.
✅ Project coverage is 90.14%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.90%    90.14%    +0.24%
==========================================
  Files          193       186        -7
  Lines        24828     23693     -1135
  Branches      8930      8526      -404
==========================================
+ Hits         22322     21358      -964
- Misses        2506      2335      -171
- Partials      1416      1364       -52

Generated by Codecov Action

Base automatically changed from ivana/major/drop-3.6 to major/3.0 August 4, 2026 08:21
@sentrivana
sentrivana marked this pull request as ready for review August 5, 2026 08:01
@sentrivana
sentrivana requested a review from a team as a code owner August 5, 2026 08:01
@sentrivana
sentrivana merged commit 8e128aa into major/3.0 Aug 5, 2026
128 of 130 checks passed
@sentrivana
sentrivana deleted the ivana/major/drop-support-aiohttp branch August 5, 2026 08:06
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