From e7130e88f6de728a66afc0209aa8f66190bd2f75 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 2 Dec 2024 11:18:10 +0100 Subject: [PATCH] Fix CI (#3834) The latest release of httpx seems to have broken the test clients of some older versions of Litestar, Starlite, Anthropic, Langchain, OpenAI, Starlette. Pinning httpx for old versions. Also tweaking what versions to test against. --- .github/workflows/test-integrations-ai.yml | 2 +- tox.ini | 58 ++++++++++++++-------- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test-integrations-ai.yml b/.github/workflows/test-integrations-ai.yml index c7cf4a1d85..7e48f62d06 100644 --- a/.github/workflows/test-integrations-ai.yml +++ b/.github/workflows/test-integrations-ai.yml @@ -99,7 +99,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.9","3.11","3.12","3.13"] + python-version: ["3.8","3.9","3.11","3.12","3.13"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 diff --git a/tox.ini b/tox.ini index 6acff6b8e8..0ecd2b697b 100644 --- a/tox.ini +++ b/tox.ini @@ -33,7 +33,7 @@ envlist = {py3.8,py3.12,py3.13}-aiohttp-latest # Anthropic - {py3.7,py3.11,py3.12}-anthropic-v{0.16,0.25} + {py3.8,py3.11,py3.12}-anthropic-v{0.16,0.28,0.40} {py3.7,py3.11,py3.12}-anthropic-latest # Ariadne @@ -164,15 +164,14 @@ envlist = # Langchain {py3.9,py3.11,py3.12}-langchain-v0.1 + {py3.9,py3.11,py3.12}-langchain-v0.3 {py3.9,py3.11,py3.12}-langchain-latest {py3.9,py3.11,py3.12}-langchain-notiktoken # Litestar - # litestar 2.0.0 is the earliest version that supports Python < 3.12 {py3.8,py3.11}-litestar-v{2.0} - # litestar 2.3.0 is the earliest version that supports Python 3.12 - {py3.12}-litestar-v{2.3} - {py3.8,py3.11,py3.12}-litestar-v{2.5} + {py3.8,py3.11,py3.12}-litestar-v{2.6} + {py3.8,py3.11,py3.12}-litestar-v{2.12} {py3.8,py3.11,py3.12}-litestar-latest # Loguru @@ -180,7 +179,9 @@ envlist = {py3.6,py3.12,py3.13}-loguru-latest # OpenAI - {py3.9,py3.11,py3.12}-openai-v1 + {py3.9,py3.11,py3.12}-openai-v1.0 + {py3.9,py3.11,py3.12}-openai-v1.22 + {py3.9,py3.11,py3.12}-openai-v1.55 {py3.9,py3.11,py3.12}-openai-latest {py3.9,py3.11,py3.12}-openai-notiktoken @@ -256,8 +257,8 @@ envlist = # Starlette {py3.7,py3.10}-starlette-v{0.19} - {py3.7,py3.11}-starlette-v{0.20,0.24,0.28} - {py3.8,py3.11,py3.12}-starlette-v{0.32,0.36} + {py3.7,py3.11}-starlette-v{0.24,0.28} + {py3.8,py3.11,py3.12}-starlette-v{0.32,0.36,0.40} {py3.8,py3.12,py3.13}-starlette-latest # Starlite @@ -326,8 +327,10 @@ deps = # Anthropic anthropic: pytest-asyncio - anthropic-v0.25: anthropic~=0.25.0 + anthropic-v{0.16,0.28}: httpx<0.28.0 anthropic-v0.16: anthropic~=0.16.0 + anthropic-v0.28: anthropic~=0.28.0 + anthropic-v0.40: anthropic~=0.40.0 anthropic-latest: anthropic # Ariadne @@ -404,6 +407,7 @@ deps = django: psycopg2-binary django-v{1.11,2.0,2.1,2.2,3.0,3.1,3.2}: djangorestframework>=3.0.0,<4.0.0 django-v{2.0,2.2,3.0,3.2,4.0,4.1,4.2,5.0,5.1}: channels[daphne] + django-v{2.2,3.0}: six django-v{1.11,2.0,2.2,3.0,3.2}: Werkzeug<2.1.0 django-v{1.11,2.0,2.2,3.0}: pytest-django<4.0 django-v{3.2,4.0,4.1,4.2,5.0,5.1}: pytest-django @@ -517,22 +521,25 @@ deps = langchain-v0.1: openai~=1.0.0 langchain-v0.1: langchain~=0.1.11 langchain-v0.1: tiktoken~=0.6.0 - langchain-latest: langchain - langchain-latest: langchain-openai - langchain-latest: openai>=1.6.1 + langchain-v0.1: httpx<0.28.0 + langchain-v0.3: langchain~=0.3.0 + langchain-v0.3: langchain-community + langchain-v0.3: tiktoken + langchain-v0.3: openai + langchain-{latest,notiktoken}: langchain + langchain-{latest,notiktoken}: langchain-openai + langchain-{latest,notiktoken}: openai>=1.6.1 langchain-latest: tiktoken~=0.6.0 - langchain-notiktoken: langchain - langchain-notiktoken: langchain-openai - langchain-notiktoken: openai>=1.6.1 # Litestar litestar: pytest-asyncio litestar: python-multipart litestar: requests litestar: cryptography + litestar-v{2.0,2.6}: httpx<0.28 litestar-v2.0: litestar~=2.0.0 - litestar-v2.3: litestar~=2.3.0 - litestar-v2.5: litestar~=2.5.0 + litestar-v2.6: litestar~=2.6.0 + litestar-v2.12: litestar~=2.12.0 litestar-latest: litestar # Loguru @@ -541,8 +548,14 @@ deps = # OpenAI openai: pytest-asyncio - openai-v1: openai~=1.0.0 - openai-v1: tiktoken~=0.6.0 + openai-v1.0: openai~=1.0.0 + openai-v1.0: tiktoken + openai-v1.0: httpx<0.28.0 + openai-v1.22: openai~=1.22.0 + openai-v1.22: tiktoken + openai-v1.22: httpx<0.28.0 + openai-v1.55: openai~=1.55.0 + openai-v1.55: tiktoken openai-latest: openai openai-latest: tiktoken~=0.6.0 openai-notiktoken: openai @@ -655,16 +668,18 @@ deps = starlette: pytest-asyncio starlette: python-multipart starlette: requests - starlette: httpx # (this is a dependency of httpx) starlette: anyio<4.0.0 starlette: jinja2 + starlette-v{0.19,0.24,0.28,0.32,0.36}: httpx<0.28.0 + starlette-v0.40: httpx + starlette-latest: httpx starlette-v0.19: starlette~=0.19.0 - starlette-v0.20: starlette~=0.20.0 starlette-v0.24: starlette~=0.24.0 starlette-v0.28: starlette~=0.28.0 starlette-v0.32: starlette~=0.32.0 starlette-v0.36: starlette~=0.36.0 + starlette-v0.40: starlette~=0.40.0 starlette-latest: starlette # Starlite @@ -673,6 +688,7 @@ deps = starlite: requests starlite: cryptography starlite: pydantic<2.0.0 + starlite: httpx<0.28 starlite-v{1.48}: starlite~=1.48.0 starlite-v{1.51}: starlite~=1.51.0