From f6ec1984747a9e59a26dc899cd27330631f54dcf Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 29 Sep 2025 16:35:31 +0200 Subject: [PATCH 01/12] Run test suite on huggingface_hub rc1 --- scripts/populate_tox/config.py | 1 - scripts/populate_tox/releases.jsonl | 7 ++++--- tox.ini | 14 ++++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/populate_tox/config.py b/scripts/populate_tox/config.py index 34ae680fad..4a930939b3 100644 --- a/scripts/populate_tox/config.py +++ b/scripts/populate_tox/config.py @@ -185,7 +185,6 @@ "deps": { "*": ["responses"], }, - "include": "<1.0", }, "langchain-base": { "package": "langchain", diff --git a/scripts/populate_tox/releases.jsonl b/scripts/populate_tox/releases.jsonl index 3532b61c75..a18b6eec01 100644 --- a/scripts/populate_tox/releases.jsonl +++ b/scripts/populate_tox/releases.jsonl @@ -93,12 +93,13 @@ {"info": {"classifiers": ["Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Scientific/Engineering :: Artificial Intelligence"], "name": "huggingface-hub", "requires_python": ">=3.8.0", "version": "0.24.7", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Scientific/Engineering :: Artificial Intelligence"], "name": "huggingface-hub", "requires_python": ">=3.8.0", "version": "0.28.1", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Scientific/Engineering :: Artificial Intelligence"], "name": "huggingface-hub", "requires_python": ">=3.8.0", "version": "0.32.6", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Scientific/Engineering :: Artificial Intelligence"], "name": "huggingface-hub", "requires_python": ">=3.8.0", "version": "0.35.1", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Scientific/Engineering :: Artificial Intelligence"], "name": "huggingface-hub", "requires_python": ">=3.8.0", "version": "0.35.3", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Scientific/Engineering :: Artificial Intelligence"], "name": "huggingface-hub", "requires_python": ">=3.9.0", "version": "1.0.0rc2", "yanked": false}} {"info": {"classifiers": ["License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.9"], "name": "langchain", "requires_python": "<4.0,>=3.8.1", "version": "0.1.20", "yanked": false}} {"info": {"classifiers": ["License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.9"], "name": "langchain", "requires_python": "<4.0,>=3.8.1", "version": "0.2.17", "yanked": false}} {"info": {"classifiers": [], "name": "langchain", "requires_python": "<4.0,>=3.9", "version": "0.3.27", "yanked": false}} -{"info": {"classifiers": [], "name": "langgraph", "requires_python": ">=3.9", "version": "0.6.7", "yanked": false}} -{"info": {"classifiers": [], "name": "langgraph", "requires_python": ">=3.10", "version": "1.0.0a3", "yanked": false}} +{"info": {"classifiers": [], "name": "langgraph", "requires_python": ">=3.9", "version": "0.6.8", "yanked": false}} +{"info": {"classifiers": [], "name": "langgraph", "requires_python": ">=3.10", "version": "1.0.0a4", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Software Development", "Topic :: Software Development :: Libraries"], "name": "launchdarkly-server-sdk", "requires_python": ">=3.9", "version": "9.12.0", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development", "Topic :: Software Development :: Libraries"], "name": "launchdarkly-server-sdk", "requires_python": ">=3.8", "version": "9.8.1", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: AsyncIO", "Framework :: Pydantic", "Framework :: Pydantic :: 1", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "litestar", "requires_python": ">=3.8,<4.0", "version": "2.0.1", "yanked": false}} diff --git a/tox.ini b/tox.ini index 2354c66c7c..7ed23d7a45 100644 --- a/tox.ini +++ b/tox.ini @@ -73,8 +73,8 @@ envlist = {py3.8,py3.11,py3.12}-openai-notiktoken-v1.73.0 {py3.8,py3.12,py3.13}-openai-notiktoken-v1.109.1 - {py3.9,py3.12,py3.13}-langgraph-v0.6.7 - {py3.10,py3.12,py3.13}-langgraph-v1.0.0a3 + {py3.9,py3.12,py3.13}-langgraph-v0.6.8 + {py3.10,py3.12,py3.13}-langgraph-v1.0.0a4 {py3.10,py3.11,py3.12}-openai_agents-v0.0.19 {py3.10,py3.12,py3.13}-openai_agents-v0.1.0 @@ -84,7 +84,8 @@ envlist = {py3.8,py3.10,py3.11}-huggingface_hub-v0.24.7 {py3.8,py3.12,py3.13}-huggingface_hub-v0.28.1 {py3.8,py3.12,py3.13}-huggingface_hub-v0.32.6 - {py3.8,py3.12,py3.13}-huggingface_hub-v0.35.1 + {py3.8,py3.12,py3.13}-huggingface_hub-v0.35.3 + {py3.9,py3.12,py3.13}-huggingface_hub-v1.0.0rc2 # ~~~ Cloud ~~~ @@ -376,8 +377,8 @@ deps = openai-notiktoken-v1.0.1: httpx<0.28 openai-notiktoken-v1.37.2: httpx<0.28 - langgraph-v0.6.7: langgraph==0.6.7 - langgraph-v1.0.0a3: langgraph==1.0.0a3 + langgraph-v0.6.8: langgraph==0.6.8 + langgraph-v1.0.0a4: langgraph==1.0.0a4 openai_agents-v0.0.19: openai-agents==0.0.19 openai_agents-v0.1.0: openai-agents==0.1.0 @@ -388,7 +389,8 @@ deps = huggingface_hub-v0.24.7: huggingface_hub==0.24.7 huggingface_hub-v0.28.1: huggingface_hub==0.28.1 huggingface_hub-v0.32.6: huggingface_hub==0.32.6 - huggingface_hub-v0.35.1: huggingface_hub==0.35.1 + huggingface_hub-v0.35.3: huggingface_hub==0.35.3 + huggingface_hub-v1.0.0rc2: huggingface_hub==1.0.0rc2 huggingface_hub: responses From 8a8bc5e9943eb11632f456aa058accd8d3fd6a6f Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Thu, 2 Oct 2025 16:00:44 +0200 Subject: [PATCH 02/12] ai wip we need an httpx mock version of all tests --- scripts/populate_tox/config.py | 1 + .../huggingface_hub/test_huggingface_hub.py | 109 ++++++++++++++++++ tox.ini | 1 + 3 files changed, 111 insertions(+) diff --git a/scripts/populate_tox/config.py b/scripts/populate_tox/config.py index 4a930939b3..793ee19215 100644 --- a/scripts/populate_tox/config.py +++ b/scripts/populate_tox/config.py @@ -184,6 +184,7 @@ "package": "huggingface_hub", "deps": { "*": ["responses"], + ">=1.0": ["pytest-httpx"], }, }, "langchain-base": { diff --git a/tests/integrations/huggingface_hub/test_huggingface_hub.py b/tests/integrations/huggingface_hub/test_huggingface_hub.py index 5aa3928a67..9df9f49bed 100644 --- a/tests/integrations/huggingface_hub/test_huggingface_hub.py +++ b/tests/integrations/huggingface_hub/test_huggingface_hub.py @@ -1,6 +1,8 @@ from unittest import mock import pytest +import re import responses +import httpx from huggingface_hub import InferenceClient @@ -76,6 +78,56 @@ def mock_hf_text_generation_api(): yield rsps +@pytest.fixture +def mock_hf_text_generation_api_httpx(httpx_mock): + # type: (Any) -> Any + """Mock HuggingFace text generation API for httpx""" + model_name = "test-model" + + # Mock model info endpoint (with query parameters) - allow multiple calls + # Using pattern matching to handle query parameters + model_url_pattern = re.compile( + re.escape(MODEL_ENDPOINT.format(model_name=model_name)) + r"(\?.*)?$" + ) + + # Add exactly the number of responses we expect (2 calls observed from debug output) + for _ in range(2): # Allow exactly 2 calls to the model info endpoint + httpx_mock.add_response( + method="GET", + url=model_url_pattern, + json={ + "id": model_name, + "pipeline_tag": "text-generation", + "inferenceProviderMapping": { + "hf-inference": { + "status": "live", + "providerId": model_name, + "task": "text-generation", + } + }, + }, + status_code=200, + ) + + # Mock text generation endpoint + httpx_mock.add_response( + method="POST", + url=INFERENCE_ENDPOINT.format(model_name=model_name), + json={ + "generated_text": "[mocked] Hello! How can i help you?", + "details": { + "finish_reason": "length", + "generated_tokens": 10, + "prefill": [], + "tokens": [], + }, + }, + status_code=200, + ) + + return httpx_mock + + @pytest.fixture def mock_hf_api_with_errors(): # type: () -> Any @@ -431,6 +483,63 @@ def test_text_generation( assert "gen_ai.response.model" not in span["data"] +@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) +def test_text_generation_TODO( + sentry_init, + capture_events, + mock_hf_text_generation_api_httpx, +): + # type: (Any, Any, Any) -> None + sentry_init( + traces_sample_rate=1.0, + send_default_pii=True, + integrations=[HuggingfaceHubIntegration(include_prompts=True)], + ) + events = capture_events() + + client = InferenceClient(model="test-model") + + with sentry_sdk.start_transaction(name="test"): + client.text_generation( + "Hello", + stream=False, + details=True, + ) + + (transaction,) = events + + # Find the huggingface_hub span (there might be httpx spans too) + hf_spans = [ + span for span in transaction["spans"] if span["op"] == "gen_ai.generate_text" + ] + assert len(hf_spans) == 1, ( + f"Expected 1 huggingface span, got {len(hf_spans)}: {[s['op'] for s in transaction['spans']]}" + ) + span = hf_spans[0] + + assert span["op"] == "gen_ai.generate_text" + assert span["description"] == "generate_text test-model" + assert span["origin"] == "auto.ai.huggingface_hub" + + expected_data = { + "gen_ai.operation.name": "generate_text", + "gen_ai.request.model": "test-model", + "gen_ai.response.finish_reasons": "length", + "gen_ai.response.streaming": False, + "gen_ai.usage.total_tokens": 10, + "thread.id": mock.ANY, + "thread.name": mock.ANY, + } + + expected_data["gen_ai.request.messages"] = "Hello" + expected_data["gen_ai.response.text"] = "[mocked] Hello! How can i help you?" + + assert span["data"] == expected_data + + # text generation does not set the response model + assert "gen_ai.response.model" not in span["data"] + + @pytest.mark.parametrize("send_default_pii", [True, False]) @pytest.mark.parametrize("include_prompts", [True, False]) def test_text_generation_streaming( diff --git a/tox.ini b/tox.ini index 7ed23d7a45..95960ff23e 100644 --- a/tox.ini +++ b/tox.ini @@ -391,6 +391,7 @@ deps = huggingface_hub-v0.32.6: huggingface_hub==0.32.6 huggingface_hub-v0.35.3: huggingface_hub==0.35.3 huggingface_hub-v1.0.0rc2: huggingface_hub==1.0.0rc2 + huggingface_hub-v1.0.0rc2: pytest-httpx huggingface_hub: responses From ea97f566625cd901784a0a75bb0d94fe9d166982 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Thu, 2 Oct 2025 17:20:05 +0200 Subject: [PATCH 03/12] fix up test_text_generation --- .../huggingface_hub/test_huggingface_hub.py | 219 ++++++------------ 1 file changed, 77 insertions(+), 142 deletions(-) diff --git a/tests/integrations/huggingface_hub/test_huggingface_hub.py b/tests/integrations/huggingface_hub/test_huggingface_hub.py index 9df9f49bed..c8625420c1 100644 --- a/tests/integrations/huggingface_hub/test_huggingface_hub.py +++ b/tests/integrations/huggingface_hub/test_huggingface_hub.py @@ -35,97 +35,78 @@ @pytest.fixture -def mock_hf_text_generation_api(): +def mock_hf_text_generation_api(httpx_mock): # type: () -> Any """Mock HuggingFace text generation API""" - with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: - model_name = "test-model" + model_name = "test-model" + + model_endpoint_response = { + "id": model_name, + "pipeline_tag": "text-generation", + "inferenceProviderMapping": { + "hf-inference": { + "status": "live", + "providerId": model_name, + "task": "text-generation", + } + }, + } + inference_endpoint_response = { + "generated_text": "[mocked] Hello! How can i help you?", + "details": { + "finish_reason": "length", + "generated_tokens": 10, + "prefill": [], + "tokens": [], + }, + } + if HF_VERSION >= (1, 0, 0): # Mock model info endpoint - rsps.add( - responses.GET, - MODEL_ENDPOINT.format(model_name=model_name), - json={ - "id": model_name, - "pipeline_tag": "text-generation", - "inferenceProviderMapping": { - "hf-inference": { - "status": "live", - "providerId": model_name, - "task": "text-generation", - } - }, - }, - status=200, + httpx_mock.add_response( + method="GET", + url=re.compile( + MODEL_ENDPOINT.format(model_name=model_name) + + r"(\?expand=inferenceProviderMapping)?" + ), + json=model_endpoint_response, + status_code=200, + is_optional=True, + is_reusable=True, ) # Mock text generation endpoint - rsps.add( - responses.POST, - INFERENCE_ENDPOINT.format(model_name=model_name), - json={ - "generated_text": "[mocked] Hello! How can i help you?", - "details": { - "finish_reason": "length", - "generated_tokens": 10, - "prefill": [], - "tokens": [], - }, - }, - status=200, - ) - - yield rsps - - -@pytest.fixture -def mock_hf_text_generation_api_httpx(httpx_mock): - # type: (Any) -> Any - """Mock HuggingFace text generation API for httpx""" - model_name = "test-model" - - # Mock model info endpoint (with query parameters) - allow multiple calls - # Using pattern matching to handle query parameters - model_url_pattern = re.compile( - re.escape(MODEL_ENDPOINT.format(model_name=model_name)) + r"(\?.*)?$" - ) - - # Add exactly the number of responses we expect (2 calls observed from debug output) - for _ in range(2): # Allow exactly 2 calls to the model info endpoint httpx_mock.add_response( - method="GET", - url=model_url_pattern, - json={ - "id": model_name, - "pipeline_tag": "text-generation", - "inferenceProviderMapping": { - "hf-inference": { - "status": "live", - "providerId": model_name, - "task": "text-generation", - } - }, - }, + method="POST", + url=INFERENCE_ENDPOINT.format(model_name=model_name), + json=inference_endpoint_response, status_code=200, + is_optional=True, + is_reusable=True, ) - # Mock text generation endpoint - httpx_mock.add_response( - method="POST", - url=INFERENCE_ENDPOINT.format(model_name=model_name), - json={ - "generated_text": "[mocked] Hello! How can i help you?", - "details": { - "finish_reason": "length", - "generated_tokens": 10, - "prefill": [], - "tokens": [], - }, - }, - status_code=200, - ) + yield httpx_mock - return httpx_mock + else: + # Older version of huggingface_hub, we need to mock requests + with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: + # Mock model info endpoint + rsps.add( + responses.GET, + MODEL_ENDPOINT.format(model_name=model_name), + json=model_endpoint_response, + status=200, + ) + + # Mock text generation endpoint + rsps.add( + responses.POST, + INFERENCE_ENDPOINT.format(model_name=model_name), + json=inference_endpoint_response, + status=200, + ) + + yield rsps @pytest.fixture @@ -426,6 +407,7 @@ def mock_hf_chat_completion_api_streaming_tools(): yield rsps +@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) @pytest.mark.parametrize("send_default_pii", [True, False]) @pytest.mark.parametrize("include_prompts", [True, False]) def test_text_generation( @@ -453,11 +435,21 @@ def test_text_generation( ) (transaction,) = events - (span,) = transaction["spans"] - assert span["op"] == "gen_ai.generate_text" - assert span["description"] == "generate_text test-model" - assert span["origin"] == "auto.ai.huggingface_hub" + gen_ai_span = None + for span in transaction["spans"]: + if span["op"] == "gen_ai.generate_text": + gen_ai_span = span + else: + # there should be no other spans, just the gen_ai.generate_text span + # and optionally some http.client spans from talking to the hf api + assert span["op"] == "http.client" + + assert gen_ai_span is not None + + assert gen_ai_span["op"] == "gen_ai.generate_text" + assert gen_ai_span["description"] == "generate_text test-model" + assert gen_ai_span["origin"] == "auto.ai.huggingface_hub" expected_data = { "gen_ai.operation.name": "generate_text", @@ -477,67 +469,10 @@ def test_text_generation( assert "gen_ai.request.messages" not in expected_data assert "gen_ai.response.text" not in expected_data - assert span["data"] == expected_data - - # text generation does not set the response model - assert "gen_ai.response.model" not in span["data"] - - -@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) -def test_text_generation_TODO( - sentry_init, - capture_events, - mock_hf_text_generation_api_httpx, -): - # type: (Any, Any, Any) -> None - sentry_init( - traces_sample_rate=1.0, - send_default_pii=True, - integrations=[HuggingfaceHubIntegration(include_prompts=True)], - ) - events = capture_events() - - client = InferenceClient(model="test-model") - - with sentry_sdk.start_transaction(name="test"): - client.text_generation( - "Hello", - stream=False, - details=True, - ) - - (transaction,) = events - - # Find the huggingface_hub span (there might be httpx spans too) - hf_spans = [ - span for span in transaction["spans"] if span["op"] == "gen_ai.generate_text" - ] - assert len(hf_spans) == 1, ( - f"Expected 1 huggingface span, got {len(hf_spans)}: {[s['op'] for s in transaction['spans']]}" - ) - span = hf_spans[0] - - assert span["op"] == "gen_ai.generate_text" - assert span["description"] == "generate_text test-model" - assert span["origin"] == "auto.ai.huggingface_hub" - - expected_data = { - "gen_ai.operation.name": "generate_text", - "gen_ai.request.model": "test-model", - "gen_ai.response.finish_reasons": "length", - "gen_ai.response.streaming": False, - "gen_ai.usage.total_tokens": 10, - "thread.id": mock.ANY, - "thread.name": mock.ANY, - } - - expected_data["gen_ai.request.messages"] = "Hello" - expected_data["gen_ai.response.text"] = "[mocked] Hello! How can i help you?" - - assert span["data"] == expected_data + assert gen_ai_span["data"] == expected_data # text generation does not set the response model - assert "gen_ai.response.model" not in span["data"] + assert "gen_ai.response.model" not in gen_ai_span["data"] @pytest.mark.parametrize("send_default_pii", [True, False]) From 046a3ae2c2f5c1dbe08a7102609fe061875cc46e Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Thu, 2 Oct 2025 17:44:24 +0200 Subject: [PATCH 04/12] . --- scripts/populate_tox/config.py | 7 ++- scripts/populate_tox/releases.jsonl | 23 +++++----- tox.ini | 69 ++++++++++++++--------------- 3 files changed, 49 insertions(+), 50 deletions(-) diff --git a/scripts/populate_tox/config.py b/scripts/populate_tox/config.py index 793ee19215..5465676ffc 100644 --- a/scripts/populate_tox/config.py +++ b/scripts/populate_tox/config.py @@ -183,8 +183,11 @@ "huggingface_hub": { "package": "huggingface_hub", "deps": { - "*": ["responses"], - ">=1.0": ["pytest-httpx"], + "<1.0.0": ["responses"], + # the following is a hack because for whatever reason, if we set this + # to the actual value (>=1.0.0), according to Python's packaging + # '1.0.0rc2' is NOT in SpecifierSet('>=1.0.0', prereleases=True) + ">=0.9999": ["pytest-httpx"], }, }, "langchain-base": { diff --git a/scripts/populate_tox/releases.jsonl b/scripts/populate_tox/releases.jsonl index a18b6eec01..eb4d1055f4 100644 --- a/scripts/populate_tox/releases.jsonl +++ b/scripts/populate_tox/releases.jsonl @@ -5,8 +5,8 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "Django", "requires_python": ">=3.5", "version": "2.2.28", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "Django", "requires_python": ">=3.6", "version": "3.1.14", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "Django", "requires_python": ">=3.6", "version": "3.2.25", "yanked": false}} -{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "Django", "requires_python": ">=3.8", "version": "4.2.24", "yanked": false}} -{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "Django", "requires_python": ">=3.10", "version": "5.2.6", "yanked": false}} +{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "Django", "requires_python": ">=3.8", "version": "4.2.25", "yanked": false}} +{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "Django", "requires_python": ">=3.10", "version": "5.2.7", "yanked": false}} {"info": {"classifiers": ["Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "Django", "requires_python": ">=3.12", "version": "6.0a1", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Flask", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "Flask", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "version": "1.1.4", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Flask", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "Flask", "requires_python": ">=3.8", "version": "2.3.3", "yanked": false}} @@ -24,9 +24,9 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Framework :: AsyncIO", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP"], "name": "aiohttp", "requires_python": ">=3.5.3", "version": "3.4.4", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Framework :: AsyncIO", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP"], "name": "aiohttp", "requires_python": ">=3.6", "version": "3.7.4", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "anthropic", "requires_python": ">=3.7", "version": "0.16.0", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "anthropic", "requires_python": ">=3.7", "version": "0.33.1", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "anthropic", "requires_python": ">=3.8", "version": "0.50.0", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "anthropic", "requires_python": ">=3.8", "version": "0.68.1", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "anthropic", "requires_python": ">=3.7", "version": "0.34.2", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "anthropic", "requires_python": ">=3.8", "version": "0.52.2", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "anthropic", "requires_python": ">=3.8", "version": "0.69.0", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: End Users/Desktop", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "apache-beam", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "version": "2.12.0", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: End Users/Desktop", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "apache-beam", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "version": "2.13.0", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: End Users/Desktop", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "apache-beam", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", "version": "2.14.0", "yanked": false}} @@ -46,7 +46,7 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7"], "name": "boto3", "requires_python": "", "version": "1.12.49", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">= 3.6", "version": "1.20.54", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">= 3.7", "version": "1.28.85", "yanked": false}} -{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">=3.9", "version": "1.40.40", "yanked": false}} +{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">=3.9", "version": "1.40.43", "yanked": false}} {"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Internet :: WWW/HTTP :: WSGI :: Server", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "bottle", "requires_python": "", "version": "0.12.25", "yanked": false}} {"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Internet :: WWW/HTTP :: WSGI :: Server", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "bottle", "requires_python": null, "version": "0.13.4", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Object Brokering", "Topic :: System :: Distributed Computing"], "name": "celery", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "version": "4.4.7", "yanked": false}} @@ -100,7 +100,7 @@ {"info": {"classifiers": [], "name": "langchain", "requires_python": "<4.0,>=3.9", "version": "0.3.27", "yanked": false}} {"info": {"classifiers": [], "name": "langgraph", "requires_python": ">=3.9", "version": "0.6.8", "yanked": false}} {"info": {"classifiers": [], "name": "langgraph", "requires_python": ">=3.10", "version": "1.0.0a4", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Software Development", "Topic :: Software Development :: Libraries"], "name": "launchdarkly-server-sdk", "requires_python": ">=3.9", "version": "9.12.0", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.9", "Topic :: Software Development", "Topic :: Software Development :: Libraries"], "name": "launchdarkly-server-sdk", "requires_python": ">=3.9", "version": "9.12.1", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development", "Topic :: Software Development :: Libraries"], "name": "launchdarkly-server-sdk", "requires_python": ">=3.8", "version": "9.8.1", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: AsyncIO", "Framework :: Pydantic", "Framework :: Pydantic :: 1", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "litestar", "requires_python": ">=3.8,<4.0", "version": "2.0.1", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "litestar", "requires_python": "<4.0,>=3.8", "version": "2.12.1", "yanked": false}} @@ -109,12 +109,11 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: System :: Logging"], "name": "loguru", "requires_python": "<4.0,>=3.5", "version": "0.7.3", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.7.1", "version": "1.0.1", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "1.109.1", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.7.1", "version": "1.37.2", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "1.73.0", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "2.0.1", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai-agents", "requires_python": ">=3.9", "version": "0.0.19", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai-agents", "requires_python": ">=3.9", "version": "0.1.0", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai-agents", "requires_python": ">=3.9", "version": "0.2.11", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai-agents", "requires_python": ">=3.9", "version": "0.3.2", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai-agents", "requires_python": ">=3.9", "version": "0.3.3", "yanked": false}} {"info": {"classifiers": ["License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3"], "name": "openfeature-sdk", "requires_python": ">=3.8", "version": "0.7.5", "yanked": false}} {"info": {"classifiers": ["License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3"], "name": "openfeature-sdk", "requires_python": ">=3.9", "version": "0.8.3", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8"], "name": "pure-eval", "requires_python": "", "version": "0.0.3", "yanked": false}} @@ -127,7 +126,7 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database"], "name": "pymongo", "requires_python": "", "version": "3.5.1", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database"], "name": "pymongo", "requires_python": "", "version": "3.6.1", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database"], "name": "pymongo", "requires_python": ">=3.6", "version": "4.0.2", "yanked": false}} -{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database", "Typing :: Typed"], "name": "pymongo", "requires_python": ">=3.9", "version": "4.15.1", "yanked": false}} +{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database", "Typing :: Typed"], "name": "pymongo", "requires_python": ">=3.9", "version": "4.15.2", "yanked": false}} {"info": {"classifiers": ["Framework :: Pylons", "Intended Audience :: Developers", "License :: Repoze Public License", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI"], "name": "pyramid", "requires_python": null, "version": "1.0.2", "yanked": false}} {"info": {"classifiers": ["Development Status :: 6 - Mature", "Framework :: Pyramid", "Intended Audience :: Developers", "License :: Repoze Public License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI"], "name": "pyramid", "requires_python": ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "version": "1.10.8", "yanked": false}} {"info": {"classifiers": ["Development Status :: 6 - Mature", "Framework :: Pyramid", "Intended Audience :: Developers", "License :: Repoze Public License", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI"], "name": "pyramid", "requires_python": "", "version": "1.6.5", "yanked": false}} @@ -188,7 +187,7 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Typing :: Typed"], "name": "starlite", "requires_python": ">=3.8,<4.0", "version": "1.48.1", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Typing :: Typed"], "name": "starlite", "requires_python": "<4.0,>=3.8", "version": "1.51.16", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries"], "name": "statsig", "requires_python": ">=3.7", "version": "0.55.3", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries"], "name": "statsig", "requires_python": ">=3.7", "version": "0.64.0", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries"], "name": "statsig", "requires_python": ">=3.7", "version": "0.65.0", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "strawberry-graphql", "requires_python": ">=3.8,<4.0", "version": "0.209.8", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "strawberry-graphql", "requires_python": "<4.0,>=3.9", "version": "0.282.0", "yanked": false}} {"info": {"classifiers": ["License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy"], "name": "tornado", "requires_python": ">= 3.5", "version": "6.0.4", "yanked": false}} diff --git a/tox.ini b/tox.ini index 95960ff23e..9d6e246673 100644 --- a/tox.ini +++ b/tox.ini @@ -46,9 +46,9 @@ envlist = # ~~~ AI ~~~ {py3.8,py3.11,py3.12}-anthropic-v0.16.0 - {py3.8,py3.11,py3.12}-anthropic-v0.33.1 - {py3.8,py3.11,py3.12}-anthropic-v0.50.0 - {py3.8,py3.12,py3.13}-anthropic-v0.68.1 + {py3.8,py3.11,py3.12}-anthropic-v0.34.2 + {py3.8,py3.11,py3.12}-anthropic-v0.52.2 + {py3.8,py3.12,py3.13}-anthropic-v0.69.0 {py3.9,py3.10,py3.11}-cohere-v5.4.0 {py3.9,py3.11,py3.12}-cohere-v5.9.4 @@ -64,14 +64,12 @@ envlist = {py3.9,py3.12,py3.13}-langchain-notiktoken-v0.3.27 {py3.8,py3.11,py3.12}-openai-base-v1.0.1 - {py3.8,py3.11,py3.12}-openai-base-v1.37.2 - {py3.8,py3.11,py3.12}-openai-base-v1.73.0 {py3.8,py3.12,py3.13}-openai-base-v1.109.1 + {py3.8,py3.12,py3.13}-openai-base-v2.0.1 {py3.8,py3.11,py3.12}-openai-notiktoken-v1.0.1 - {py3.8,py3.11,py3.12}-openai-notiktoken-v1.37.2 - {py3.8,py3.11,py3.12}-openai-notiktoken-v1.73.0 {py3.8,py3.12,py3.13}-openai-notiktoken-v1.109.1 + {py3.8,py3.12,py3.13}-openai-notiktoken-v2.0.1 {py3.9,py3.12,py3.13}-langgraph-v0.6.8 {py3.10,py3.12,py3.13}-langgraph-v1.0.0a4 @@ -79,7 +77,7 @@ envlist = {py3.10,py3.11,py3.12}-openai_agents-v0.0.19 {py3.10,py3.12,py3.13}-openai_agents-v0.1.0 {py3.10,py3.12,py3.13}-openai_agents-v0.2.11 - {py3.10,py3.12,py3.13}-openai_agents-v0.3.2 + {py3.10,py3.12,py3.13}-openai_agents-v0.3.3 {py3.8,py3.10,py3.11}-huggingface_hub-v0.24.7 {py3.8,py3.12,py3.13}-huggingface_hub-v0.28.1 @@ -92,7 +90,7 @@ envlist = {py3.6,py3.7}-boto3-v1.12.49 {py3.6,py3.9,py3.10}-boto3-v1.20.54 {py3.7,py3.11,py3.12}-boto3-v1.28.85 - {py3.9,py3.12,py3.13}-boto3-v1.40.40 + {py3.9,py3.12,py3.13}-boto3-v1.40.43 {py3.6,py3.7,py3.8}-chalice-v1.16.0 {py3.9,py3.12,py3.13}-chalice-v1.32.0 @@ -108,7 +106,7 @@ envlist = {py3.6}-pymongo-v3.5.1 {py3.6,py3.10,py3.11}-pymongo-v3.13.0 - {py3.9,py3.12,py3.13}-pymongo-v4.15.1 + {py3.9,py3.12,py3.13}-pymongo-v4.15.2 {py3.6}-redis-v2.10.6 {py3.6,py3.7,py3.8}-redis-v3.5.3 @@ -127,13 +125,13 @@ envlist = # ~~~ Flags ~~~ {py3.8,py3.12,py3.13}-launchdarkly-v9.8.1 - {py3.9,py3.12,py3.13}-launchdarkly-v9.12.0 + {py3.9,py3.12,py3.13}-launchdarkly-v9.12.1 {py3.8,py3.12,py3.13}-openfeature-v0.7.5 {py3.9,py3.12,py3.13}-openfeature-v0.8.3 {py3.7,py3.12,py3.13}-statsig-v0.55.3 - {py3.7,py3.12,py3.13}-statsig-v0.64.0 + {py3.7,py3.12,py3.13}-statsig-v0.65.0 {py3.8,py3.12,py3.13}-unleash-v6.0.1 {py3.8,py3.12,py3.13}-unleash-v6.3.0 @@ -203,8 +201,8 @@ envlist = {py3.6,py3.7}-django-v1.11.29 {py3.6,py3.8,py3.9}-django-v2.2.28 {py3.6,py3.9,py3.10}-django-v3.2.25 - {py3.8,py3.11,py3.12}-django-v4.2.24 - {py3.10,py3.12,py3.13}-django-v5.2.6 + {py3.8,py3.11,py3.12}-django-v4.2.25 + {py3.10,py3.12,py3.13}-django-v5.2.7 {py3.12,py3.13}-django-v6.0a1 {py3.6,py3.7,py3.8}-flask-v1.1.4 @@ -333,12 +331,12 @@ deps = # ~~~ AI ~~~ anthropic-v0.16.0: anthropic==0.16.0 - anthropic-v0.33.1: anthropic==0.33.1 - anthropic-v0.50.0: anthropic==0.50.0 - anthropic-v0.68.1: anthropic==0.68.1 + anthropic-v0.34.2: anthropic==0.34.2 + anthropic-v0.52.2: anthropic==0.52.2 + anthropic-v0.69.0: anthropic==0.69.0 anthropic: pytest-asyncio anthropic-v0.16.0: httpx<0.28.0 - anthropic-v0.33.1: httpx<0.28.0 + anthropic-v0.34.2: httpx<0.28.0 cohere-v5.4.0: cohere==5.4.0 cohere-v5.9.4: cohere==5.9.4 @@ -361,21 +359,17 @@ deps = langchain-notiktoken-v0.3.27: langchain-community openai-base-v1.0.1: openai==1.0.1 - openai-base-v1.37.2: openai==1.37.2 - openai-base-v1.73.0: openai==1.73.0 openai-base-v1.109.1: openai==1.109.1 + openai-base-v2.0.1: openai==2.0.1 openai-base: pytest-asyncio openai-base: tiktoken openai-base-v1.0.1: httpx<0.28 - openai-base-v1.37.2: httpx<0.28 openai-notiktoken-v1.0.1: openai==1.0.1 - openai-notiktoken-v1.37.2: openai==1.37.2 - openai-notiktoken-v1.73.0: openai==1.73.0 openai-notiktoken-v1.109.1: openai==1.109.1 + openai-notiktoken-v2.0.1: openai==2.0.1 openai-notiktoken: pytest-asyncio openai-notiktoken-v1.0.1: httpx<0.28 - openai-notiktoken-v1.37.2: httpx<0.28 langgraph-v0.6.8: langgraph==0.6.8 langgraph-v1.0.0a4: langgraph==1.0.0a4 @@ -383,7 +377,7 @@ deps = openai_agents-v0.0.19: openai-agents==0.0.19 openai_agents-v0.1.0: openai-agents==0.1.0 openai_agents-v0.2.11: openai-agents==0.2.11 - openai_agents-v0.3.2: openai-agents==0.3.2 + openai_agents-v0.3.3: openai-agents==0.3.3 openai_agents: pytest-asyncio huggingface_hub-v0.24.7: huggingface_hub==0.24.7 @@ -391,15 +385,18 @@ deps = huggingface_hub-v0.32.6: huggingface_hub==0.32.6 huggingface_hub-v0.35.3: huggingface_hub==0.35.3 huggingface_hub-v1.0.0rc2: huggingface_hub==1.0.0rc2 + huggingface_hub-v0.24.7: responses + huggingface_hub-v0.28.1: responses + huggingface_hub-v0.32.6: responses + huggingface_hub-v0.35.3: responses huggingface_hub-v1.0.0rc2: pytest-httpx - huggingface_hub: responses # ~~~ Cloud ~~~ boto3-v1.12.49: boto3==1.12.49 boto3-v1.20.54: boto3==1.20.54 boto3-v1.28.85: boto3==1.28.85 - boto3-v1.40.40: boto3==1.40.40 + boto3-v1.40.43: boto3==1.40.43 {py3.7,py3.8}-boto3: urllib3<2.0.0 chalice-v1.16.0: chalice==1.16.0 @@ -418,7 +415,7 @@ deps = pymongo-v3.5.1: pymongo==3.5.1 pymongo-v3.13.0: pymongo==3.13.0 - pymongo-v4.15.1: pymongo==4.15.1 + pymongo-v4.15.2: pymongo==4.15.2 pymongo: mockupdb redis-v2.10.6: redis==2.10.6 @@ -443,13 +440,13 @@ deps = # ~~~ Flags ~~~ launchdarkly-v9.8.1: launchdarkly-server-sdk==9.8.1 - launchdarkly-v9.12.0: launchdarkly-server-sdk==9.12.0 + launchdarkly-v9.12.1: launchdarkly-server-sdk==9.12.1 openfeature-v0.7.5: openfeature-sdk==0.7.5 openfeature-v0.8.3: openfeature-sdk==0.8.3 statsig-v0.55.3: statsig==0.55.3 - statsig-v0.64.0: statsig==0.64.0 + statsig-v0.65.0: statsig==0.65.0 statsig: typing_extensions unleash-v6.0.1: UnleashClient==6.0.1 @@ -551,8 +548,8 @@ deps = django-v1.11.29: django==1.11.29 django-v2.2.28: django==2.2.28 django-v3.2.25: django==3.2.25 - django-v4.2.24: django==4.2.24 - django-v5.2.6: django==5.2.6 + django-v4.2.25: django==4.2.25 + django-v5.2.7: django==5.2.7 django-v6.0a1: django==6.0a1 django: psycopg2-binary django: djangorestframework @@ -560,13 +557,13 @@ deps = django: Werkzeug django-v2.2.28: channels[daphne] django-v3.2.25: channels[daphne] - django-v4.2.24: channels[daphne] - django-v5.2.6: channels[daphne] + django-v4.2.25: channels[daphne] + django-v5.2.7: channels[daphne] django-v6.0a1: channels[daphne] django-v2.2.28: six django-v3.2.25: pytest-asyncio - django-v4.2.24: pytest-asyncio - django-v5.2.6: pytest-asyncio + django-v4.2.25: pytest-asyncio + django-v5.2.7: pytest-asyncio django-v6.0a1: pytest-asyncio django-v1.11.29: djangorestframework>=3.0,<4.0 django-v1.11.29: Werkzeug<2.1.0 From 78d1212e9e0c8c013562a37151865cce405588a1 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 3 Oct 2025 08:45:59 +0200 Subject: [PATCH 05/12] update tox --- scripts/populate_tox/config.py | 6 +----- scripts/populate_tox/releases.jsonl | 6 +++--- tox.ini | 23 ++++++++++------------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/scripts/populate_tox/config.py b/scripts/populate_tox/config.py index 5465676ffc..16620c7073 100644 --- a/scripts/populate_tox/config.py +++ b/scripts/populate_tox/config.py @@ -183,11 +183,7 @@ "huggingface_hub": { "package": "huggingface_hub", "deps": { - "<1.0.0": ["responses"], - # the following is a hack because for whatever reason, if we set this - # to the actual value (>=1.0.0), according to Python's packaging - # '1.0.0rc2' is NOT in SpecifierSet('>=1.0.0', prereleases=True) - ">=0.9999": ["pytest-httpx"], + "*": ["responses", "pytest-httpx"], }, }, "langchain-base": { diff --git a/scripts/populate_tox/releases.jsonl b/scripts/populate_tox/releases.jsonl index eb4d1055f4..f0b3fa7046 100644 --- a/scripts/populate_tox/releases.jsonl +++ b/scripts/populate_tox/releases.jsonl @@ -46,7 +46,7 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7"], "name": "boto3", "requires_python": "", "version": "1.12.49", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">= 3.6", "version": "1.20.54", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">= 3.7", "version": "1.28.85", "yanked": false}} -{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">=3.9", "version": "1.40.43", "yanked": false}} +{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">=3.9", "version": "1.40.44", "yanked": false}} {"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Internet :: WWW/HTTP :: WSGI :: Server", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "bottle", "requires_python": "", "version": "0.12.25", "yanked": false}} {"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Internet :: WWW/HTTP :: WSGI :: Server", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "bottle", "requires_python": null, "version": "0.13.4", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Object Brokering", "Topic :: System :: Distributed Computing"], "name": "celery", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "version": "4.4.7", "yanked": false}} @@ -109,7 +109,7 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: System :: Logging"], "name": "loguru", "requires_python": "<4.0,>=3.5", "version": "0.7.3", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.7.1", "version": "1.0.1", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "1.109.1", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "2.0.1", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "2.1.0", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai-agents", "requires_python": ">=3.9", "version": "0.0.19", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai-agents", "requires_python": ">=3.9", "version": "0.1.0", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai-agents", "requires_python": ">=3.9", "version": "0.2.11", "yanked": false}} @@ -201,6 +201,6 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Framework :: Tryton", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: Bulgarian", "Natural Language :: Catalan", "Natural Language :: Chinese (Simplified)", "Natural Language :: Czech", "Natural Language :: Dutch", "Natural Language :: English", "Natural Language :: Finnish", "Natural Language :: French", "Natural Language :: German", "Natural Language :: Hungarian", "Natural Language :: Indonesian", "Natural Language :: Italian", "Natural Language :: Persian", "Natural Language :: Polish", "Natural Language :: Portuguese (Brazilian)", "Natural Language :: Russian", "Natural Language :: Slovenian", "Natural Language :: Spanish", "Natural Language :: Turkish", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "trytond", "requires_python": ">=3.6", "version": "5.8.16", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Framework :: Tryton", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: Bulgarian", "Natural Language :: Catalan", "Natural Language :: Chinese (Simplified)", "Natural Language :: Czech", "Natural Language :: Dutch", "Natural Language :: English", "Natural Language :: Finnish", "Natural Language :: French", "Natural Language :: German", "Natural Language :: Hungarian", "Natural Language :: Indonesian", "Natural Language :: Italian", "Natural Language :: Persian", "Natural Language :: Polish", "Natural Language :: Portuguese (Brazilian)", "Natural Language :: Romanian", "Natural Language :: Russian", "Natural Language :: Slovenian", "Natural Language :: Spanish", "Natural Language :: Turkish", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "trytond", "requires_python": ">=3.6", "version": "6.2.14", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Framework :: Tryton", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: Bulgarian", "Natural Language :: Catalan", "Natural Language :: Chinese (Simplified)", "Natural Language :: Czech", "Natural Language :: Dutch", "Natural Language :: English", "Natural Language :: Finnish", "Natural Language :: French", "Natural Language :: German", "Natural Language :: Hungarian", "Natural Language :: Indonesian", "Natural Language :: Italian", "Natural Language :: Persian", "Natural Language :: Polish", "Natural Language :: Portuguese (Brazilian)", "Natural Language :: Romanian", "Natural Language :: Russian", "Natural Language :: Slovenian", "Natural Language :: Spanish", "Natural Language :: Turkish", "Natural Language :: Ukrainian", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "trytond", "requires_python": ">=3.8", "version": "6.8.17", "yanked": false}} -{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Framework :: Tryton", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: Bulgarian", "Natural Language :: Catalan", "Natural Language :: Chinese (Simplified)", "Natural Language :: Czech", "Natural Language :: Dutch", "Natural Language :: English", "Natural Language :: Finnish", "Natural Language :: French", "Natural Language :: German", "Natural Language :: Hungarian", "Natural Language :: Indonesian", "Natural Language :: Italian", "Natural Language :: Persian", "Natural Language :: Polish", "Natural Language :: Portuguese (Brazilian)", "Natural Language :: Romanian", "Natural Language :: Russian", "Natural Language :: Slovenian", "Natural Language :: Spanish", "Natural Language :: Turkish", "Natural Language :: Ukrainian", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "trytond", "requires_python": ">=3.9", "version": "7.6.7", "yanked": false}} +{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Framework :: Tryton", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: Bulgarian", "Natural Language :: Catalan", "Natural Language :: Chinese (Simplified)", "Natural Language :: Czech", "Natural Language :: Dutch", "Natural Language :: English", "Natural Language :: Finnish", "Natural Language :: French", "Natural Language :: German", "Natural Language :: Hungarian", "Natural Language :: Indonesian", "Natural Language :: Italian", "Natural Language :: Persian", "Natural Language :: Polish", "Natural Language :: Portuguese (Brazilian)", "Natural Language :: Romanian", "Natural Language :: Russian", "Natural Language :: Slovenian", "Natural Language :: Spanish", "Natural Language :: Turkish", "Natural Language :: Ukrainian", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "trytond", "requires_python": ">=3.9", "version": "7.6.8", "yanked": false}} {"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "typer", "requires_python": ">=3.7", "version": "0.15.4", "yanked": false}} {"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "typer", "requires_python": ">=3.8", "version": "0.19.2", "yanked": false}} diff --git a/tox.ini b/tox.ini index 9d6e246673..6d87dd3780 100644 --- a/tox.ini +++ b/tox.ini @@ -65,11 +65,11 @@ envlist = {py3.8,py3.11,py3.12}-openai-base-v1.0.1 {py3.8,py3.12,py3.13}-openai-base-v1.109.1 - {py3.8,py3.12,py3.13}-openai-base-v2.0.1 + {py3.8,py3.12,py3.13}-openai-base-v2.1.0 {py3.8,py3.11,py3.12}-openai-notiktoken-v1.0.1 {py3.8,py3.12,py3.13}-openai-notiktoken-v1.109.1 - {py3.8,py3.12,py3.13}-openai-notiktoken-v2.0.1 + {py3.8,py3.12,py3.13}-openai-notiktoken-v2.1.0 {py3.9,py3.12,py3.13}-langgraph-v0.6.8 {py3.10,py3.12,py3.13}-langgraph-v1.0.0a4 @@ -90,7 +90,7 @@ envlist = {py3.6,py3.7}-boto3-v1.12.49 {py3.6,py3.9,py3.10}-boto3-v1.20.54 {py3.7,py3.11,py3.12}-boto3-v1.28.85 - {py3.9,py3.12,py3.13}-boto3-v1.40.43 + {py3.9,py3.12,py3.13}-boto3-v1.40.44 {py3.6,py3.7,py3.8}-chalice-v1.16.0 {py3.9,py3.12,py3.13}-chalice-v1.32.0 @@ -268,7 +268,7 @@ envlist = {py3.6}-trytond-v4.8.18 {py3.6,py3.7,py3.8}-trytond-v5.8.16 {py3.8,py3.10,py3.11}-trytond-v6.8.17 - {py3.9,py3.12,py3.13}-trytond-v7.6.7 + {py3.9,py3.12,py3.13}-trytond-v7.6.8 {py3.7,py3.12,py3.13}-typer-v0.15.4 {py3.8,py3.12,py3.13}-typer-v0.19.2 @@ -360,14 +360,14 @@ deps = openai-base-v1.0.1: openai==1.0.1 openai-base-v1.109.1: openai==1.109.1 - openai-base-v2.0.1: openai==2.0.1 + openai-base-v2.1.0: openai==2.1.0 openai-base: pytest-asyncio openai-base: tiktoken openai-base-v1.0.1: httpx<0.28 openai-notiktoken-v1.0.1: openai==1.0.1 openai-notiktoken-v1.109.1: openai==1.109.1 - openai-notiktoken-v2.0.1: openai==2.0.1 + openai-notiktoken-v2.1.0: openai==2.1.0 openai-notiktoken: pytest-asyncio openai-notiktoken-v1.0.1: httpx<0.28 @@ -385,18 +385,15 @@ deps = huggingface_hub-v0.32.6: huggingface_hub==0.32.6 huggingface_hub-v0.35.3: huggingface_hub==0.35.3 huggingface_hub-v1.0.0rc2: huggingface_hub==1.0.0rc2 - huggingface_hub-v0.24.7: responses - huggingface_hub-v0.28.1: responses - huggingface_hub-v0.32.6: responses - huggingface_hub-v0.35.3: responses - huggingface_hub-v1.0.0rc2: pytest-httpx + huggingface_hub: responses + huggingface_hub: pytest-httpx # ~~~ Cloud ~~~ boto3-v1.12.49: boto3==1.12.49 boto3-v1.20.54: boto3==1.20.54 boto3-v1.28.85: boto3==1.28.85 - boto3-v1.40.43: boto3==1.40.43 + boto3-v1.40.44: boto3==1.40.44 {py3.7,py3.8}-boto3: urllib3<2.0.0 chalice-v1.16.0: chalice==1.16.0 @@ -694,7 +691,7 @@ deps = trytond-v4.8.18: trytond==4.8.18 trytond-v5.8.16: trytond==5.8.16 trytond-v6.8.17: trytond==6.8.17 - trytond-v7.6.7: trytond==7.6.7 + trytond-v7.6.8: trytond==7.6.8 trytond: werkzeug trytond-v4.6.22: werkzeug<1.0 trytond-v4.8.18: werkzeug<1.0 From d389cd918c84b8bdcbcb06c8fd66c26c7d670d89 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 3 Oct 2025 09:29:56 +0200 Subject: [PATCH 06/12] adapt to both requests and httpx --- .../huggingface_hub/test_huggingface_hub.py | 340 ++++++++++++------ 1 file changed, 228 insertions(+), 112 deletions(-) diff --git a/tests/integrations/huggingface_hub/test_huggingface_hub.py b/tests/integrations/huggingface_hub/test_huggingface_hub.py index c8625420c1..d254ea834c 100644 --- a/tests/integrations/huggingface_hub/test_huggingface_hub.py +++ b/tests/integrations/huggingface_hub/test_huggingface_hub.py @@ -34,85 +34,91 @@ ) +def _add_mock_response( + httpx_mock, rsps, method, url, json=None, status=200, body=None, headers=None +): + # HF v1+ uses httpx for making requests to their API, while <1 uses requests. + # Since we have to test both, we need mocks for both httpx and requests. + if HF_VERSION >= (1, 0, 0): + httpx_mock.add_response( + method=method, + url=url, + json=json, + content=body, + status_code=status, + headers=headers, + is_optional=True, + is_reusable=True, + ) + else: + rsps.add( + method=method, + url=url, + json=json, + body=body, + status=status, + headers=headers, + ) + + @pytest.fixture def mock_hf_text_generation_api(httpx_mock): # type: () -> Any """Mock HuggingFace text generation API""" - model_name = "test-model" - - model_endpoint_response = { - "id": model_name, - "pipeline_tag": "text-generation", - "inferenceProviderMapping": { - "hf-inference": { - "status": "live", - "providerId": model_name, - "task": "text-generation", - } - }, - } - inference_endpoint_response = { - "generated_text": "[mocked] Hello! How can i help you?", - "details": { - "finish_reason": "length", - "generated_tokens": 10, - "prefill": [], - "tokens": [], - }, - } - if HF_VERSION >= (1, 0, 0): - # Mock model info endpoint - httpx_mock.add_response( + with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: + model_name = "test-model" + + _add_mock_response( + httpx_mock, + rsps, method="GET", url=re.compile( MODEL_ENDPOINT.format(model_name=model_name) + r"(\?expand=inferenceProviderMapping)?" ), - json=model_endpoint_response, - status_code=200, - is_optional=True, - is_reusable=True, + json={ + "id": model_name, + "pipeline_tag": "text-generation", + "inferenceProviderMapping": { + "hf-inference": { + "status": "live", + "providerId": model_name, + "task": "text-generation", + } + }, + }, + status=200, ) - # Mock text generation endpoint - httpx_mock.add_response( + _add_mock_response( + httpx_mock, + rsps, method="POST", url=INFERENCE_ENDPOINT.format(model_name=model_name), - json=inference_endpoint_response, - status_code=200, - is_optional=True, - is_reusable=True, + json={ + "generated_text": "[mocked] Hello! How can i help you?", + "details": { + "finish_reason": "length", + "generated_tokens": 10, + "prefill": [], + "tokens": [], + }, + }, + status=200, ) - yield httpx_mock - - else: - # Older version of huggingface_hub, we need to mock requests - with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: - # Mock model info endpoint - rsps.add( - responses.GET, - MODEL_ENDPOINT.format(model_name=model_name), - json=model_endpoint_response, - status=200, - ) - - # Mock text generation endpoint - rsps.add( - responses.POST, - INFERENCE_ENDPOINT.format(model_name=model_name), - json=inference_endpoint_response, - status=200, - ) - + if HF_VERSION > (1, 0, 0): + yield httpx_mock + else: yield rsps @pytest.fixture -def mock_hf_api_with_errors(): +def mock_hf_api_with_errors(httpx_mock): # type: () -> Any """Mock HuggingFace API that always raises errors for any request""" + with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: model_name = "test-model" @@ -125,42 +131,53 @@ def mock_hf_api_with_errors(): ) # Mock text generation endpoint with error - rsps.add( - responses.POST, + _add_mock_response( + httpx_mock, + rsps, + "POST", INFERENCE_ENDPOINT.format(model_name=model_name), json={"error": "Internal server error", "message": "Something went wrong"}, status=500, ) # Mock chat completion endpoint with error - rsps.add( - responses.POST, + _add_mock_response( + httpx_mock, + rsps, + "POST", INFERENCE_ENDPOINT.format(model_name=model_name) + "/v1/chat/completions", json={"error": "Internal server error", "message": "Something went wrong"}, status=500, ) # Catch-all pattern for any other model requests - rsps.add( - responses.GET, + _add_mock_response( + httpx_mock, + rsps, + "GET", "https://huggingface.co/api/models/test-model-error", json={"error": "Generic model error"}, status=500, ) - yield rsps + if HF_VERSION > (1, 0, 0): + yield httpx_mock + else: + yield rsps @pytest.fixture -def mock_hf_text_generation_api_streaming(): +def mock_hf_text_generation_api_streaming(httpx_mock): # type: () -> Any """Mock streaming HuggingFace text generation API""" with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: model_name = "test-model" # Mock model info endpoint - rsps.add( - responses.GET, + _add_mock_response( + httpx_mock, + rsps, + "GET", MODEL_ENDPOINT.format(model_name=model_name), json={ "id": model_name, @@ -179,8 +196,10 @@ def mock_hf_text_generation_api_streaming(): # Mock text generation endpoint for streaming streaming_response = b'data:{"token":{"id":1, "special": false, "text": "the mocked "}}\n\ndata:{"token":{"id":2, "special": false, "text": "model response"}, "details":{"finish_reason": "length", "generated_tokens": 10, "seed": 0}}\n\n' - rsps.add( - responses.POST, + _add_mock_response( + httpx_mock, + rsps, + "POST", INFERENCE_ENDPOINT.format(model_name=model_name), body=streaming_response, status=200, @@ -191,19 +210,24 @@ def mock_hf_text_generation_api_streaming(): }, ) - yield rsps + if HF_VERSION > (1, 0, 0): + yield httpx_mock + else: + yield rsps @pytest.fixture -def mock_hf_chat_completion_api(): +def mock_hf_chat_completion_api(httpx_mock): # type: () -> Any """Mock HuggingFace chat completion API""" with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: model_name = "test-model" # Mock model info endpoint - rsps.add( - responses.GET, + _add_mock_response( + httpx_mock, + rsps, + "GET", MODEL_ENDPOINT.format(model_name=model_name), json={ "id": model_name, @@ -220,8 +244,10 @@ def mock_hf_chat_completion_api(): ) # Mock chat completion endpoint - rsps.add( - responses.POST, + _add_mock_response( + httpx_mock, + rsps, + "POST", INFERENCE_ENDPOINT.format(model_name=model_name) + "/v1/chat/completions", json={ "id": "xyz-123", @@ -247,19 +273,24 @@ def mock_hf_chat_completion_api(): status=200, ) - yield rsps + if HF_VERSION > (1, 0, 0): + yield httpx_mock + else: + yield rsps @pytest.fixture -def mock_hf_chat_completion_api_tools(): +def mock_hf_chat_completion_api_tools(httpx_mock): # type: () -> Any """Mock HuggingFace chat completion API with tool calls.""" with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: model_name = "test-model" # Mock model info endpoint - rsps.add( - responses.GET, + _add_mock_response( + httpx_mock, + rsps, + "GET", MODEL_ENDPOINT.format(model_name=model_name), json={ "id": model_name, @@ -276,8 +307,10 @@ def mock_hf_chat_completion_api_tools(): ) # Mock chat completion endpoint - rsps.add( - responses.POST, + _add_mock_response( + httpx_mock, + rsps, + "POST", INFERENCE_ENDPOINT.format(model_name=model_name) + "/v1/chat/completions", json={ "id": "xyz-123", @@ -312,19 +345,24 @@ def mock_hf_chat_completion_api_tools(): status=200, ) - yield rsps + if HF_VERSION > (1, 0, 0): + yield httpx_mock + else: + yield rsps @pytest.fixture -def mock_hf_chat_completion_api_streaming(): +def mock_hf_chat_completion_api_streaming(httpx_mock): # type: () -> Any """Mock streaming HuggingFace chat completion API""" with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: model_name = "test-model" # Mock model info endpoint - rsps.add( - responses.GET, + _add_mock_response( + httpx_mock, + rsps, + "GET", MODEL_ENDPOINT.format(model_name=model_name), json={ "id": model_name, @@ -346,8 +384,10 @@ def mock_hf_chat_completion_api_streaming(): b'data:{"id":"xyz-124","created":1234567890,"model":"test-model-123","system_fingerprint":"fp_123","choices":[{"delta":{"role":"assistant","content":"model response"},"index":0,"finish_reason":"stop"}],"usage":{"prompt_tokens":183,"completion_tokens":14,"total_tokens":197}}\n\n' ) - rsps.add( - responses.POST, + _add_mock_response( + httpx_mock, + rsps, + "POST", INFERENCE_ENDPOINT.format(model_name=model_name) + "/v1/chat/completions", body=streaming_chat_response, status=200, @@ -358,19 +398,24 @@ def mock_hf_chat_completion_api_streaming(): }, ) - yield rsps + if HF_VERSION > (1, 0, 0): + yield httpx_mock + else: + yield rsps @pytest.fixture -def mock_hf_chat_completion_api_streaming_tools(): +def mock_hf_chat_completion_api_streaming_tools(httpx_mock): # type: () -> Any """Mock streaming HuggingFace chat completion API with tool calls.""" with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: model_name = "test-model" # Mock model info endpoint - rsps.add( - responses.GET, + _add_mock_response( + httpx_mock, + rsps, + "GET", MODEL_ENDPOINT.format(model_name=model_name), json={ "id": model_name, @@ -392,8 +437,10 @@ def mock_hf_chat_completion_api_streaming_tools(): b'data:{"id":"xyz-124","created":1234567890,"model":"test-model-123","system_fingerprint":"fp_123","choices":[{"delta":{"role":"assistant","tool_calls": [{"id": "call_123","type": "function","function": {"name": "get_weather", "arguments": {"location": "Paris"}}}]},"index":0,"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":183,"completion_tokens":14,"total_tokens":197}}\n\n' ) - rsps.add( - responses.POST, + _add_mock_response( + httpx_mock, + rsps, + "POST", INFERENCE_ENDPOINT.format(model_name=model_name) + "/v1/chat/completions", body=streaming_chat_response, status=200, @@ -404,7 +451,10 @@ def mock_hf_chat_completion_api_streaming_tools(): }, ) - yield rsps + if HF_VERSION > (1, 0, 0): + yield httpx_mock + else: + yield rsps @pytest.mark.httpx_mock(assert_all_requests_were_expected=False) @@ -436,20 +486,20 @@ def test_text_generation( (transaction,) = events - gen_ai_span = None - for span in transaction["spans"]: - if span["op"] == "gen_ai.generate_text": - gen_ai_span = span + span = None + for sp in transaction["spans"]: + if sp["op"] == "gen_ai.generate_text": + span = sp else: - # there should be no other spans, just the gen_ai.generate_text span + # there should be no other spans, just the gen_ai span # and optionally some http.client spans from talking to the hf api - assert span["op"] == "http.client" + assert sp["op"] == "http.client" - assert gen_ai_span is not None + assert span is not None - assert gen_ai_span["op"] == "gen_ai.generate_text" - assert gen_ai_span["description"] == "generate_text test-model" - assert gen_ai_span["origin"] == "auto.ai.huggingface_hub" + assert span["op"] == "gen_ai.generate_text" + assert span["description"] == "generate_text test-model" + assert span["origin"] == "auto.ai.huggingface_hub" expected_data = { "gen_ai.operation.name": "generate_text", @@ -469,12 +519,13 @@ def test_text_generation( assert "gen_ai.request.messages" not in expected_data assert "gen_ai.response.text" not in expected_data - assert gen_ai_span["data"] == expected_data + assert span["data"] == expected_data # text generation does not set the response model - assert "gen_ai.response.model" not in gen_ai_span["data"] + assert "gen_ai.response.model" not in span["data"] +@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) @pytest.mark.parametrize("send_default_pii", [True, False]) @pytest.mark.parametrize("include_prompts", [True, False]) def test_text_generation_streaming( @@ -503,7 +554,17 @@ def test_text_generation_streaming( pass (transaction,) = events - (span,) = transaction["spans"] + + span = None + for sp in transaction["spans"]: + if sp["op"] == "gen_ai.generate_text": + span = sp + else: + # there should be no other spans, just the gen_ai span + # and optionally some http.client spans from talking to the hf api + assert sp["op"] == "http.client" + + assert span is not None assert span["op"] == "gen_ai.generate_text" assert span["description"] == "generate_text test-model" @@ -533,6 +594,7 @@ def test_text_generation_streaming( assert "gen_ai.response.model" not in span["data"] +@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) @pytest.mark.parametrize("send_default_pii", [True, False]) @pytest.mark.parametrize("include_prompts", [True, False]) def test_chat_completion( @@ -559,7 +621,17 @@ def test_chat_completion( ) (transaction,) = events - (span,) = transaction["spans"] + + span = None + for sp in transaction["spans"]: + if sp["op"] == "gen_ai.chat": + span = sp + else: + # there should be no other spans, just the gen_ai span + # and optionally some http.client spans from talking to the hf api + assert sp["op"] == "http.client" + + assert span is not None assert span["op"] == "gen_ai.chat" assert span["description"] == "chat test-model" @@ -593,6 +665,7 @@ def test_chat_completion( assert span["data"] == expected_data +@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) @pytest.mark.parametrize("send_default_pii", [True, False]) @pytest.mark.parametrize("include_prompts", [True, False]) def test_chat_completion_streaming( @@ -621,7 +694,17 @@ def test_chat_completion_streaming( ) (transaction,) = events - (span,) = transaction["spans"] + + span = None + for sp in transaction["spans"]: + if sp["op"] == "gen_ai.chat": + span = sp + else: + # there should be no other spans, just the gen_ai span + # and optionally some http.client spans from talking to the hf api + assert sp["op"] == "http.client" + + assert span is not None assert span["op"] == "gen_ai.chat" assert span["description"] == "chat test-model" @@ -655,6 +738,7 @@ def test_chat_completion_streaming( assert span["data"] == expected_data +@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) def test_chat_completion_api_error( sentry_init, capture_events, mock_hf_api_with_errors ): @@ -678,7 +762,16 @@ def test_chat_completion_api_error( assert error["exception"]["values"][0]["mechanism"]["type"] == "huggingface_hub" assert not error["exception"]["values"][0]["mechanism"]["handled"] - (span,) = transaction["spans"] + span = None + for sp in transaction["spans"]: + if sp["op"] == "gen_ai.chat": + span = sp + else: + # there should be no other spans, just the gen_ai span + # and optionally some http.client spans from talking to the hf api + assert sp["op"] == "http.client" + + assert span is not None assert span["op"] == "gen_ai.chat" assert span["description"] == "chat test-model" @@ -698,6 +791,7 @@ def test_chat_completion_api_error( assert span["data"] == expected_data +@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) def test_span_status_error(sentry_init, capture_events, mock_hf_api_with_errors): # type: (Any, Any, Any) -> None sentry_init(traces_sample_rate=1.0) @@ -717,6 +811,7 @@ def test_span_status_error(sentry_init, capture_events, mock_hf_api_with_errors) assert transaction["contexts"]["trace"]["status"] == "error" +@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) @pytest.mark.parametrize("send_default_pii", [True, False]) @pytest.mark.parametrize("include_prompts", [True, False]) def test_chat_completion_with_tools( @@ -759,7 +854,17 @@ def test_chat_completion_with_tools( ) (transaction,) = events - (span,) = transaction["spans"] + + span = None + for sp in transaction["spans"]: + if sp["op"] == "gen_ai.chat": + span = sp + else: + # there should be no other spans, just the gen_ai span + # and optionally some http.client spans from talking to the hf api + assert sp["op"] == "http.client" + + assert span is not None assert span["op"] == "gen_ai.chat" assert span["description"] == "chat test-model" @@ -794,6 +899,7 @@ def test_chat_completion_with_tools( assert span["data"] == expected_data +@pytest.mark.httpx_mock(assert_all_requests_were_expected=False) @pytest.mark.parametrize("send_default_pii", [True, False]) @pytest.mark.parametrize("include_prompts", [True, False]) def test_chat_completion_streaming_with_tools( @@ -839,7 +945,17 @@ def test_chat_completion_streaming_with_tools( ) (transaction,) = events - (span,) = transaction["spans"] + + span = None + for sp in transaction["spans"]: + if sp["op"] == "gen_ai.chat": + span = sp + else: + # there should be no other spans, just the gen_ai span + # and optionally some http.client spans from talking to the hf api + assert sp["op"] == "http.client" + + assert span is not None assert span["op"] == "gen_ai.chat" assert span["description"] == "chat test-model" From 4b5623402b60a9c4a2b4e0fc3a68d507aec51cab Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 3 Oct 2025 09:36:11 +0200 Subject: [PATCH 07/12] properly check for other spans --- tests/integrations/huggingface_hub/test_huggingface_hub.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/integrations/huggingface_hub/test_huggingface_hub.py b/tests/integrations/huggingface_hub/test_huggingface_hub.py index d254ea834c..2a47fbf553 100644 --- a/tests/integrations/huggingface_hub/test_huggingface_hub.py +++ b/tests/integrations/huggingface_hub/test_huggingface_hub.py @@ -489,6 +489,7 @@ def test_text_generation( span = None for sp in transaction["spans"]: if sp["op"] == "gen_ai.generate_text": + assert span is None, "there is exactly one gen_ai span" span = sp else: # there should be no other spans, just the gen_ai span @@ -558,6 +559,7 @@ def test_text_generation_streaming( span = None for sp in transaction["spans"]: if sp["op"] == "gen_ai.generate_text": + assert span is None, "there is exactly one gen_ai span" span = sp else: # there should be no other spans, just the gen_ai span @@ -625,6 +627,7 @@ def test_chat_completion( span = None for sp in transaction["spans"]: if sp["op"] == "gen_ai.chat": + assert span is None, "there is exactly one gen_ai span" span = sp else: # there should be no other spans, just the gen_ai span @@ -698,6 +701,7 @@ def test_chat_completion_streaming( span = None for sp in transaction["spans"]: if sp["op"] == "gen_ai.chat": + assert span is None, "there is exactly one gen_ai span" span = sp else: # there should be no other spans, just the gen_ai span @@ -765,6 +769,7 @@ def test_chat_completion_api_error( span = None for sp in transaction["spans"]: if sp["op"] == "gen_ai.chat": + assert span is None, "there is exactly one gen_ai span" span = sp else: # there should be no other spans, just the gen_ai span @@ -858,6 +863,7 @@ def test_chat_completion_with_tools( span = None for sp in transaction["spans"]: if sp["op"] == "gen_ai.chat": + assert span is None, "there is exactly one gen_ai span" span = sp else: # there should be no other spans, just the gen_ai span @@ -949,6 +955,7 @@ def test_chat_completion_streaming_with_tools( span = None for sp in transaction["spans"]: if sp["op"] == "gen_ai.chat": + assert span is None, "there is exactly one gen_ai span" span = sp else: # there should be no other spans, just the gen_ai span From c18c15f12f8a65a6054da71870bd0a7c7bd30b75 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 3 Oct 2025 09:39:19 +0200 Subject: [PATCH 08/12] simplify diff --- .../integrations/huggingface_hub/test_huggingface_hub.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integrations/huggingface_hub/test_huggingface_hub.py b/tests/integrations/huggingface_hub/test_huggingface_hub.py index 2a47fbf553..7d9a8e0ec0 100644 --- a/tests/integrations/huggingface_hub/test_huggingface_hub.py +++ b/tests/integrations/huggingface_hub/test_huggingface_hub.py @@ -72,8 +72,8 @@ def mock_hf_text_generation_api(httpx_mock): _add_mock_response( httpx_mock, rsps, - method="GET", - url=re.compile( + "GET", + re.compile( MODEL_ENDPOINT.format(model_name=model_name) + r"(\?expand=inferenceProviderMapping)?" ), @@ -94,8 +94,8 @@ def mock_hf_text_generation_api(httpx_mock): _add_mock_response( httpx_mock, rsps, - method="POST", - url=INFERENCE_ENDPOINT.format(model_name=model_name), + "POST", + INFERENCE_ENDPOINT.format(model_name=model_name), json={ "generated_text": "[mocked] Hello! How can i help you?", "details": { From 064cc7d8b87c36ddc5aad22a1ccd1d12dc255241 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 3 Oct 2025 09:42:04 +0200 Subject: [PATCH 09/12] make it more generic --- .../huggingface_hub/test_huggingface_hub.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/integrations/huggingface_hub/test_huggingface_hub.py b/tests/integrations/huggingface_hub/test_huggingface_hub.py index 7d9a8e0ec0..f9ab2413c2 100644 --- a/tests/integrations/huggingface_hub/test_huggingface_hub.py +++ b/tests/integrations/huggingface_hub/test_huggingface_hub.py @@ -488,7 +488,7 @@ def test_text_generation( span = None for sp in transaction["spans"]: - if sp["op"] == "gen_ai.generate_text": + if sp["op"].startswith("gen_ai"): assert span is None, "there is exactly one gen_ai span" span = sp else: @@ -558,7 +558,7 @@ def test_text_generation_streaming( span = None for sp in transaction["spans"]: - if sp["op"] == "gen_ai.generate_text": + if sp["op"].startswith("gen_ai"): assert span is None, "there is exactly one gen_ai span" span = sp else: @@ -626,7 +626,7 @@ def test_chat_completion( span = None for sp in transaction["spans"]: - if sp["op"] == "gen_ai.chat": + if sp["op"].startswith("gen_ai"): assert span is None, "there is exactly one gen_ai span" span = sp else: @@ -700,7 +700,7 @@ def test_chat_completion_streaming( span = None for sp in transaction["spans"]: - if sp["op"] == "gen_ai.chat": + if sp["op"].startswith("gen_ai"): assert span is None, "there is exactly one gen_ai span" span = sp else: @@ -768,7 +768,7 @@ def test_chat_completion_api_error( span = None for sp in transaction["spans"]: - if sp["op"] == "gen_ai.chat": + if sp["op"].startswith("gen_ai"): assert span is None, "there is exactly one gen_ai span" span = sp else: @@ -862,7 +862,7 @@ def test_chat_completion_with_tools( span = None for sp in transaction["spans"]: - if sp["op"] == "gen_ai.chat": + if sp["op"].startswith("gen_ai"): assert span is None, "there is exactly one gen_ai span" span = sp else: @@ -954,7 +954,7 @@ def test_chat_completion_streaming_with_tools( span = None for sp in transaction["spans"]: - if sp["op"] == "gen_ai.chat": + if sp["op"].startswith("gen_ai"): assert span is None, "there is exactly one gen_ai span" span = sp else: From 210bce9d838b9d2add1a38094ab0343f4b275530 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 3 Oct 2025 10:00:41 +0200 Subject: [PATCH 10/12] fix version checks --- .../huggingface_hub/test_huggingface_hub.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/integrations/huggingface_hub/test_huggingface_hub.py b/tests/integrations/huggingface_hub/test_huggingface_hub.py index f9ab2413c2..d3992a5db3 100644 --- a/tests/integrations/huggingface_hub/test_huggingface_hub.py +++ b/tests/integrations/huggingface_hub/test_huggingface_hub.py @@ -108,7 +108,7 @@ def mock_hf_text_generation_api(httpx_mock): status=200, ) - if HF_VERSION > (1, 0, 0): + if HF_VERSION >= (1, 0, 0): yield httpx_mock else: yield rsps @@ -160,7 +160,7 @@ def mock_hf_api_with_errors(httpx_mock): status=500, ) - if HF_VERSION > (1, 0, 0): + if HF_VERSION >= (1, 0, 0): yield httpx_mock else: yield rsps @@ -210,7 +210,7 @@ def mock_hf_text_generation_api_streaming(httpx_mock): }, ) - if HF_VERSION > (1, 0, 0): + if HF_VERSION >= (1, 0, 0): yield httpx_mock else: yield rsps @@ -273,7 +273,7 @@ def mock_hf_chat_completion_api(httpx_mock): status=200, ) - if HF_VERSION > (1, 0, 0): + if HF_VERSION >= (1, 0, 0): yield httpx_mock else: yield rsps @@ -345,7 +345,7 @@ def mock_hf_chat_completion_api_tools(httpx_mock): status=200, ) - if HF_VERSION > (1, 0, 0): + if HF_VERSION >= (1, 0, 0): yield httpx_mock else: yield rsps @@ -398,7 +398,7 @@ def mock_hf_chat_completion_api_streaming(httpx_mock): }, ) - if HF_VERSION > (1, 0, 0): + if HF_VERSION >= (1, 0, 0): yield httpx_mock else: yield rsps @@ -451,7 +451,7 @@ def mock_hf_chat_completion_api_streaming_tools(httpx_mock): }, ) - if HF_VERSION > (1, 0, 0): + if HF_VERSION >= (1, 0, 0): yield httpx_mock else: yield rsps From 89d04275d938f07716960515b2214f6a7abee01d Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 3 Oct 2025 11:31:53 +0200 Subject: [PATCH 11/12] . --- .../huggingface_hub/test_huggingface_hub.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/integrations/huggingface_hub/test_huggingface_hub.py b/tests/integrations/huggingface_hub/test_huggingface_hub.py index d3992a5db3..7535e4659c 100644 --- a/tests/integrations/huggingface_hub/test_huggingface_hub.py +++ b/tests/integrations/huggingface_hub/test_huggingface_hub.py @@ -812,7 +812,20 @@ def test_span_status_error(sentry_init, capture_events, mock_hf_api_with_errors) (error, transaction) = events assert error["level"] == "error" - assert transaction["spans"][0]["tags"]["status"] == "error" + + span = None + for sp in transaction["spans"]: + if sp["op"].startswith("gen_ai"): + assert span is None, "there is exactly one gen_ai span" + span = sp + else: + # there should be no other spans, just the gen_ai span + # and optionally some http.client spans from talking to the hf api + assert sp["op"] == "http.client" + + assert span is not None + assert span["tags"]["status"] == "error" + assert transaction["contexts"]["trace"]["status"] == "error" From 2af96f19d21b1f7b95d4dc69c009f400d8658870 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Fri, 3 Oct 2025 11:35:24 +0200 Subject: [PATCH 12/12] . --- tests/integrations/huggingface_hub/test_huggingface_hub.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integrations/huggingface_hub/test_huggingface_hub.py b/tests/integrations/huggingface_hub/test_huggingface_hub.py index 7535e4659c..b9ab4df5bf 100644 --- a/tests/integrations/huggingface_hub/test_huggingface_hub.py +++ b/tests/integrations/huggingface_hub/test_huggingface_hub.py @@ -123,8 +123,10 @@ def mock_hf_api_with_errors(httpx_mock): model_name = "test-model" # Mock model info endpoint with error - rsps.add( - responses.GET, + _add_mock_response( + httpx_mock, + rsps, + "GET", MODEL_ENDPOINT.format(model_name=model_name), json={"error": "Model not found"}, status=404,