Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.8.1"
".": "2.8.2"
}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 2.8.2 (2025-12-03)

Full Changelog: [v2.8.1...v2.8.2](https://github.com/openai/openai-python/compare/v2.8.1...v2.8.2)

### Bug Fixes

* **client:** avoid mutating user-provided response config object ([#2700](https://github.com/openai/openai-python/issues/2700)) ([e040d22](https://github.com/openai/openai-python/commit/e040d22c2df068e908f69dc6b892e7f8b3fe6e99))
* ensure streams are always closed ([0b1a27f](https://github.com/openai/openai-python/commit/0b1a27f08639d14dfe40bf80b48e2b8a1a51593c))
* **streaming:** correct indentation ([575bbac](https://github.com/openai/openai-python/commit/575bbac13b3a57731a4e07b67636ae94463d43fa))


### Chores

* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([22cd586](https://github.com/openai/openai-python/commit/22cd586dbd5484b47f625da55db697691116b22b))
* **docs:** use environment variables for authentication in code snippets ([c2a3cd5](https://github.com/openai/openai-python/commit/c2a3cd502bfb03f68f62f50aed15a40458c0996e))
* **internal:** codegen related update ([307a066](https://github.com/openai/openai-python/commit/307a0664383b9d1d4151bc1a05a78c4fdcdcc9b0))
* update lockfile ([b4109c5](https://github.com/openai/openai-python/commit/b4109c5fcf971ccfb25b4bdaef0bf36999f9eca5))

## 2.8.1 (2025-11-17)

Full Changelog: [v2.8.0...v2.8.1](https://github.com/openai/openai-python/compare/v2.8.0...v2.8.1)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,15 @@ pip install openai[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from openai import DefaultAioHttpClient
from openai import AsyncOpenAI


async def main() -> None:
async with AsyncOpenAI(
api_key="My API Key",
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
chat_completion = await client.chat.completions.create(
Expand Down
17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
[project]
name = "openai"
version = "2.8.1"
version = "2.8.2"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
authors = [
{ name = "OpenAI", email = "support@openai.com" },
]

dependencies = [
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.11, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
"tqdm > 4",
"jiter>=0.10.0, <1",
]

requires-python = ">= 3.9"
classifiers = [
"Typing :: Typed",
Expand All @@ -26,6 +28,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
Expand Down Expand Up @@ -53,7 +56,7 @@ managed = true
# version pins are in requirements-dev.lock
dev-dependencies = [
"pyright==1.1.399",
"mypy",
"mypy==1.17",
"respx",
"pytest",
"pytest-asyncio",
Expand Down
169 changes: 91 additions & 78 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,65 +12,70 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.12.13
aiohttp==3.13.2
# via httpx-aiohttp
# via openai
aiosignal==1.3.2
aiosignal==1.4.0
# via aiohttp
annotated-types==0.6.0
annotated-types==0.7.0
# via pydantic
anyio==4.1.0
anyio==4.12.0
# via httpx
# via openai
argcomplete==3.1.2
argcomplete==3.6.3
# via nox
asttokens==2.4.1
asttokens==3.0.1
# via inline-snapshot
async-timeout==5.0.1
# via aiohttp
attrs==24.2.0
attrs==25.4.0
# via aiohttp
# via nox
# via outcome
# via trio
azure-core==1.31.0
azure-core==1.36.0
# via azure-identity
azure-identity==1.19.0
certifi==2023.7.22
azure-identity==1.25.1
backports-asyncio-runner==1.2.0
# via pytest-asyncio
certifi==2025.11.12
# via httpcore
# via httpx
# via requests
cffi==1.16.0
cffi==2.0.0
# via cryptography
# via sounddevice
charset-normalizer==3.3.2
charset-normalizer==3.4.4
# via requests
colorama==0.4.6
# via griffe
colorlog==6.7.0
colorlog==6.10.1
# via nox
cryptography==42.0.7
cryptography==46.0.3
# via azure-identity
# via msal
# via pyjwt
dirty-equals==0.6.0
distlib==0.3.7
dependency-groups==1.3.1
# via nox
dirty-equals==0.11
distlib==0.4.0
# via virtualenv
distro==1.8.0
distro==1.9.0
# via openai
exceptiongroup==1.2.2
exceptiongroup==1.3.1
# via anyio
# via pytest
# via trio
execnet==2.1.1
execnet==2.1.2
# via pytest-xdist
executing==2.2.0
executing==2.2.1
# via inline-snapshot
filelock==3.12.4
filelock==3.19.1
# via virtualenv
frozenlist==1.7.0
frozenlist==1.8.0
# via aiohttp
# via aiosignal
griffe==1.13.0
griffe==1.14.0
h11==0.16.0
# via httpcore
httpcore==1.0.9
Expand All @@ -81,137 +86,145 @@ httpx==0.28.1
# via respx
httpx-aiohttp==0.1.9
# via openai
idna==3.4
humanize==4.13.0
# via nox
idna==3.11
# via anyio
# via httpx
# via requests
# via trio
# via yarl
importlib-metadata==7.0.0
iniconfig==2.0.0
importlib-metadata==8.7.0
iniconfig==2.1.0
# via pytest
inline-snapshot==0.28.0
jiter==0.11.0
inline-snapshot==0.31.1
jiter==0.12.0
# via openai
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
msal==1.31.0
msal==1.34.0
# via azure-identity
# via msal-extensions
msal-extensions==1.2.0
msal-extensions==1.3.1
# via azure-identity
multidict==6.5.0
multidict==6.7.0
# via aiohttp
# via yarl
mypy==1.14.1
mypy-extensions==1.0.0
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
nest-asyncio==1.6.0
nodeenv==1.8.0
nodeenv==1.9.1
# via pyright
nox==2023.4.22
nox==2025.11.12
numpy==2.0.2
# via openai
# via pandas
# via pandas-stubs
outcome==1.3.0.post0
# via trio
packaging==23.2
packaging==25.0
# via dependency-groups
# via nox
# via pytest
pandas==2.2.3
pandas==2.3.3
# via openai
pandas-stubs==2.1.4.231227
pandas-stubs==2.2.2.240807
# via openai
platformdirs==3.11.0
pathspec==0.12.1
# via mypy
platformdirs==4.4.0
# via virtualenv
pluggy==1.5.0
pluggy==1.6.0
# via pytest
portalocker==2.10.1
# via msal-extensions
propcache==0.3.2
propcache==0.4.1
# via aiohttp
# via yarl
pycparser==2.23
# via cffi
pydantic==2.11.9
pydantic==2.12.5
# via openai
pydantic-core==2.33.2
pydantic-core==2.41.5
# via pydantic
pygments==2.18.0
pygments==2.19.2
# via pytest
# via rich
pyjwt==2.8.0
pyjwt==2.10.1
# via msal
pyright==1.1.399
pytest==8.4.1
pytest==8.4.2
# via inline-snapshot
# via pytest-asyncio
# via pytest-xdist
pytest-asyncio==0.24.0
pytest-xdist==3.7.0
python-dateutil==2.8.2
pytest-asyncio==1.2.0
pytest-xdist==3.8.0
python-dateutil==2.9.0.post0
# via pandas
# via time-machine
pytz==2023.3.post1
# via dirty-equals
pytz==2025.2
# via pandas
requests==2.31.0
requests==2.32.5
# via azure-core
# via msal
respx==0.22.0
rich==13.7.1
rich==14.2.0
# via inline-snapshot
ruff==0.9.4
setuptools==68.2.2
# via nodeenv
six==1.16.0
# via asttokens
# via azure-core
ruff==0.14.7
six==1.17.0
# via python-dateutil
sniffio==1.3.0
# via anyio
sniffio==1.3.1
# via openai
# via trio
sortedcontainers==2.4.0
# via trio
sounddevice==0.5.1
sounddevice==0.5.3
# via openai
time-machine==2.9.0
tomli==2.0.2
time-machine==2.19.0
tomli==2.3.0
# via dependency-groups
# via inline-snapshot
# via mypy
# via nox
# via pytest
tqdm==4.66.5
tqdm==4.67.1
# via openai
trio==0.27.0
types-pyaudio==0.2.16.20240516
types-pytz==2024.2.0.20241003
trio==0.31.0
types-pyaudio==0.2.16.20250801
types-pytz==2025.2.0.20251108
# via pandas-stubs
types-tqdm==4.66.0.20240417
typing-extensions==4.12.2
types-requests==2.32.4.20250913
# via types-tqdm
types-tqdm==4.67.0.20250809
typing-extensions==4.15.0
# via aiosignal
# via anyio
# via azure-core
# via azure-identity
# via cryptography
# via exceptiongroup
# via multidict
# via mypy
# via openai
# via pydantic
# via pydantic-core
# via pyright
# via pytest-asyncio
# via typing-inspection
typing-inspection==0.4.1
# via virtualenv
typing-inspection==0.4.2
# via pydantic
tzdata==2024.1
tzdata==2025.2
# via pandas
urllib3==2.2.1
urllib3==2.5.0
# via requests
virtualenv==20.24.5
# via types-requests
virtualenv==20.35.4
# via nox
websockets==15.0.1
# via openai
yarl==1.20.1
yarl==1.22.0
# via aiohttp
zipp==3.17.0
zipp==3.23.0
# via importlib-metadata
Loading