Update All Dependencies (major)

This MR contains the following updates:

Package Type Update Change
asgi-correlation-id dependencies major ^4.2.0^5.0.0
cryptography (changelog) dependencies major ^42.0.0^48.0.0
openai dependencies major ^1.1.1^2.0.0
pytest (changelog) dev major ^8.0.0^9.0.0
sse-starlette dependencies major ^2.0.0^3.0.0

Release Notes

snok/asgi-correlation-id (asgi-correlation-id)

v5.0.1

Compare Source

Fixes

  • Removes an undocumented dependency on the packaging package, for users of the sentry integration (fixed in e543a49).

Full Changelog: https://github.com/snok/asgi-correlation-id/compare/v5.0.0...v5.0.1

v5.0.0

Compare Source

Breaking changes

  • Dropped support for Python versions < 3.10 (#​106)
  • Removed the Celery extension and all related public API (#​111). Users relying on this can follow the instructions in the relevant section of the README.
  • Reverted the default UUID-validator to a looser check that accepts any parseable UUID-format string, including nginx $request_id and OpenTelemetry trace IDs (#​108, reverting #​92). This is a breaking change for users relying on strict UUID v4 validation — pass a custom validator to restore the old behavior.

Improvements and fixes

  • Officially added support for Python 3.13 and 3.14
  • Modernized type annotations for Python 3.10+ baseline
  • Corrected uvicorn doc examples (#​110)
  • Switched to uv, ty, and ruff for packaging, linting, and formatting

Full Changelog: https://github.com/snok/asgi-correlation-id/compare/v4.3.4...v5.0.0

v4.3.4

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/snok/asgi-correlation-id/compare/v4.3.3...v4.3.4

v4.3.3

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/snok/asgi-correlation-id/compare/v4.3.2...v4.3.3

v4.3.2

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/snok/asgi-correlation-id/compare/v4.3.1...v4.3.2

v4.3.1

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/snok/asgi-correlation-id/compare/v4.3.0...v4.3.1

v4.3.0

Compare Source

What's Changed

This version drops official support for 3.7, and add support for 3.12. The middleware is expected to still work on 3.7 for now, but the version will no longer be guaranteed to work in the future.

New Contributors

Full Changelog: https://github.com/snok/asgi-correlation-id/compare/v4.2.0...v4.3.0

pyca/cryptography (cryptography)

v48.0.1

Compare Source

v48.0.0

Compare Source

v47.0.0

Compare Source

v46.0.7

Compare Source

v46.0.6

Compare Source

v46.0.5

Compare Source

v46.0.4

Compare Source

v46.0.3

Compare Source

v46.0.2

Compare Source

v46.0.1

Compare Source

v46.0.0

Compare Source

v45.0.7

Compare Source

v45.0.6

Compare Source

v45.0.5

Compare Source

v45.0.4

Compare Source

v45.0.3

Compare Source

v45.0.2

Compare Source

v45.0.1

Compare Source

v45.0.0

Compare Source

v44.0.3

Compare Source

v44.0.2

Compare Source

v44.0.1

Compare Source

v44.0.0

Compare Source

v43.0.3

Compare Source

v43.0.1

Compare Source

v43.0.0

Compare Source

v42.0.8

Compare Source

v42.0.7

Compare Source

v42.0.6

Compare Source

openai/openai-python (openai)

v2.41.1

Compare Source

Full Changelog: v2.41.0...v2.41.1

Build System

v2.41.0

Compare Source

Full Changelog: v2.41.0...v2.41.1

Build System

v2.40.0

Compare Source

Full Changelog: v2.40.0...v2.41.0

Features
  • api: responses.moderation and chat_completions.moderation (87e46c2)

v2.39.0

Compare Source

Full Changelog: v2.39.0...v2.40.0

Features
  • api: Add Amazon Bedrock Responses support
Bug Fixes
  • api: allow setting bedrock api keys on the client directly (4d5bfde)

v2.38.0

Compare Source

Full Changelog: v2.38.0...v2.39.0

Features
  • api: workload identity in audit logs, additional_tools item in responses, fix ActionSearch.query to be optional. (ab60d7a)

v2.37.0

Compare Source

Full Changelog: v2.37.0...v2.38.0

Features
  • api: api update (33d1d01)
  • api: manual updates (a21700a)
  • api: update OpenAPI spec or Stainless config (00265c5)
Chores
  • api: docs updates (ee10152)
  • check release MR custom code sync (2638779)
  • remove release automation trigger (bd6eea5)
  • trigger release automation (f62d082)

v2.36.0

Compare Source

Full Changelog: v2.36.0...v2.37.0

Features
  • api: add service_tier parameter to responses compact method (625827c)
  • internal/types: support eagerly validating pydantic iterators (7e527bc)
  • Remove unnecessary client_id when using workload identity provider for auth (c39ea8d)
Bug Fixes
  • client: add missing f-string prefix in file type error message (c85ebd9)

v2.35.1

Compare Source

Full Changelog: v2.35.1...v2.36.0

Features

v2.35.0

Compare Source

Full Changelog: v2.35.0...v2.35.1

Bug Fixes
  • api: fix imagegen size enum regression (4484653)

v2.34.0

Compare Source

Full Changelog: v2.34.0...v2.35.0

Features
Chores
  • remove legacy python cli (32f36e4)
  • rename legacy python cli entrypoint (a3b182d)
Documentation
  • api: update top_logprobs parameter description across chat and responses (f9d339f)

v2.33.0

Compare Source

Full Changelog: v2.33.0...v2.34.0

Features
  • api: add external_key_id to projects, email/metadata params to users, update types (2d232ee)
  • api: add support for Admin API Keys per endpoint (b8b176a)
  • api: admin API updates (4ae1138)
  • api: manual updates (c1870f1)
  • api: manual updates (f6bb9c7)
  • support setting headers via env (1e89d8b)
Bug Fixes
  • allow explicit Azure auth headers (a0626ba)
  • api: correct prompt_cache_retention enum value from in-memory to in_memory (d47d9f0)
  • api: preserve python api key attribute type (62607f6)
  • api: resolve python auth type checks (42a31a7)
  • api: support admin api key auth (f029eb9)
  • avoid bearer fallback for admin auth (22e01a8)
  • preserve selected auth credentials (0d27f9d)
  • require bearer auth for stream helpers (d055539)
  • types: correct created_at and completed_at to float in Response (7da4b88)
  • types: correct timestamp types to int in Response model (e55631c)
  • use correct field name format for multipart file arrays (9ee4825)
Performance Improvements
  • client: optimize file structure copying in multipart requests (dca474e)
Chores
  • internal: more robust bootstrap script (9ec1600)
  • internal: reformat pyproject.toml (12ad57b)
  • tests: bump steady to v0.22.1 (486dfed)
Documentation
  • api: add rate limit and vector store info to files create (4f776df)
  • api: update files rate limit documentation (b141a20)

v2.32.0

Compare Source

Full Changelog: v2.32.0...v2.33.0

Features
Bug Fixes
  • api: correct prompt_cache_retention enum value from in-memory to in_memory (#​1822) (f9d2d13)
Chores
  • ci: remove release-doctor workflow (00b2091)

v2.31.0

Compare Source

Full Changelog: v2.31.0...v2.32.0

Features
  • api: Add detail to InputFileContent (60de21d)
  • api: add OAuthErrorCode type (0c8d2c3)
  • client: add event handler implementation for websockets (0280d05)
  • client: allow enqueuing to websockets even when not connected (67aa20e)
  • client: support reconnection in websockets (eb72a95)
Bug Fixes
  • ensure file data are only sent as 1 parameter (c0c2ecd)
Documentation

v2.30.0

Compare Source

Full Changelog: v2.30.0...v2.31.0

Features
  • api: add phase field to conversations message (3e5834e)
  • api: add web_search_call.results to ResponseIncludable type (ffd8741)
  • client: add support for short-lived tokens (#​1608) (22fe722)
  • client: support sending raw data over websockets (f1bc52e)
  • internal: implement indices array format for query and form serialization (49194cf)
Bug Fixes
  • client: preserve hardcoded query params when merging with user params (92e109c)
  • types: remove web_search_call.results from ResponseIncludable (d3cc401)
Chores
  • tests: bump steady to v0.20.1 (d60e2ee)
  • tests: bump steady to v0.20.2 (6508d47)
Documentation
  • api: update file parameter descriptions in vector_stores files and file_batches (a9e7ebd)

v2.29.0

Compare Source

Full Changelog: v2.29.0...v2.30.0

Features
  • api: add keys field to Click/DoubleClick/Drag/Move/Scroll computer actions (ee1bbed)
Bug Fixes
  • api: align SDK response types with expanded item schemas (f3f258a)
  • sanitize endpoint path params (89f6698)
  • types: make type required in ResponseInputMessageItem (cfdb167)
Chores
  • ci: skip lint on metadata-only changes (faa93e1)
  • internal: update gitignore (c468477)
  • tests: bump steady to v0.19.4 (f350af8)
  • tests: bump steady to v0.19.5 (5c03401)
  • tests: bump steady to v0.19.6 (b6353b8)
  • tests: bump steady to v0.19.7 (1d654be)
Refactors
  • tests: switch from prism to steady (4a82035)

v2.28.0

Compare Source

Full Changelog: v2.28.0...v2.29.0

Features
  • api: 5.4 nano and mini model slugs (3b45666)
  • api: add /v1/videos endpoint to batches create method (c0e7a16)
  • api: add defer_loading field to ToolFunction (3167595)
  • api: add in and nin operators to ComparisonFilter type (664f02b)
Bug Fixes
  • deps: bump minimum typing-extensions version (a2fb2ca)
  • pydantic: do not pass by_alias unless set (8ebe8fb)
Chores
  • internal: tweak CI branches (96ccc3c)

v2.27.0

Compare Source

Full Changelog: v2.27.0...v2.28.0

Features

v2.26.0

Compare Source

Full Changelog: v2.26.0...v2.27.0

Features
  • api: api update (60ab24a)
  • api: manual updates (b244b09)
  • api: manual updates (d806635)
  • api: sora api improvements: character api, video extensions/edits, higher resolution exports. (58b70d3)
Bug Fixes
  • api: repair merged videos resource (742d8ee)
Chores
  • internal: codegen related update (4e6498e)
  • internal: codegen related update (93af129)
  • match http protocol with ws protocol instead of wss (026f9de)
  • use proper capitalization for WebSockets (a2f9b07)

v2.25.0

Compare Source

Full Changelog: v2.25.0...v2.26.0

Features
  • api: The GA ComputerTool now uses the CompuerTool class. The 'computer_use_preview' tool is moved to ComputerUsePreview (78f5b3c)

v2.24.0

Compare Source

Full Changelog: v2.24.0...v2.25.0

Features
  • api: gpt-5.4, tool search tool, and new computer tool (6b2043f)
  • api: remove prompt_cache_key param from responses, phase field from message types (44fb382)
Bug Fixes
Chores
  • internal: codegen related update (bdb837d)
  • internal: codegen related update (b1de941)
  • internal: reduce warnings (7cdbd06)

v2.23.0

Compare Source

Full Changelog: v2.23.0...v2.24.0

Features
Bug Fixes
Chores
  • internal: make test_proxy_environment_variables more resilient to env (65af8fd)
  • internal: refactor sse event parsing (2344600)

v2.22.0

Compare Source

Full Changelog: v2.22.0...v2.23.0

Features
  • api: add gpt-realtime-1.5 and gpt-audio-1.5 model options to realtime calls (3300b61)
Chores
  • internal: make test_proxy_environment_variables more resilient (6b441e2)

v2.21.0

Compare Source

Full Changelog: v2.21.0...v2.22.0

Features
  • api: websockets for responses api (c01f6fb)
Chores
  • internal: add request options to SSE classes (cdb4315)
  • update mock server docs (91f4da8)
Documentation
  • api: add batch size limit to file_batches parameter descriptions (16ae76a)
  • api: enhance method descriptions across audio, chat, realtime, skills, uploads, videos (21f9e5a)
  • api: update safety_identifier documentation in chat completions and responses (d74bfff)

v2.20.0

Compare Source

Full Changelog: v2.20.0...v2.21.0

Features
  • api: container network_policy and skills (d19de2e)
Bug Fixes
  • structured outputs: resolve memory leak in parse methods (#​2860) (6dcbe21)
  • webhooks: preserve method visibility for compatibility checks (44a8936)
Chores
  • internal: fix lint error on Python 3.14 (534f215)
Documentation
  • split api.md by standalone resources (96e41b3)
  • update comment (63def23)

v2.19.0

Compare Source

Full Changelog: v2.19.0...v2.20.0

Features
  • api: support for images in batch api (28edb6e)

v2.18.0

Compare Source

Full Changelog: v2.18.0...v2.19.0

Features
  • api: skills and hosted shell (27fdf68)
Chores
  • internal: bump dependencies (fae10fd)

v2.17.0

Compare Source

Full Changelog: v2.17.0...v2.18.0

Features
  • api: add context_management to responses (137e992)
  • api: responses context_management (c3bd017)

v2.16.0

Compare Source

Full Changelog: v2.16.0...v2.17.0

Features
  • api: add shell_call_output status field (1bbaf88)
  • api: image generation actions for responses; ResponseFunctionCallArgumentsDoneEvent.name (7d96513)
  • client: add custom JSON encoder for extended type support (9f43c8b)
Bug Fixes
  • client: undo change to web search Find action (8f14eb0)
  • client: update type for find_in_page action (ec54dde)

v2.15.0

Compare Source

Full Changelog: v2.15.0...v2.16.0

Features
  • api: api update (b97f9f2)
  • api: api updates (9debcc0)
  • client: add support for binary request streaming (49561d8)
Bug Fixes
  • api: mark assistants as deprecated (0419cbc)
Chores
  • ci: upgrade actions/github-script (5139f13)
  • internal: update actions/checkout version (f276714)
Documentation
  • examples: update Azure Realtime sample to use v1 API (#​2829) (3b31981)

v2.14.0

Compare Source

Full Changelog: v2.14.0...v2.15.0

Features
  • api: add new Response completed_at prop (f077752)
Chores
  • internal: codegen related update (e7daba6)

v2.13.0

Compare Source

Full Changelog: v2.13.0...v2.14.0

Features
  • api: slugs for new audio models; make all model params accept strings (e517792)
Bug Fixes
  • use async_to_httpx_files in patch method (a6af9ee)
Chores
  • internal: add --fix argument to lint script (93107ef)

v2.12.0

Compare Source

Full Changelog: v2.12.0...v2.13.0

Features
Chores
  • ci: add CI job to detect breaking changes with the Agents SDK (#​1436) (237c91e)
  • internal: add missing files argument to base client (e6d6fd5)

v2.11.0

Compare Source

Full Changelog: v2.11.0...v2.12.0

Features
  • api: api update (a95c4d0)
  • api: fix grader input list, add dated slugs for sora-2 (b2c389b)

v2.9.0

Compare Source

Full Changelog: v2.9.0...v2.10.0

Features
  • api: make model required for the responses/compact endpoint (a12936b)
Bug Fixes
  • types: allow pyright to infer TypedDict types within SequenceNotStr (8f0d230)
Chores
  • add missing docstrings (f20a9a1)
  • internal: update docstring (9a993f2)

v2.8.1

Compare Source

Full Changelog: v2.8.1...v2.9.0

Features
  • api: gpt-5.1-codex-max and responses/compact (22f646e)
Bug Fixes
  • client: avoid mutating user-provided response config object (#​2700) (e040d22)
  • ensure streams are always closed (0b1a27f)
  • streaming: correct indentation (575bbac)
Chores
  • deps: mypy 1.18.1 has a regression, pin to 1.17 (22cd586)
  • docs: use environment variables for authentication in code snippets (c2a3cd5)
  • internal: codegen related update (307a066)
  • update lockfile (b4109c5)

v2.8.0

Compare Source

Full Changelog: v2.8.0...v2.8.1

Bug Fixes
  • api: align types of input items / output items for typescript (64c9fb3)

v2.7.2

Compare Source

Full Changelog: v2.7.2...v2.8.0

Features
Bug Fixes
  • compat: update signatures of model_dump and model_dump_json for Pydantic v1 (c7bd234)

v2.7.1

Compare Source

Full Changelog: v2.7.1...v2.7.2

Bug Fixes
  • compat with Python 3.14 (15a7ec8)
Chores
  • package: drop Python 3.8 support (afc14f2)

v2.7.0

Compare Source

Full Changelog: v2.7.0...v2.7.1

Bug Fixes
  • api: fix nullability of logprobs (373b7f6)

v2.6.1

Compare Source

Full Changelog: v2.6.1...v2.7.0

Features
  • api: Realtime API token_limits, Hybrid searching ranking options (5b43992)
  • api: remove InputAudio from ResponseInputContent (bd70a33)
Bug Fixes
  • client: close streams without requiring full consumption (d8bb7d6)
  • readme: update realtime examples (#​2714) (d0370a8)
  • uploads: avoid file handle leak (4f1b691)
Chores
  • internal/tests: avoid race condition with implicit client cleanup (933d23b)
  • internal: grammar fix (it's -> its) (f7e9e9e)

v2.6.0

Compare Source

Full Changelog: v2.6.0...v2.6.1

Bug Fixes
Chores
  • client: clean up custom translations code (cfb9e25)

v2.5.0

Compare Source

Full Changelog: v2.5.0...v2.6.0

Features
  • api: Add responses.input_tokens.count (6dd09e2)
Bug Fixes
  • api: internal openapi updates (caabd7c)

v2.4.0

Compare Source

Full Changelog: v2.4.0...v2.5.0

Features
Chores
  • bump httpx-aiohttp version to 0.1.9 (67f2f0a)

v2.3.0

Compare Source

Full Changelog: v2.3.0...v2.4.0

Features
  • api: Add support for gpt-4o-transcribe-diarize on audio/transcriptions endpoint (bdbe9b8)
Chores
  • fix dangling comment (da14e99)
  • internal: detect missing future annotations with ruff (2672b8f)

v2.2.0

Compare Source

Full Changelog: v2.2.0...v2.3.0

Features
  • api: comparison filter in/not in (aa49f62)
Chores
  • package: bump jiter to >=0.10.0 to support Python 3.14 (#​2618) (aa445ca)

v2.1.0

Compare Source

Full Changelog: v2.1.0...v2.2.0

Features
  • api: dev day 2025 launches (38ac009)
Bug Fixes
  • client: add chatkit to beta resource (de3e561)

v2.0.1

Compare Source

Full Changelog: v2.0.1...v2.1.0

Features
  • api: add support for realtime calls (7f7925b)

v2.0.0

Compare Source

Full Changelog: v2.0.0...v2.0.1

Bug Fixes
  • api: add status, approval_request_id to MCP tool call (2a02255)

v1.109.1

Compare Source

Full Changelog: v1.109.1...v2.0.0

⚠️ BREAKING CHANGES
  • api: ResponseFunctionToolCallOutputItem.output and ResponseCustomToolCallOutput.output now return string | Array<ResponseInputText | ResponseInputImage | ResponseInputFile> instead of string only. This may break existing callsites that assume output is always a string.
Features
  • api: Support images and files for function call outputs in responses, BatchUsage (4105376)

v1.109.0

Compare Source

Full Changelog: v1.109.0...v1.109.1

Bug Fixes
  • compat: compat with pydantic&lt;2.8.0 when using additional fields (5d95ecf)

v1.108.2

Compare Source

Full Changelog: v1.108.2...v1.109.0

Features

v1.108.1

Compare Source

Full Changelog: v1.108.1...v1.108.2

Bug Fixes
Chores
  • api: openapi updates for conversations (3224f6f)
  • do not install brew dependencies in ./scripts/bootstrap by default (6764b00)
  • improve example values (20b58e1)

v1.108.0

Compare Source

Full Changelog: v1.108.0...v1.108.1

Features
  • api: add reasoning_text (18d8e12)
Chores
  • types: change optional parameter type from NotGiven to Omit (acc190a)

v1.107.3

Compare Source

Full Changelog: v1.107.3...v1.108.0

Features
  • api: type updates for conversations, reasoning_effort and results for evals (c2ee28c)
Chores
  • internal: update pydantic dependency (369d10a)

v1.107.2

Compare Source

Full Changelog: v1.107.2...v1.107.3

Chores
  • api: docs and spec refactoring (9bab5da)
  • tests: simplify get_platform test (0b1f6a2)

v1.107.1

Compare Source

Full Changelog: v1.107.1...v1.107.2

Chores
  • api: Minor docs and type updates for realtime (ab6a10d)
  • tests: simplify get_platform test (01f03e0)

v1.107.0

Compare Source

Full Changelog: v1.107.0...v1.107.1

Chores
  • api: fix realtime GA types (570fc5a)

v1.106.1

Compare Source

Full Changelog: v1.106.1...v1.107.0

Features
  • api: ship the RealtimeGA API shape (dc319d8)
Chores
  • internal: codegen related update (b79b7ca)

v1.106.0

Compare Source

Full Changelog: v1.106.0...v1.106.1

Chores
  • internal: move mypy configurations to pyproject.toml file (ca413a2)

v1.105.0

Compare Source

Full Changelog: v1.105.0...v1.106.0

Features

v1.104.2

Compare Source

Full Changelog: v1.104.2...v1.105.0

Features
  • api: Add gpt-realtime models (8502041)

v1.104.1

Compare Source

Full Changelog: v1.104.1...v1.104.2

Bug Fixes
  • types: add aliases back for web search tool types (2521cd8)

v1.104.0

Compare Source

Full Changelog: v1.104.0...v1.104.1

Chores
  • api: manual updates for ResponseInputAudio (0db5061)

v1.103.0

Compare Source

Full Changelog: v1.103.0...v1.104.0

Features
  • types: replace List[str] with SequenceNotStr in params (bc00bda)
Bug Fixes
  • types: update more types to use SequenceNotStr (cff135c)
  • types: update some types to SequenceNotStr (03f8b88)
Chores

v1.102.0

Compare Source

Full Changelog: v1.102.0...v1.103.0

Features
  • api: realtime API updates (b7c2ddc)
Bug Fixes
  • responses: add missing params to stream() method (bfc0673)
Chores
  • bump inline-snapshot version to 0.28.0 (#​2590) (a6b0872)
  • client: format imports (7ae3020)
  • internal: add Sequence related utils (d3d72b9)
  • internal: fix formatting (3ab273f)
  • internal: minor formatting change (478a348)
  • internal: update pyright exclude list (66e440f)

v1.101.0

Compare Source

Full Changelog: v1.101.0...v1.102.0

Features
  • api: add web search filters (1c199a8)
Bug Fixes
  • avoid newer type syntax (bd0c668)
Chores
  • internal: change ci workflow machines (3e129d5)
  • internal: codegen related update (b6dc170)

v1.100.2

Compare Source

Full Changelog: v1.100.2...v1.100.3

Chores
  • internal/ci: setup breaking change detection (ca2f936)

v1.100.1

Compare Source

Full Changelog: v1.100.1...v1.100.2

Chores
  • api: accurately represent shape for verbosity on Chat Completions (c39d5fd)

v1.100.0

Compare Source

Full Changelog: v1.100.0...v1.100.1

Bug Fixes
  • types: revert response text config deletion (ac4fb19)

v1.99.9

Compare Source

Full Changelog: v1.99.9...v1.100.0

Features
  • api: add new text parameters, expiration options (e3dfa7c)

v1.99.8

Compare Source

Full Changelog: v1.99.8...v1.99.9

Bug Fixes
  • types: actually fix ChatCompletionMessageToolCall type (20cb0c8)

v1.99.7

Compare Source

Full Changelog: v1.99.7...v1.99.8

Bug Fixes
  • internal/tests: correct snapshot update comment (2784a7a)
  • types: revert ChatCompletionMessageToolCallUnion breaking change (ba54e03)
Chores
  • internal/tests: add inline snapshot format command (8107db8)
  • internal: fix formatting (f03a03d)
  • tests: add responses output_text test (971347b)
Refactors
  • tests: share snapshot utils (791c567)

v1.99.6

Compare Source

Full Changelog: v1.99.6...v1.99.7

Bug Fixes
  • types: rename ChatCompletionMessageToolCallParam (48085e2)
  • types: revert ChatCompletionMessageToolCallParam to a TypedDict (c8e9cec)

v1.99.5

Compare Source

Full Changelog: v1.99.5...v1.99.6

Bug Fixes
  • types: re-export more tool call types (8fe5741)
Chores

v1.99.4

Compare Source

Full Changelog: v1.99.4...v1.99.5

Bug Fixes
  • client: fix verbosity parameter location in Responses (2764ff4)

v1.99.3

Compare Source

Full Changelog: v1.99.3...v1.99.4

Bug Fixes
  • types: rename chat completion tool (8d3bf88)
  • types: revert ChatCompletionToolParam to a TypedDict (3f4ae72)

v1.99.2

Compare Source

Full Changelog: v1.99.2...v1.99.3

Bug Fixes
  • responses: add output_text back (585a4f1)

v1.99.1

Compare Source

Full Changelog: v1.99.1...v1.99.2

Features
  • api: adds GPT-5 and new API features: platform.openai.com/docs/guides/gpt-5 (ed370d8)
Bug Fixes
  • types: correct tool types (0c57bd7)
Chores
  • tests: bump inline-snapshot dependency (e236fde)

v1.99.0

Compare Source

Full Changelog: v1.99.0...v1.99.1

Bug Fixes
  • internal: correct event imports (2a6d143)

v1.98.0

Compare Source

Full Changelog: v1.98.0...v1.99.0

Features
  • api: manual updates (d4aa726)
  • client: support file upload requests (0772e6e)
Bug Fixes
  • add missing prompt_cache_key & prompt_cache_key params (00b49ae)
Chores
  • internal: fix ruff target version (aa6b252)

v1.97.2

Compare Source

Full Changelog: v1.97.2...v1.98.0

Features

v1.97.1

Compare Source

Full Changelog: v1.97.1...v1.97.2

Chores
  • client: refactor streaming slightly to better future proof it (71c0c74)
  • project: add settings file for vscode (29c22c9)

v1.97.0

Compare Source

Full Changelog: v1.97.0...v1.97.1

Bug Fixes
  • parsing: ignore empty metadata (58c359f)
  • parsing: parse extra field types (d524b7e)
Chores
  • api: event shapes more accurate (f3a9a92)

v1.96.1

Compare Source

Full Changelog: v1.96.1...v1.97.0

Features

v1.96.0

Compare Source

Full Changelog: v1.96.0...v1.96.1

Chores
  • api: update realtime specs (b68b71b)

v1.95.1

Compare Source

Full Changelog: v1.95.1...v1.96.0

Features
  • clean up environment call outs (87c2e97)
Chores
  • api: update realtime specs, build config (bf06d88)

v1.95.0

Compare Source

Full Changelog: v1.95.0...v1.95.1

Bug Fixes
  • client: don't send Content-Type header on GET requests (182b763)

v1.94.0

Compare Source

Full Changelog: v1.94.0...v1.95.0

Features
  • api: add file_url, fix event ID (265e216)
Chores
  • readme: fix version rendering on pypi (1eee5ca)

v1.93.3

Compare Source

Full Changelog: v1.93.3...v1.94.0

Features
  • api: return better error message on missing embedding (#​2369) (e53464a)

v1.93.2

Compare Source

Full Changelog: v1.93.2...v1.93.3

Bug Fixes
  • parsing: correctly handle nested discriminated unions (fc8a677)

v1.93.1

Compare Source

Full Changelog: v1.93.1...v1.93.2

Chores
  • internal: bump pinned h11 dep (4fca6ae)
  • package: mark python 3.13 as supported (2229047)

v1.93.0

Compare Source

Full Changelog: v1.93.0...v1.93.1

Bug Fixes
  • ci: correct conditional (de6a9ce)
  • responses: add missing arguments to parse (05590ec)
  • vector stores: add missing arguments to files.create_and_poll (3152134)
  • vector stores: add missing arguments to files.upload_and_poll (9d4f425)
Chores
  • ci: change upload type (cd4aa88)
  • ci: only run for pushes and fork pull requests (f89c7eb)
  • internal: codegen related update (bddb8d2)
  • tests: ensure parse method is in sync with create (4f58e18)
  • tests: ensure vector store files create and poll method is in sync (0fe75a2)

v1.92.3

Compare Source

Full Changelog: v1.92.3...v1.93.0

Features

v1.92.2

Compare Source

Full Changelog: v1.92.2...v1.92.3

Bug Fixes
  • client: avoid encoding error with empty API keys (5a3e64e)
Documentation

v1.92.1

Compare Source

Full Changelog: v1.92.1...v1.92.2

Chores
  • api: remove unsupported property (ec24408)

v1.92.0

Compare Source

Full Changelog: v1.92.0...v1.92.1

Chores
  • client: sync stream/parse methods over (e2536cf)
  • docs: update README to include links to docs on Webhooks (ddbf9f1)

v1.91.0

Compare Source

Full Changelog: v1.91.0...v1.92.0

Features
  • api: webhook and deep research support (d3bb116)
  • client: move stream and parse out of beta (0e358ed)
Bug Fixes
  • ci: release-doctor — report correct token name (ff8c556)
Chores
  • internal: add tests for breaking change detection (710fe8f)
  • tests: skip some failing tests on the latest python versions (93ccc38)

v1.90.0

Compare Source

Full Changelog: v1.90.0...v1.91.0

Features
  • api: update api shapes for usage and code interpreter (060d566)

v1.89.0

Compare Source

Full Changelog: v1.89.0...v1.90.0

Features
  • api: make model and inputs not required to create response (11bd62e)

v1.88.0

Compare Source

Full Changelog: v1.88.0...v1.89.0

Features
  • client: add support for aiohttp (9218b07)
Bug Fixes
  • tests: fix: tests which call HTTP endpoints directly with the example parameters (35bcc4b)
Chores

v1.87.0

Compare Source

Full Changelog: v1.87.0...v1.88.0

Features
Chores
  • ci: enable for pull requests (542b0ce)
  • internal: minor formatting (29d723d)

v1.86.0

Compare Source

Full Changelog: v1.86.0...v1.87.0

Features
  • api: add reusable prompt IDs (36bfe6e)
Bug Fixes
  • client: update service_tier on client.beta.chat.completions (aa488d5)
Chores
  • internal: codegen related update (b1a31e5)
  • internal: update conftest.py (bba0213)
  • tests: add tests for httpx client instantiation & proxies (bc93712)

v1.85.0

Compare Source

Full Changelog: v1.85.0...v1.86.0

Features
  • api: Add o3-pro model IDs (d8dd80b)

v1.84.0

Compare Source

Full Changelog: v1.84.0...v1.85.0

Features
  • api: Add tools and structured outputs to evals (002cc7b)
Bug Fixes
  • responses: support raw responses for parse() (d459943)

v1.83.0

Compare Source

Full Changelog: v1.83.0...v1.84.0

Features
  • api: add new realtime and audio models, realtime session options (0acd0da)
Chores

v1.82.1

Compare Source

Full Changelog: v1.82.1...v1.83.0

Features
  • api: Config update for pakrym-stream-param (88bcf3a)
  • client: add follow_redirects request option (26d715f)
Bug Fixes
  • api: Fix evals and code interpreter interfaces (2650159)
  • client: return binary content from get /containers/{container_id}/files/{file_id}/content (f7c80c4)
Chores
  • api: mark some methods as deprecated (3e2ca57)
  • deprecate Assistants API (9d166d7)
  • docs: remove reference to rye shell (c7978e9)

v1.82.0

Compare Source

Full Changelog: v1.82.0...v1.82.1

Bug Fixes
  • responses: don't include parsed_arguments when re-serialising (6d04193)
Chores
  • internal: fix release workflows (361a909)

v1.81.0

Compare Source

Full Changelog: v1.81.0...v1.82.0

Features
  • api: new streaming helpers for background responses (2a65d4d)
Bug Fixes
Documentation
  • readme: another async example fix (9ec8289)
  • readme: fix async example (37d0b25)

v1.80.0

Compare Source

Full Changelog: v1.80.0...v1.81.0

Features
  • api: add container endpoint (054a210)

v1.79.0

Compare Source

Full Changelog: v1.79.0...v1.80.0

Features
Chores
  • docs: grammar improvements (e746145)

v1.78.1

Compare Source

Full Changelog: v1.78.1...v1.79.0

Features
  • api: further updates for evals API (32c99a6)
  • api: manual updates (25245e5)
  • api: responses x eval api (fd586cb)
  • api: Updating Assistants and Evals API schemas (98ba7d3)
Bug Fixes
  • fix create audio transcription endpoint (e9a89ab)
Chores
  • ci: fix installation instructions (f26c5fc)
  • ci: upload sdks to package manager (861f105)

v1.78.0

Compare Source

Full Changelog: v1.78.0...v1.78.1

Bug Fixes
  • internal: fix linting due to broken test annotation (5a7d7a0)
  • package: support direct resource imports (2293fc0)

v1.77.0

Compare Source

Full Changelog: v1.77.0...v1.78.0

Features
  • api: Add reinforcement fine-tuning api support (bebe361)
Bug Fixes
Chores
  • internal: update proxy tests (b8e848d)
  • use lazy imports for module level client (4d0f409)
  • use lazy imports for resources (834813c)

v1.76.2

Compare Source

Full Changelog: v1.76.2...v1.77.0

Features
  • api: add image sizes, reasoning encryption (473469a)
Bug Fixes
Chores
  • only strip leading whitespace (8467d66)

v1.76.1

Compare Source

Full Changelog: v1.76.1...v1.76.2

Chores

v1.76.0

Compare Source

Full Changelog: v1.76.0...v1.76.1

Chores
  • broadly detect json family of content-type headers (b4b1b08)
  • ci: only use depot for staging repos (35312d8)
  • ci: run on more branches and use depot runners (a6a45d4)

v1.75.0

Compare Source

Full Changelog: v1.75.0...v1.76.0

Features
  • api: adding new image model support (74d7692)
Bug Fixes
  • pydantic v1: more robust ModelField.annotation check (#​2163) (7351b12)
  • pydantic v1: more robust ModelField.annotation check (eba7856)
Chores
  • ci: add timeout thresholds for CI jobs (0997211)
  • internal: fix list file params (da2113c)
  • internal: import reformatting (b425fb9)
  • internal: minor formatting changes (aed1d76)
  • internal: refactor retries to not use recursion (8cb8cfa)
  • internal: update models test (870ad4e)
  • update completion parse signature (a44016c)

v1.74.1

Compare Source

Full Changelog: v1.74.1...v1.75.0

Features
  • api: add o3 and o4-mini model IDs (4bacbd5)

v1.74.0

Compare Source

Full Changelog: v1.74.0...v1.74.1

Chores
  • internal: base client updates (06303b5)
  • internal: bump pyright version (9fd1c77)

v1.73.0

Compare Source

Full Changelog: v1.73.0...v1.74.0

Features
  • api: adding gpt-4.1 family of model IDs (d4dae55)
Bug Fixes
Chores
  • client: minor internal fixes (6071ae5)
  • internal: update pyright settings (c8f8beb)

v1.72.0

Compare Source

Full Changelog: v1.72.0...v1.73.0

Features
Bug Fixes
  • perf: optimize some hot paths (f79d39f)
  • perf: skip traversing types for NotGiven values (28d220d)
Chores

v1.71.0

Compare Source

Full Changelog: v1.71.0...v1.72.0

Features
Chores

v1.70.0

Compare Source

Full Changelog: v1.70.0...v1.71.0

Features
Chores

v1.69.0

Compare Source

Full Changelog: v1.69.0...v1.70.0

Features
  • api: add get /responses/{response_id}/input_items endpoint (4c6a35d)

v1.68.2

Compare Source

Full Changelog: v1.68.2...v1.69.0

Features
  • api: add get /chat/completions endpoint (e6b8a42)
Bug Fixes
  • audio: correctly parse transcription stream events (16a3a19)
Chores

v1.68.1

Compare Source

Full Changelog: v1.68.1...v1.68.2

Refactors
  • package: rename audio extra to voice_helpers (2dd6cb8)

v1.68.0

Compare Source

Full Changelog: v1.68.0...v1.68.1

Bug Fixes
  • client: remove duplicate types (#​2235) (063f7d0)
  • helpers/audio: remove duplicative module (f253d04)
  • package: make sounddevice and numpy optional dependencies (8b04453)
Chores
  • ci: run workflows on next too (67f89d4)

v1.67.0

Compare Source

Full Changelog: v1.67.0...v1.68.0

Features
  • add audio helpers (423655c)
  • api: new models for TTS, STT, + new audio features for Realtime (#​2232) (ab5192d)

v1.66.5

Compare Source

Full Changelog: v1.66.5...v1.67.0

Features

v1.66.3

Compare Source

Full Changelog: v1.66.3...v1.66.4

Bug Fixes
Chores

v1.66.2

Compare Source

Full Changelog: v1.66.2...v1.66.3

Bug Fixes

v1.66.1

Compare Source

Full Changelog: v1.66.1...v1.66.2

Bug Fixes

v1.66.0

Compare Source

Full Changelog: v1.66.0...v1.66.1

Bug Fixes
Chores
  • internal: temporary commit (afabec1)

v1.65.5

Compare Source

Full Changelog: v1.65.5...v1.66.0

Features
  • api: add /v1/responses and built-in tools (854df97)
Chores

v1.65.4

Compare Source

Full Changelog: v1.65.4...v1.65.5

Chores

v1.65.3

Compare Source

Full Changelog: v1.65.3...v1.65.4

Bug Fixes

v1.65.2

Compare Source

Full Changelog: v1.65.2...v1.65.3

Chores

v1.65.1

Compare Source

Full Changelog: v1.65.1...v1.65.2

Bug Fixes
  • azure: azure_deployment use with realtime + non-deployment-based APIs (#​2154) (5846b55)
Chores

v1.65.0

Compare Source

Full Changelog: v1.65.0...v1.65.1

Documentation

v1.64.0

Compare Source

Full Changelog: v1.64.0...v1.65.0

Features
Chores

v1.63.2

Compare Source

Full Changelog: v1.63.2...v1.64.0

Features
Bug Fixes
  • client: mark some request bodies as optional (4451f56)
Chores

v1.63.1

Compare Source

Full Changelog: v1.63.1...v1.63.2

Chores

v1.63.0

Compare Source

Full Changelog: v1.63.0...v1.63.1

Chores

v1.62.0

Compare Source

Full Changelog: v1.62.0...v1.63.0

Features

v1.61.1

Compare Source

Full Changelog: v1.61.1...v1.62.0

Features
Bug Fixes
Chores

v1.61.0

Compare Source

Full Changelog: v1.61.0...v1.61.1

Bug Fixes
Chores

v1.60.2

Compare Source

Full Changelog: v1.60.2...v1.61.0

Features
Bug Fixes
  • types: correct metadata type + other fixes (12b87a4)
Chores
Documentation

v1.60.1

Compare Source

Full Changelog: v1.60.1...v1.60.2

Bug Fixes
  • parsing: don't validate input tools in the asynchronous .parse() method (6fcfe73)

v1.60.0

Compare Source

Full Changelog: v1.60.0...v1.60.1

Chores
Documentation

v1.59.9

Compare Source

Full Changelog: v1.59.9...v1.60.0

Features
Chores
Documentation
  • readme: mention failed requests in request IDs (5f7c30b)

v1.59.8

Compare Source

Full Changelog: v1.59.8...v1.59.9

Bug Fixes
Chores
Documentation

v1.59.7

Compare Source

Full Changelog: v1.59.7...v1.59.8

Bug Fixes
  • streaming (c16f58e)
  • structured outputs: avoid parsing empty empty content (#​2023) (6d3513c)
  • structured outputs: correct schema coercion for inline ref expansion (#​2025) (2f4f0b3)
  • types: correct type for vector store chunking strategy (#​2017) (e389279)
Chores
Documentation

v1.59.6

Compare Source

Full Changelog: v1.59.6...v1.59.7

Chores
  • export HttpxBinaryResponseContent class (7191b71)

v1.59.5

Compare Source

Full Changelog: v1.59.5...v1.59.6

Bug Fixes
Chores

v1.59.4

Compare Source

Full Changelog: v1.59.4...v1.59.5

Bug Fixes
Documentation

v1.59.3

Compare Source

Full Changelog: v1.59.3...v1.59.4

Chores
Documentation
  • realtime: fix event reference link (9b6885d)

v1.59.2

Compare Source

Full Changelog: v1.59.2...v1.59.3

Chores

v1.58.1

Compare Source

Full Changelog: v1.58.1...v1.59.0

Features
Chores

v1.58.0

Compare Source

Full Changelog: v1.58.0...v1.58.1

Documentation
  • readme: fix example script link (23ba877)

v1.57.4

Compare Source

Full Changelog: v1.57.4...v1.58.0

Features
Bug Fixes
  • add reasoning_effort to all methods (8829c32)
  • assistants: correctly send include query param (9a4c69c)
  • cli/migrate: change grit binaries prefix (#​1951) (1c396c9)
Chores
Documentation
  • add examples + guidance on Realtime API support (1cb00f8)
  • readme: example snippet for client context manager (#​1953) (ad80255)

v1.57.3

Compare Source

Full Changelog: v1.57.3...v1.57.4

Chores

v1.57.2

Compare Source

Full Changelog: v1.57.2...v1.57.3

Chores

v1.57.1

Compare Source

Full Changelog: v1.57.1...v1.57.2

Bug Fixes
Documentation

v1.57.0

Compare Source

Full Changelog: v1.57.0...v1.57.1

Chores

v1.56.2

Compare Source

Full Changelog: v1.56.2...v1.57.0

Features
Chores

v1.56.1

Compare Source

Full Changelog: v1.56.1...v1.56.2

Chores

v1.56.0

Compare Source

Full Changelog: v1.56.0...v1.56.1

Bug Fixes
  • cli: remove usage of httpx proxies (0e9fc3d)
Chores

v1.55.3

Compare Source

Full Changelog: v1.55.3...v1.56.0

Features

v1.55.2

Compare Source

Full Changelog: v1.55.2...v1.55.3

Bug Fixes

v1.55.1

Compare Source

Full Changelog: v1.55.1...v1.55.2

Chores
Documentation

v1.55.0

Compare Source

Full Changelog: v1.55.0...v1.55.1

Bug Fixes
  • pydantic-v1: avoid runtime error for assistants streaming (#​1885) (197c94b)
Chores
Documentation

v1.54.5

Compare Source

Full Changelog: v1.54.5...v1.55.0

Features

v1.54.4

Compare Source

Full Changelog: v1.54.4...v1.54.5

Bug Fixes
  • asyncify: avoid hanging process under certain conditions (#​1853) (3d23437)
Chores

v1.54.3

Compare Source

Full Changelog: v1.54.3...v1.54.4

Bug Fixes
Documentation

v1.54.2

Compare Source

Full Changelog: v1.54.2...v1.54.3

Bug Fixes

v1.54.1

Compare Source

Full Changelog: v1.54.1...v1.54.2

Chores

v1.54.0

Compare Source

Full Changelog: v1.54.0...v1.54.1

Bug Fixes
  • add new prediction param to all methods (6aa424d)

v1.53.1

Compare Source

Full Changelog: v1.53.1...v1.54.0

Features

v1.53.0

Compare Source

Full Changelog: v1.53.0...v1.53.1

Bug Fixes
Chores

v1.52.2

Compare Source

Full Changelog: v1.52.2...v1.53.0

Features
  • api: add new, expressive voices for Realtime and Audio in Chat Completions (7cf0a49)
Chores

v1.52.1

Compare Source

Full Changelog: v1.52.1...v1.52.2

Chores

v1.52.0

Compare Source

Full Changelog: v1.52.0...v1.52.1

Bug Fixes
Chores

v1.51.2

Compare Source

Full Changelog: v1.51.2...v1.52.0

Features
  • api: add gpt-4o-audio-preview model for chat completions (#​1796) (fbf1e0c)

v1.51.1

Compare Source

Full Changelog: v1.51.1...v1.51.2

Chores

v1.51.0

Compare Source

Full Changelog: v1.51.0...v1.51.1

Bug Fixes
  • client: avoid OverflowError with very large retry counts (#​1779) (fb1dacf)
Chores
  • internal: add support for parsing bool response content (#​1774) (aa2e25f)
Documentation

v1.50.2

Compare Source

Full Changelog: v1.50.2...v1.51.0

Features
  • api: support storing chat completions, enabling evals and model distillation in the dashboard (2840c6d)
Chores
Documentation

v1.50.1

Compare Source

Full Changelog: v1.50.1...v1.50.2

Bug Fixes
  • audio: correct types for transcriptions / translations (#​1755) (76c1f3f)

v1.50.0

Compare Source

Full Changelog: v1.50.0...v1.50.1

Documentation

v1.49.0

Compare Source

Full Changelog: v1.49.0...v1.50.0

Features
  • structured outputs: add support for accessing raw responses (#​1748) (0189e28)
Chores
  • pydantic v1: exclude specific properties when rich printing (#​1751) (af535ce)

v1.48.0

Compare Source

Full Changelog: v1.48.0...v1.49.0

Features
Chores

v1.47.1

Compare Source

Full Changelog: v1.47.1...v1.48.0

Features
Bug Fixes
Chores
  • internal: use typing_extensions.overload instead of typing (#​1740) (2522bd5)

v1.47.0

Compare Source

Full Changelog: v1.47.0...v1.47.1

Bug Fixes
  • pydantic v1: avoid warnings error (1e8e7d1)

v1.46.1

Compare Source

Full Changelog: v1.46.1...v1.47.0

Features
  • client: send retry count header (21b0c00)
Chores

v1.46.0

Compare Source

Full Changelog: v1.46.0...v1.46.1

Bug Fixes
Chores

v1.45.1

Compare Source

Full Changelog: v1.45.1...v1.46.0

Features
  • client: add ._request_id property to object responses (#​1707) (8b3da05)
Documentation

v1.45.0

Compare Source

Full Changelog: v1.45.0...v1.45.1

Chores
Documentation

v1.44.1

Compare Source

Full Changelog: v1.44.1...v1.45.0

Features
Bug Fixes
  • types: correctly mark stream discriminator as optional (#​1706) (80f02f9)

v1.44.0

Compare Source

Full Changelog: v1.44.0...v1.44.1

Chores
Documentation

v1.43.1

Compare Source

Full Changelog: v1.43.1...v1.44.0

Features

v1.43.0

Compare Source

Full Changelog: v1.43.0...v1.43.1

Chores

v1.42.0

Compare Source

Full Changelog: v1.42.0...v1.43.0

Features

v1.41.1

Compare Source

Full Changelog: v1.41.1...v1.42.0

Features
Chores

v1.41.0

Compare Source

Full Changelog: v1.41.0...v1.41.1

Bug Fixes
Chores
  • client: fix parsing union responses when non-json is returned (#​1665) (822c37d)

v1.40.8

Compare Source

Full Changelog: v1.40.8...v1.41.0

Features
  • client: add uploads.upload_file helper (aae079d)

v1.40.7

Compare Source

Full Changelog: v1.40.7...v1.40.8

Chores

v1.40.6

Compare Source

Full Changelog: v1.40.6...v1.40.7

Bug Fixes
Chores
  • docs: fix typo in example snippet (4e83b57)
  • internal: use different 32bit detection method (#​1652) (5831af6)

v1.40.5

Compare Source

Full Changelog: v1.40.5...v1.40.6

Chores

v1.40.4

Compare Source

Full Changelog: v1.40.4...v1.40.5

Documentation

v1.40.3

Compare Source

Full Changelog: v1.40.3...v1.40.4

Bug Fixes
  • json schema: unravel $refs alongside additional keys (c7a3d29)
  • json schema: unwrap allOfs with one entry (53d964d)

v1.40.2

Compare Source

Full Changelog: v1.40.2...v1.40.3

Chores

v1.40.1

Compare Source

Full Changelog: v1.40.1...v1.40.2

Bug Fixes
  • client: raise helpful error message for response_format misuse (18191da)
  • json schema: support recursive BaseModels in Pydantic v1 (#​1623) (43e10c0)
Chores

v1.40.0

Compare Source

Full Changelog: v1.40.0...v1.40.1

Chores

v1.39.0

Compare Source

Full Changelog: v1.39.0...v1.40.0

Features
  • api: add structured outputs support (e8dba7d)
Chores

v1.38.0

Compare Source

Full Changelog: v1.38.0...v1.39.0

Features
Bug Fixes
  • assistants: add parallel_tool_calls param to runs.stream (113e82a)
Chores

v1.37.2

Compare Source

Full Changelog: v1.37.2...v1.38.0

Features

v1.37.1

Compare Source

Full Changelog: v1.37.1...v1.37.2

Chores
  • internal: add type construction helper (#​1584) (cbb186a)
  • runs/create_and_poll: add parallel_tool_calls request param (04b3e6c)

v1.37.0

Compare Source

Full Changelog: v1.37.0...v1.37.1

Chores

v1.36.1

Compare Source

Full Changelog: v1.36.1...v1.37.0

Features
Bug Fixes
Documentation

v1.36.0

Compare Source

Full Changelog: v1.36.0...v1.36.1

Bug Fixes
  • types: add gpt-4o-mini to more assistants methods (39a8a37)

v1.35.15

Compare Source

Full Changelog: v1.35.15...v1.36.0

Features

v1.35.14

Compare Source

Full Changelog: v1.35.14...v1.35.15

Chores

v1.35.13

Compare Source

Full Changelog: v1.35.13...v1.35.14

Chores
  • docs: minor update to formatting of API link in README (#​1550) (a6e59c6)
  • internal: minor formatting changes (ee1c62e)
  • internal: minor options / compat functions updates (#​1549) (a0701b5)

v1.35.12

Compare Source

Full Changelog: v1.35.12...v1.35.13

Bug Fixes
  • threads/runs/create_and_run_stream: correct tool_resources param (8effd08)
Chores

v1.35.11

Compare Source

Full Changelog: v1.35.11...v1.35.12

Bug Fixes
  • azure: refresh auth token during retries (#​1533) (287926e)
  • tests: fresh_env() now resets new environment values (64da888)

v1.35.10

Compare Source

Full Changelog: v1.35.10...v1.35.11

Chores

v1.35.9

Compare Source

Full Changelog: v1.35.9...v1.35.10

Chores

v1.35.8

Compare Source

Full Changelog: v1.35.8...v1.35.9

Bug Fixes
  • client: always respect content-type multipart/form-data if provided (#​1519) (6da55e1)
Chores

v1.35.7

Compare Source

Full Changelog: v1.35.7...v1.35.8

Chores

v1.35.6

Compare Source

Full Changelog: v1.35.6...v1.35.7

Bug Fixes

v1.35.5

Compare Source

Full Changelog: v1.35.5...v1.35.6

Documentation

v1.35.4

Compare Source

Full Changelog: v1.35.4...v1.35.5

Bug Fixes
  • cli/migrate: avoid reliance on Python 3.12 argument (be7a06b)

v1.35.3

Compare Source

Full Changelog: v1.35.3...v1.35.4

Bug Fixes
  • docs: fix link to advanced python httpx docs (#​1499) (cf45cd5)
  • temporarily patch upstream version to fix broken release flow (#​1500) (4f10470)
Chores

v1.35.2

Compare Source

Full Changelog: v1.35.2...v1.35.3

Bug Fixes
  • tests: add explicit type annotation (9345f10)

v1.35.1

Compare Source

Full Changelog: v1.35.15...v1.36.0

Features

v1.35.0

Compare Source

Full Changelog: v1.35.0...v1.35.1

Bug Fixes
  • client/async: avoid blocking io call for platform headers (#​1488) (ae64c05)

v1.34.0

Compare Source

Full Changelog: v1.34.0...v1.35.0

Features

v1.33.0

Compare Source

Full Changelog: v1.33.0...v1.34.0

Features

v1.32.1

Compare Source

Full Changelog: v1.32.1...v1.33.0

Features

v1.32.0

Compare Source

Full Changelog: v1.32.0...v1.32.1

Bug Fixes

v1.31.2

Compare Source

Full Changelog: v1.31.2...v1.32.0

Features

v1.31.1

Compare Source

Full Changelog: v1.31.1...v1.31.2

Chores

v1.31.0

Compare Source

Full Changelog: v1.31.0...v1.31.1

Chores

v1.30.5

Compare Source

Full Changelog: v1.30.5...v1.31.0

Features
Chores

v1.30.4

Compare Source

Full Changelog: v1.30.4...v1.30.5

Chores
  • internal: fix lint issue (35a1e80)

v1.30.3

Compare Source

Full Changelog: v1.30.3...v1.30.4

Chores
  • add missing all definitions (7fba60f)
  • internal: fix lint issue (f423cd0)

v1.30.2

Compare Source

Full Changelog: v1.30.2...v1.30.3

Chores
Documentation
  • contributing: update references to rye-up.com (dcc34a2)

v1.30.1

Compare Source

Full Changelog: v1.30.1...v1.30.2

Chores

v1.30.0

Compare Source

Full Changelog: v1.30.0...v1.30.1

Chores

v1.29.0

Compare Source

Full Changelog: v1.29.0...v1.30.0

Features

v1.28.2

Compare Source

Full Changelog: v1.28.2...v1.29.0

Features

v1.28.1

Compare Source

Full Changelog: v1.28.1...v1.28.2

Bug Fixes
Chores

v1.28.0

Compare Source

Full Changelog: v1.28.0...v1.28.1

Chores

v1.27.0

Compare Source

Full Changelog: v1.27.0...v1.28.0

Features

v1.26.0

Compare Source

Full Changelog: v1.26.0...v1.27.0

Features

v1.25.2

Compare Source

Full Changelog: v1.25.2...v1.26.0

Features

v1.25.1

Compare Source

Full Changelog: v1.25.1...v1.25.2

Documentation

v1.25.0

Compare Source

Full Changelog: v1.25.0...v1.25.1

Chores

v1.24.1

Compare Source

Full Changelog: v1.24.1...v1.25.0

Features

v1.24.0

Compare Source

Full Changelog: v1.24.0...v1.24.1

Chores

v1.23.6

Compare Source

Full Changelog: v1.23.6...v1.24.0

Features
Chores

v1.23.5

Compare Source

Full Changelog: v1.23.5...v1.23.6

Chores

v1.23.4

Compare Source

Full Changelog: v1.23.4...v1.23.5

Chores

v1.23.3

Compare Source

Full Changelog: v1.23.3...v1.23.4

Bug Fixes
Chores

v1.23.2

Compare Source

Full Changelog: v1.23.2...v1.23.3

Chores

v1.23.1

Compare Source

Full Changelog: v1.23.1...v1.23.2

Bug Fixes

v1.23.0

Compare Source

Full Changelog: v1.23.0...v1.23.1

Bug Fixes

v1.22.0

Compare Source

Full Changelog: v1.22.0...v1.23.0

Features
Documentation

v1.21.2

Compare Source

Full Changelog: v1.21.2...v1.22.0

Features
Chores

v1.21.1

Compare Source

Full Changelog: v1.21.1...v1.21.2

Chores

v1.21.0

Compare Source

Full Changelog: v1.21.0...v1.21.1

Chores

v1.20.0

Compare Source

Full Changelog: v1.20.0...v1.21.0

Features

v1.19.0

Compare Source

Full Changelog: v1.19.0...v1.20.0

Features

v1.18.0

Compare Source

Full Changelog: v1.18.0...v1.19.0

Features

v1.17.1

Compare Source

Full Changelog: v1.17.1...v1.18.0

Features

v1.17.0

Compare Source

Full Changelog: v1.17.0...v1.17.1

Chores

v1.16.2

Compare Source

Full Changelog: v1.16.2...v1.17.0

Features

v1.16.1

Compare Source

Full Changelog: v1.16.1...v1.16.2

Bug Fixes
  • client: correct logic for line decoding in streaming (#​1293) (687caef)

v1.16.0

Compare Source

Full Changelog: v1.16.0...v1.16.1

Chores

v1.14.3

Compare Source

Full Changelog: v1.14.3...v1.15.0

Features
Bug Fixes
Chores
Documentation

v1.14.2

Compare Source

Full Changelog: v1.14.2...v1.14.3

Bug Fixes
Chores
Documentation

v1.14.1

Compare Source

Full Changelog: v1.14.1...v1.14.2

Performance Improvements
Chores
Documentation

v1.14.0

Compare Source

Full Changelog: v1.14.0...v1.14.1

Documentation

v1.13.4

Compare Source

Full Changelog: v1.13.4...v1.14.0

Features

v1.13.3

Compare Source

Full Changelog: v1.13.3...v1.13.4

Bug Fixes
Chores
Documentation

v1.12.0

Compare Source

Full Changelog: v1.12.0...v1.13.0

Features
Bug Fixes
Chores

v1.11.1

Compare Source

Full Changelog: v1.11.1...v1.12.0

Features
Bug Fixes
  • remove double brackets from timestamp_granularities param (#​1140) (3db0222)
  • types: loosen most List params types to Iterable (#​1129) (bdb31a3)
Chores
Documentation

v1.11.0

Compare Source

Full Changelog: v1.11.0...v1.11.1

Bug Fixes
  • prevent crash when platform.architecture() is not allowed (#​1120) (9490554)

v1.10.0

Compare Source

Full Changelog: v1.10.0...v1.11.0

Features
Chores

v1.9.0

Compare Source

Full Changelog: v1.9.0...v1.10.0

Features
Chores
Refactors

v1.8.0

Compare Source

Full Changelog: v1.8.0...v1.9.0

Features
Chores

v1.7.2

Compare Source

Full Changelog: v1.7.2...v1.8.0

Features
Bug Fixes
Chores

v1.7.1

Compare Source

Full Changelog: v1.7.1...v1.7.2

Documentation
Refactors

v1.7.0

Compare Source

Full Changelog: v1.7.0...v1.7.1

Chores

v1.6.1

Compare Source

Full Changelog: v1.6.1...v1.7.0

Features
  • add None default value to nullable response properties (#​1043) (d94b4d3)
Bug Fixes
Chores
Documentation

v1.6.0

Compare Source

Full Changelog: v1.6.0...v1.6.1

Chores

v1.5.0

Compare Source

Full Changelog: v1.5.0...v1.6.0

Features
Chores
Documentation

v1.4.0

Compare Source

Full Changelog: v1.4.0...v1.5.0

Features
Chores

v1.3.9

Compare Source

Full Changelog: v1.3.9...v1.4.0

Features

v1.3.8

Compare Source

Full Changelog: v1.3.8...v1.3.9

Documentation
Refactors

v1.3.7

Compare Source

Full Changelog: v1.3.7...v1.3.8

Bug Fixes
Chores
Documentation

v1.3.6

Compare Source

Full Changelog: v1.3.6...v1.3.7

Bug Fixes
Chores
Documentation
pytest-dev/pytest (pytest)

v9.0.3

Compare Source

pytest 9.0.3 (2026-04-07)

Bug fixes

  • #​12444: Fixed pytest.approx which now correctly takes into account ~collections.abc.Mapping keys order to compare them.

  • #​13634: Blocking a conftest.py file using the -p no: option is now explicitly disallowed.

    Previously this resulted in an internal assertion failure during plugin loading.

    Pytest now raises a clear UsageError explaining that conftest files are not plugins and cannot be disabled via -p.

  • #​13734: Fixed crash when a test raises an exceptiongroup with __tracebackhide__ = True.

  • #​14195: Fixed an issue where non-string messages passed to unittest.TestCase.subTest() were not printed.

  • #​14343: Fixed use of insecure temporary directory (CVE-2025-71176).

Improved documentation

  • #​13388: Clarified documentation for -p vs PYTEST_PLUGINS plugin loading and fixed an incorrect -p example.
  • #​13731: Clarified that capture fixtures (e.g. capsys and capfd) take precedence over the -s / --capture=no command-line options in Accessing captured output from a test function <accessing-captured-output>.
  • #​14088: Clarified that the default pytest_collection hook sets session.items before it calls pytest_collection_finish, not after.
  • #​14255: TOML integer log levels must be quoted: Updating reference documentation.

Contributor-facing changes

  • #​12689: The test reports are now published to Codecov from GitHub Actions. The test statistics is visible on the web interface.

    -- by aleguy02

v9.0.2

Compare Source

pytest 9.0.2 (2025-12-06)

Bug fixes

  • #​13896: The terminal progress feature added in pytest 9.0.0 has been disabled by default, except on Windows, due to compatibility issues with some terminal emulators.

    You may enable it again by passing -p terminalprogress. We may enable it by default again once compatibility improves in the future.

    Additionally, when the environment variable TERM is dumb, the escape codes are no longer emitted, even if the plugin is enabled.

  • #​13904: Fixed the TOML type of the tmp_path_retention_count settings in the API reference from number to string.

  • #​13946: The private config.inicfg attribute was changed in a breaking manner in pytest 9.0.0. Due to its usage in the ecosystem, it is now restored to working order using a compatibility shim. It will be deprecated in pytest 9.1 and removed in pytest 10.

  • #​13965: Fixed quadratic-time behavior when handling unittest subtests in Python 3.10.

Improved documentation

  • #​4492: The API Reference now contains cross-reference-able documentation of pytest's command-line flags <command-line-flags>.

v9.0.1

Compare Source

pytest 9.0.1 (2025-11-12)

Bug fixes

  • #​13895: Restore support for skipping tests via raise unittest.SkipTest.
  • #​13896: The terminal progress plugin added in pytest 9.0 is now automatically disabled when iTerm2 is detected, it generated desktop notifications instead of the desired functionality.
  • #​13904: Fixed the TOML type of the verbosity settings in the API reference from number to string.
  • #​13910: Fixed UserWarning: Do not expect file_or_dir on some earlier Python 3.12 and 3.13 point versions.

Packaging updates and notes for downstreams

  • #​13933: The tox configuration has been adjusted to make sure the desired version string can be passed into its package_env through the SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST environment variable as a part of the release process -- by webknjaz.

Contributor-facing changes

  • #​13891, #​13942: The CI/CD part of the release automation is now capable of creating GitHub Releases without having a Git checkout on disk -- by bluetech and webknjaz.
  • #​13933: The tox configuration has been adjusted to make sure the desired version string can be passed into its package_env through the SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST environment variable as a part of the release process -- by webknjaz.

v9.0.0

Compare Source

pytest 9.0.0 (2025-11-05)

New features

  • #​1367: Support for subtests has been added.

    subtests <subtests> are an alternative to parametrization, useful in situations where the parametrization values are not all known at collection time.

    Example:

    def contains_docstring(p: Path) -> bool:
        """Return True if the given Python file contains a top-level docstring."""
        ...
    
    def test_py_files_contain_docstring(subtests: pytest.Subtests) -> None:
        for path in Path.cwd().glob("*.py"):
            with subtests.test(path=str(path)):
                assert contains_docstring(path)

    Each assert failure or error is caught by the context manager and reported individually, giving a clear picture of all files that are missing a docstring.

    In addition, unittest.TestCase.subTest is now also supported.

    This feature was originally implemented as a separate plugin in pytest-subtests, but since then has been merged into the core.

    [!NOTE] This feature is experimental and will likely evolve in future releases. By that we mean that we might change how subtests are reported on failure, but the functionality and how to use it are stable.

  • #​13743: Added support for native TOML configuration files.

    While pytest, since version 6, supports configuration in pyproject.toml files under [tool.pytest.ini_options], it does so in an "INI compatibility mode", where all configuration values are treated as strings or list of strings. Now, pytest supports the native TOML data model.

    In pyproject.toml, the native TOML configuration is under the [tool.pytest] table.

    # pyproject.toml
    [tool.pytest]
    minversion = "9.0"
    addopts = ["-ra", "-q"]
    testpaths = [
        "tests",
        "integration",
    ]

    The [tool.pytest.ini_options] table remains supported, but both tables cannot be used at the same time.

    If you prefer to use a separate configuration file, or don't use pyproject.toml, you can use pytest.toml or .pytest.toml:

    # pytest.toml or .pytest.toml
    [pytest]
    minversion = "9.0"
    addopts = ["-ra", "-q"]
    testpaths = [
        "tests",
        "integration",
    ]

    The documentation now (sometimes) shows configuration snippets in both TOML and INI formats, in a tabbed interface.

    See config file formats for full details.

  • #​13823: Added a "strict mode" enabled by the strict configuration option.

    When set to true, the strict option currently enables

    • strict_config
    • strict_markers
    • strict_parametrization_ids
    • strict_xfail

    The individual strictness options can be explicitly set to override the global strict setting.

    The previously-deprecated --strict command-line flag now enables strict mode.

    If pytest adds new strictness options in the future, they will also be enabled in strict mode. Therefore, you should only enable strict mode if you use a pinned/locked version of pytest, or if you want to proactively adopt new strictness options as they are added.

    See strict mode for more details.

  • #​13737: Added the strict_parametrization_ids configuration option.

    When set, pytest emits an error if it detects non-unique parameter set IDs, rather than automatically making the IDs unique by adding 0, 1, ... to them. This can be particularly useful for catching unintended duplicates.

  • #​13072: Added support for displaying test session progress in the terminal tab using the OSC 9;4; ANSI sequence. When pytest runs in a supported terminal emulator like ConEmu, Gnome Terminal, Ptyxis, Windows Terminal, Kitty or Ghostty, you'll see the progress in the terminal tab or window, allowing you to monitor pytest's progress at a glance.

    This feature is automatically enabled when running in a TTY. It is implemented as an internal plugin. If needed, it can be disabled as follows:

    • On a user level, using -p no:terminalprogress on the command line or via an environment variable PYTEST_ADDOPTS='-p no:terminalprogress'.
    • On a project configuration level, using addopts = "-p no:terminalprogress".
  • #​478: Support PEP420 (implicit namespace packages) as --pyargs target when consider_namespace_packages is true in the config.

    Previously, this option only impacted package imports, now it also impacts tests discovery.

  • #​13678: Added a new faulthandler_exit_on_timeout configuration option set to "false" by default to let faulthandler interrupt the pytest process after a timeout in case of deadlock.

    Previously, a faulthandler timeout would only dump the traceback of all threads to stderr, but would not interrupt the pytest process.

    -- by ogrisel.

  • #​13829: Added support for configuration option aliases via the aliases parameter in Parser.addini() <pytest.Parser.addini>.

    Plugins can now register alternative names for configuration options, allowing for more flexibility in configuration naming and supporting backward compatibility when renaming options. The canonical name always takes precedence if both the canonical name and an alias are specified in the configuration file.

Improvements in existing functionality

  • #​13330: Having pytest configuration spread over more than one file (for example having both a pytest.ini file and pyproject.toml with a [tool.pytest.ini_options] table) will now print a warning to make it clearer to the user that only one of them is actually used.

    -- by sgaist

  • #​13574: The single argument --version no longer loads the entire plugin infrastructure, making it faster and more reliable when displaying only the pytest version.

    Passing --version twice (e.g., pytest --version --version) retains the original behavior, showing both the pytest version and plugin information.

    [!NOTE] Since --version is now processed early, it only takes effect when passed directly via the command line. It will not work if set through other mechanisms, such as PYTEST_ADDOPTS or addopts.

  • #​13823: Added strict_xfail as an alias to the xfail_strict option, strict_config as an alias to the --strict-config flag, and strict_markers as an alias to the --strict-markers flag. This makes all strictness options consistently have configuration options with the prefix strict_.

  • #​13700: --junitxml no longer prints the generated xml file summary at the end of the pytest session when --quiet is given.

  • #​13732: Previously, when filtering warnings, pytest would fail if the filter referenced a class that could not be imported. Now, this only outputs a message indicating the problem.

  • #​13859: Clarify the error message for pytest.raises() when a regex match fails.

  • #​13861: Better sentence structure in a test's expected error message. Previously, the error message would be "expected exception must be <expected>, but got <actual>". Now, it is "Expected <expected>, but got <actual>".

Removals and backward incompatible breaking changes

  • #​12083: Fixed a bug where an invocation such as pytest a/ a/b would cause only tests from a/b to run, and not other tests under a/.

    The fix entails a few breaking changes to how such overlapping arguments and duplicates are handled:

    1. pytest a/b a/ or pytest a/ a/b are equivalent to pytest a; if an argument overlaps another arguments, only the prefix remains.
    2. pytest x.py x.py is equivalent to pytest x.py; previously such an invocation was taken as an explicit request to run the tests from the file twice.

    If you rely on these behaviors, consider using --keep-duplicates <duplicate-paths>, which retains its existing behavior (including the bug).

  • #​13719: Support for Python 3.9 is dropped following its end of life.

  • #​13766: Previously, pytest would assume it was running in a CI/CD environment if either of the environment variables CI</span> or <span class="title-ref">BUILD_NUMBER was defined; now, CI mode is only activated if at least one of those variables is defined and set to a non-empty value.

  • #​13779: PytestRemovedIn9Warning deprecation warnings are now errors by default.

    Following our plan to remove deprecated features with as little disruption as possible, all warnings of type PytestRemovedIn9Warning now generate errors instead of warning messages by default.

    The affected features will be effectively removed in pytest 9.1, so please consult the deprecations section in the docs for directions on how to update existing code.

    In the pytest 9.0.X series, it is possible to change the errors back into warnings as a stopgap measure by adding this to your pytest.ini file:

    [pytest]
    filterwarnings =
        ignore::pytest.PytestRemovedIn9Warning

    But this will stop working when pytest 9.1 is released.

    If you have concerns about the removal of a specific feature, please add a comment to 13779.

Deprecations (removal in next major release)

  • #​13807: monkeypatch.syspath_prepend() <pytest.MonkeyPatch.syspath_prepend> now issues a deprecation warning when the prepended path contains legacy namespace packages (those using pkg_resources.declare_namespace()). Users should migrate to native namespace packages (420). See monkeypatch-fixup-namespace-packages for details.

Bug fixes

  • #​13445: Made the type annotations of pytest.skip and friends more spec-complaint to have them work across more type checkers.

  • #​13537: Fixed a bug in which ExceptionGroup with only Skipped exceptions in teardown was not handled correctly and showed as error.

  • #​13598: Fixed possible collection confusion on Windows when short paths and symlinks are involved.

  • #​13716: Fixed a bug where a nonsensical invocation like pytest x.py[a] (a file cannot be parametrized) was silently treated as pytest x.py. This is now a usage error.

  • #​13722: Fixed a misleading assertion failure message when using pytest.approx on mappings with differing lengths.

  • #​13773: Fixed the static fixture closure calculation to properly consider transitive dependencies requested by overridden fixtures.

  • #​13816: Fixed pytest.approx which now returns a clearer error message when comparing mappings with different keys.

  • #​13849: Hidden .pytest.ini files are now picked up as the config file even if empty. This was an inconsistency with non-hidden pytest.ini.

  • #​13865: Fixed --show-capture with --tb=line.

  • #​13522: Fixed pytester in subprocess mode ignored all :attr`pytester.plugins <pytest.Pytester.plugins>` except the first.

    Fixed pytester in subprocess mode silently ignored non-str pytester.plugins <pytest.Pytester.plugins>. Now it errors instead. If you are affected by this, specify the plugin by name, or switch the affected tests to use pytester.runpytest_inprocess <pytest.Pytester.runpytest_inprocess> explicitly instead.

Packaging updates and notes for downstreams

  • #​13791: Minimum requirements on iniconfig and packaging were bumped to 1.0.1 and 22.0.0, respectively.

Contributor-facing changes

  • #​12244: Fixed self-test failures when TERM=dumb.
  • #​12474: Added scheduled GitHub Action Workflow to run Sphinx linkchecks in repo documentation.
  • #​13621: pytest's own testsuite now handles the lsof command hanging (e.g. due to unreachable network filesystems), with the affected selftests being skipped after 10 seconds.
  • #​13638: Fixed deprecated gh pr new command in scripts/prepare-release-pr.py. The script now uses gh pr create which is compatible with GitHub CLI v2.0+.
  • #​13695: Flush stdout and stderr in Pytester.run to avoid truncated outputs in test_faulthandler.py::test_timeout on CI -- by ogrisel.
  • #​13771: Skip test_do_not_collect_symlink_siblings on Windows environments without symlink support to avoid false negatives.
  • #​13841: tox>=4 is now required when contributing to pytest.
  • #​13625: Added missing docstrings to pytest_addoption(), pytest_configure(), and cacheshow() functions in cacheprovider.py.

Miscellaneous internal changes

  • #​13830: Configuration overrides (-o/--override-ini) are now processed during startup rather than during config.getini() <pytest.Config.getini>.

v8.4.2

Compare Source

pytest 8.4.2 (2025-09-03)

Bug fixes

  • #​13478: Fixed a crash when using console_output_style{.interpreted-text role="confval"} with times and a module is skipped.

  • #​13530: Fixed a crash when using pytest.approx{.interpreted-text role="func"} and decimal.Decimal{.interpreted-text role="class"} instances with the decimal.FloatOperation{.interpreted-text role="class"} trap set.

  • #​13549: No longer evaluate type annotations in Python 3.14 when inspecting function signatures.

    This prevents crashes during module collection when modules do not explicitly use from __future__ import annotations and import types for annotations within a if TYPE_CHECKING: block.

  • #​13559: Added missing [int]{.title-ref} and [float]{.title-ref} variants to the [Literal]{.title-ref} type annotation of the [type]{.title-ref} parameter in pytest.Parser.addini{.interpreted-text role="meth"}.

  • #​13563: pytest.approx{.interpreted-text role="func"} now only imports numpy if NumPy is already in sys.modules. This fixes unconditional import behavior introduced in [8.4.0]{.title-ref}.

Improved documentation

  • #​13577: Clarify that pytest_generate_tests is discovered in test modules/classes; other hooks must be in conftest.py or plugins.

Contributor-facing changes

  • #​13480: Self-testing: fixed a few test failures when run with -Wdefault or a similar override.
  • #​13547: Self-testing: corrected expected message for test_doctest_unexpected_exception in Python 3.14.
  • #​13684: Make pytest's own testsuite insensitive to the presence of the CI environment variable -- by ogrisel{.interpreted-text role="user"}.

v8.4.1

Compare Source

pytest 8.4.1 (2025-06-17)

Bug fixes

  • #​13461: Corrected _pytest.terminal.TerminalReporter.isatty to support being called as a method. Before it was just a boolean which could break correct code when using -o log_cli=true).

  • #​13477: Reintroduced pytest.PytestReturnNotNoneWarning{.interpreted-text role="class"} which was removed by accident in pytest [8.4]{.title-ref}.

    This warning is raised when a test functions returns a value other than None, which is often a mistake made by beginners.

    See return-not-none{.interpreted-text role="ref"} for more information.

  • #​13497: Fixed compatibility with Twisted 25+.

Improved documentation

  • #​13492: Fixed outdated warning about faulthandler not working on Windows.

v8.4.0

Compare Source

pytest 8.4.0 (2025-06-02)

Removals and backward incompatible breaking changes

  • #​11372: Async tests will now fail, instead of warning+skipping, if you don't have any suitable plugin installed.

  • #​12346: Tests will now fail, instead of raising a warning, if they return any value other than None.

  • #​12874: We dropped support for Python 3.8 following its end of life (2024-10-07).

  • #​12960: Test functions containing a yield now cause an explicit error. They have not been run since pytest 4.0, and were previously marked as an expected failure and deprecation warning.

    See the docs <yield tests deprecated>{.interpreted-text role="ref"} for more information.

Deprecations (removal in next major release)

  • #​10839: Requesting an asynchronous fixture without a [pytest_fixture_setup]{.title-ref} hook that resolves it will now give a DeprecationWarning. This most commonly happens if a sync test requests an async fixture. This should have no effect on a majority of users with async tests or fixtures using async pytest plugins, but may affect non-standard hook setups or autouse=True. For guidance on how to work around this warning see sync-test-async-fixture{.interpreted-text role="ref"}.

New features

  • #​11538: Added pytest.RaisesGroup{.interpreted-text role="class"} as an equivalent to pytest.raises{.interpreted-text role="func"} for expecting ExceptionGroup{.interpreted-text role="exc"}. Also adds pytest.RaisesExc{.interpreted-text role="class"} which is now the logic behind pytest.raises{.interpreted-text role="func"} and used as parameter to pytest.RaisesGroup{.interpreted-text role="class"}. RaisesGroup includes the ability to specify multiple different expected exceptions, the structure of nested exception groups, and flags for emulating except* <except_star>{.interpreted-text role="ref"}. See assert-matching-exception-groups{.interpreted-text role="ref"} and docstrings for more information.

  • #​12081: Added capteesys{.interpreted-text role="fixture"} to capture AND pass output to next handler set by --capture=.

  • #​12504: pytest.mark.xfail{.interpreted-text role="func"} now accepts pytest.RaisesGroup{.interpreted-text role="class"} for the raises parameter when you expect an exception group. You can also pass a pytest.RaisesExc{.interpreted-text role="class"} if you e.g. want to make use of the check parameter.

  • #​12713: New [--force-short-summary]{.title-ref} option to force condensed summary output regardless of verbosity level.

    This lets users still see condensed summary output of failures for quick reference in log files from job outputs, being especially useful if non-condensed output is very verbose.

  • #​12749: pytest traditionally collects classes/functions in the test module namespace even if they are imported from another file.

    For example:

    # contents of src/domain.py
    class Testament: ...
    
    # contents of tests/test_testament.py
    from domain import Testament
    
    def test_testament(): ...

    In this scenario with the default options, pytest will collect the class [Testament]{.title-ref} from [tests/test_testament.py]{.title-ref} because it starts with [Test]{.title-ref}, even though in this case it is a production class being imported in the test module namespace.

    This behavior can now be prevented by setting the new collect_imported_tests{.interpreted-text role="confval"} configuration option to false, which will make pytest collect classes/functions from test files only if they are defined in that file.

    -- by FreerGit{.interpreted-text role="user"}

  • #​12765: Thresholds to trigger snippet truncation can now be set with truncation_limit_lines{.interpreted-text role="confval"} and truncation_limit_chars{.interpreted-text role="confval"}.

    See truncation-params{.interpreted-text role="ref"} for more information.

  • #​13125: console_output_style{.interpreted-text role="confval"} now supports times to show execution time of each test.

  • #​13192: pytest.raises{.interpreted-text role="func"} will now raise a warning when passing an empty string to match, as this will match against any value. Use match="^$" if you want to check that an exception has no message.

  • #​13192: pytest.raises{.interpreted-text role="func"} will now print a helpful string diff if matching fails and the match parameter has ^ and $ and is otherwise escaped.

  • #​13192: You can now pass with pytest.raises(check=fn): <pytest.raises>{.interpreted-text role="func"}, where fn is a function which takes a raised exception and returns a boolean. The raises fails if no exception was raised (as usual), passes if an exception is raised and fn returns True (as well as match and the type matching, if specified, which are checked before), and propagates the exception if fn returns False (which likely also fails the test).

  • #​13228: hidden-param{.interpreted-text role="ref"} can now be used in id of pytest.param{.interpreted-text role="func"} or in ids of Metafunc.parametrize <pytest.Metafunc.parametrize>{.interpreted-text role="py:func"}. It hides the parameter set from the test name.

  • #​13253: New flag: --disable-plugin-autoload <disable_plugin_autoload>{.interpreted-text role="ref"} which works as an alternative to PYTEST_DISABLE_PLUGIN_AUTOLOAD{.interpreted-text role="envvar"} when setting environment variables is inconvenient; and allows setting it in config files with addopts{.interpreted-text role="confval"}.

Improvements in existing functionality

  • #​10224: pytest's short and long traceback styles (how-to-modifying-python-tb-printing{.interpreted-text role="ref"}) now have partial 657{.interpreted-text role="pep"} support and will show specific code segments in the traceback.

    ================================= FAILURES =================================
    _______________________ test_gets_correct_tracebacks _______________________
    
    test_tracebacks.py:12: in test_gets_correct_tracebacks
        assert manhattan_distance(p1, p2) == 1
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
    test_tracebacks.py:6: in manhattan_distance
        return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y)
                               ^^^^^^^^^
    E   AttributeError: 'NoneType' object has no attribute 'x'

    -- by ammaraskar{.interpreted-text role="user"}

  • #​11118: Now pythonpath{.interpreted-text role="confval"} configures [$PYTHONPATH]{.title-ref} earlier than before during the initialization process, which now also affects plugins loaded via the [-p]{.title-ref} command-line option.

    -- by millerdev{.interpreted-text role="user"}

  • #​11381: The type parameter of the parser.addini method now accepts ["int"]{.title-ref} and "float" parameters, facilitating the parsing of configuration values in the configuration file.

    Example:

    def pytest_addoption(parser):
        parser.addini("int_value", type="int", default=2, help="my int value")
        parser.addini("float_value", type="float", default=4.2, help="my float value")

    The [pytest.ini]{.title-ref} file:

    [pytest]
    int_value = 3
    float_value = 5.4
  • #​11525: Fixtures are now clearly represented in the output as a "fixture object", not as a normal function as before, making it easy for beginners to catch mistakes such as referencing a fixture declared in the same module but not requested in the test function.

    -- by the-compiler{.interpreted-text role="user"} and glyphack{.interpreted-text role="user"}

  • #​12426: A warning is now issued when pytest.mark.usefixtures ref{.interpreted-text role="ref"} is used without specifying any fixtures. Previously, empty usefixtures markers were silently ignored.

  • #​12707: Exception chains can be navigated when dropped into Pdb in Python 3.13+.

  • #​12736: Added a new attribute [name]{.title-ref} with the fixed value ["pytest tests"]{.title-ref} to the root tag [testsuites]{.title-ref} of the junit-xml generated by pytest.

    This attribute is part of many junit-xml specifications and is even part of the [junit-10.xsd]{.title-ref} specification that pytest's implementation is based on.

  • #​12943: If a test fails with an exceptiongroup with a single exception, the contained exception will now be displayed in the short test summary info.

  • #​12958: A number of unraisable <unraisable>{.interpreted-text role="ref"} enhancements:

    • Set the unraisable hook as early as possible and unset it as late as possible, to collect the most possible number of unraisable exceptions.
    • Call the garbage collector just before unsetting the unraisable hook, to collect any straggling exceptions.
    • Collect multiple unraisable exceptions per test phase.
    • Report the tracemalloc{.interpreted-text role="mod"} allocation traceback (if available).
    • Avoid using a generator based hook to allow handling StopIteration{.interpreted-text role="class"} in test failures.
    • Report the unraisable exception as the cause of the pytest.PytestUnraisableExceptionWarning{.interpreted-text role="class"} exception if raised.
    • Compute the repr of the unraisable object in the unraisable hook so you get the latest information if available, and should help with resurrection of the object.
  • #​13010: pytest.approx{.interpreted-text role="func"} now can compare collections that contain numbers and non-numbers mixed.

  • #​13016: A number of threadexception <unraisable>{.interpreted-text role="ref"} enhancements:

    • Set the excepthook as early as possible and unset it as late as possible, to collect the most possible number of unhandled exceptions from threads.
    • Collect multiple thread exceptions per test phase.
    • Report the tracemalloc{.interpreted-text role="mod"} allocation traceback (if available).
    • Avoid using a generator based hook to allow handling StopIteration{.interpreted-text role="class"} in test failures.
    • Report the thread exception as the cause of the pytest.PytestUnhandledThreadExceptionWarning{.interpreted-text role="class"} exception if raised.
    • Extract the name of the thread object in the excepthook which should help with resurrection of the thread.
  • #​13031: An empty parameter set as in pytest.mark.parametrize([], ids=idfunc) will no longer trigger a call to idfunc with internal objects.

  • #​13115: Allows supplying ExceptionGroup[Exception] and BaseExceptionGroup[BaseException] to pytest.raises to keep full typing on ExceptionInfo <pytest.ExceptionInfo>{.interpreted-text role="class"}:

    with pytest.raises(ExceptionGroup[Exception]) as exc_info:
        some_function()

    Parametrizing with other exception types remains an error - we do not check the types of child exceptions and thus do not permit code that might look like we do.

  • #​13122: The --stepwise mode received a number of improvements:

    • It no longer forgets the last failed test in case pytest is executed later without the flag.

      This enables the following workflow:

      1. Execute pytest with --stepwise, pytest then stops at the first failing test;
      2. Iteratively update the code and run the test in isolation, without the --stepwise flag (for example in an IDE), until it is fixed.
      3. Execute pytest with --stepwise again and pytest will continue from the previously failed test, and if it passes, continue on to the next tests.

      Previously, at step 3, pytest would start from the beginning, forgetting the previously failed test.

      This change however might cause issues if the --stepwise mode is used far apart in time, as the state might get stale, so the internal state will be reset automatically in case the test suite changes (for now only the number of tests are considered for this, we might change/improve this on the future).

    • New --stepwise-reset/--sw-reset flag, allowing the user to explicitly reset the stepwise state and restart the workflow from the beginning.

  • #​13308: Added official support for Python 3.14.

  • #​13380: Fix ExceptionGroup{.interpreted-text role="class"} traceback filtering to exclude pytest internals.

  • #​13415: The author metadata of the BibTex example is now correctly formatted with last names following first names. An example of BibLaTex has been added. BibTex and BibLaTex examples now clearly indicate that what is cited is software.

    -- by willynilly{.interpreted-text role="user"}

  • #​13420: Improved test collection performance by optimizing path resolution used in FSCollector.

  • #​13457: The error message about duplicate parametrization no longer displays an internal stack trace.

  • #​4112: Using pytest.mark.usefixtures <pytest.mark.usefixtures ref>{.interpreted-text role="ref"} on pytest.param{.interpreted-text role="func"} now produces an error instead of silently doing nothing.

  • #​5473: Replace [:]{.title-ref} with [;]{.title-ref} in the assertion rewrite warning message so it can be filtered using standard Python warning filters before calling pytest.main{.interpreted-text role="func"}.

[#&#8203;6985](https://github.com/pytest-dev/pytest/issues/6985): Improved `pytest.approx`{.interpreted-text role="func"} to enhance the readability of value ranges and tolerances between 0.001 and 1000.
:   -   The [repr]{.title-ref} method now provides clearer output for values within those ranges, making it easier to interpret the results.

    -   Previously, the output for those ranges of values and tolerances was displayed in scientific notation (e.g., [42 ± 1.0e+00]{.title-ref}). The updated method now presents the tolerance as a decimal for better readability (e.g., [42 ± 1]{.title-ref}).

        Example:

        **Previous Output:**

        ``` console
        >>> pytest.approx(42, abs=1)
        42 ± 1.0e+00
        ```

        **Current Output:**

        ``` console
        >>> pytest.approx(42, abs=1)
        42 ± 1
        ```

    \-- by `fazeelghafoor`{.interpreted-text role="user"}
  • #​7683: The formerly optional pygments dependency is now required, causing output always to be source-highlighted (unless disabled via the --code-highlight=no CLI option).

Bug fixes

  • #​10404: Apply filterwarnings from config/cli as soon as possible, and revert them as late as possible so that warnings as errors are collected throughout the pytest run and before the unraisable and threadexcept hooks are removed.

    This allows very late warnings and unraisable/threadexcept exceptions to fail the test suite.

    This also changes the warning that the lsof plugin issues from PytestWarning to the new warning PytestFDWarning so it can be more easily filtered.

  • #​11067: The test report is now consistent regardless if the test xfailed via pytest.mark.xfail <pytest.mark.xfail ref>{.interpreted-text role="ref"} or pytest.fail{.interpreted-text role="func"}.

    Previously, xfailed tests via the marker would have the string "reason: " prefixed to the message, while those xfailed via the function did not. The prefix has been removed.

  • #​12008: In 11220{.interpreted-text role="pr"}, an unintended change in reordering was introduced by changing the way indices were assigned to direct params. More specifically, before that change, the indices of direct params to metafunc's callspecs were assigned after all parametrizations took place. Now, that change is reverted.

  • #​12863: Fix applying markers, including pytest.mark.parametrize <pytest.mark.parametrize ref>{.interpreted-text role="ref"} when placed above [@​staticmethod]{.title-ref} or [@​classmethod]{.title-ref}.

  • #​12929: Handle StopIteration from test cases, setup and teardown correctly.

  • #​12938: Fixed --durations-min argument not respected if -vv is used.

  • #​12946: Fixed missing help for pdb{.interpreted-text role="mod"} commands wrapped by pytest -- by adamchainz{.interpreted-text role="user"}.

  • #​12981: Prevent exceptions in pytest.Config.add_cleanup{.interpreted-text role="func"} callbacks preventing further cleanups.

  • #​13047: Restore pytest.approx{.interpreted-text role="func"} handling of equality checks between [bool]{.title-ref} and [numpy.bool_]{.title-ref} types.

    Comparing [bool]{.title-ref} and [numpy.bool_]{.title-ref} using pytest.approx{.interpreted-text role="func"} accidentally changed in version [8.3.4]{.title-ref} and [8.3.5]{.title-ref} to no longer match:

    >>> import numpy as np
    >>> from pytest import approx
    >>> [np.True_, np.True_] == pytest.approx([True, True])
    False

    This has now been fixed:

    >>> [np.True_, np.True_] == pytest.approx([True, True])
    True
  • #​13119: Improved handling of invalid regex patterns for filter warnings by providing a clear error message.

  • #​13175: The diff is now also highlighted correctly when comparing two strings.

  • #​13248: Fixed an issue where passing a scope in Metafunc.parametrize <pytest.Metafunc.parametrize>{.interpreted-text role="py:func"} with indirect=True could result in other fixtures being unable to depend on the parametrized fixture.

  • #​13291: Fixed repr of attrs objects in assertion failure messages when using attrs>=25.2.

  • #​13312: Fixed a possible KeyError crash on PyPy during collection of tests involving higher-scoped parameters.

  • #​13345: Fix type hints for pytest.TestReport.when{.interpreted-text role="attr"} and pytest.TestReport.location{.interpreted-text role="attr"}.

  • #​13377: Fixed handling of test methods with positional-only parameter syntax.

    Now, methods are supported that formally define self as positional-only and/or fixture parameters as keyword-only, e.g.:

    class TestClass:
    
        def test_method(self, /, *, fixture): ...

    Before, this caused an internal error in pytest.

  • #​13384: Fixed an issue where pytest could report negative durations.

  • #​13420: Added lru_cache to nodes._check_initialpaths_for_relpath.

  • #​9037: Honor disable_test_id_escaping_and_forfeit_all_rights_to_community_support{.interpreted-text role="confval"} when escaping ids in parametrized tests.

Improved documentation

  • #​12535: [This example]{.title-ref}<https://docs.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures> showed print statements that do not exactly reflect what the different branches actually do. The fix makes the example more precise.

  • #​13218: Pointed out in the pytest.approx{.interpreted-text role="func"} documentation that it considers booleans unequal to numeric zero or one.

  • #​13221: Improved grouping of CLI options in the --help output.

  • #​6649: Added ~pytest.TerminalReporter{.interpreted-text role="class"} to the api-reference{.interpreted-text role="ref"} documentation page.

  • #​8612: Add a recipe for handling abstract test classes in the documentation.

    A new example has been added to the documentation to demonstrate how to use a mixin class to handle abstract test classes without manually setting the __test__ attribute for subclasses. This ensures that subclasses of abstract test classes are automatically collected by pytest.

Packaging updates and notes for downstreams

  • #​13317: Specified minimum allowed versions of colorama, iniconfig, and packaging; and bumped the minimum allowed version of exceptiongroup for python_version<'3.11' from a release candidate to a full release.

Contributor-facing changes

  • #​12017: Mixed internal improvements:

    • Migrate formatting to f-strings in some tests.
    • Use type-safe constructs in JUnitXML tests.
    • MovedMockTiming into _pytest.timing.

    -- by RonnyPfannschmidt{.interpreted-text role="user"}

  • #​12647: Fixed running the test suite with the hypothesis pytest plugin.

Miscellaneous internal changes

  • #​6649: Added ~pytest.TerminalReporter{.interpreted-text role="class"} to the public pytest API, as it is part of the signature of the pytest_terminal_summary{.interpreted-text role="hook"} hook.

v8.3.5

Compare Source

pytest 8.3.5 (2025-03-02)

Bug fixes

  • #​11777: Fixed issue where sequences were still being shortened even with -vv verbosity.
  • #​12888: Fixed broken input when using Python 3.13+ and a libedit build of Python, such as on macOS or with uv-managed Python binaries from the python-build-standalone project. This could manifest e.g. by a broken prompt when using Pdb, or seeing empty inputs with manual usage of input() and suspended capturing.
  • #​13026: Fixed AttributeError{.interpreted-text role="class"} crash when using --import-mode=importlib when top-level directory same name as another module of the standard library.
  • #​13053: Fixed a regression in pytest 8.3.4 where, when using --import-mode=importlib, a directory containing py file with the same name would cause an ImportError
  • #​13083: Fixed issue where pytest could crash if one of the collected directories got removed during collection.

Improved documentation

  • #​12842: Added dedicated page about using types with pytest.

    See types{.interpreted-text role="ref"} for detailed usage.

Contributor-facing changes

  • #​13112: Fixed selftest failures in test_terminal.py with Pygments >= 2.19.0
  • #​13256: Support for Towncrier versions released in 2024 has been re-enabled when building Sphinx docs -- by webknjaz{.interpreted-text role="user"}.

v8.3.4

Compare Source

pytest 8.3.4 (2024-12-01)

Bug fixes

  • #​12592: Fixed KeyError{.interpreted-text role="class"} crash when using --import-mode=importlib in a directory layout where a directory contains a child directory with the same name.

  • #​12818: Assertion rewriting now preserves the source ranges of the original instructions, making it play well with tools that deal with the AST, like executing.

  • #​12849: ANSI escape codes for colored output now handled correctly in pytest.fail{.interpreted-text role="func"} with [pytrace=False]{.title-ref}.

  • #​9353: pytest.approx{.interpreted-text role="func"} now uses strict equality when given booleans.

Improved documentation

  • #​10558: Fix ambiguous docstring of pytest.Config.getoption{.interpreted-text role="func"}.

  • #​10829: Improve documentation on the current handling of the --basetemp option and its lack of retention functionality (temporary directory location and retention{.interpreted-text role="ref"}).

  • #​12866: Improved cross-references concerning the recwarn{.interpreted-text role="fixture"} fixture.

  • #​12966: Clarify filterwarnings{.interpreted-text role="ref"} docs on filter precedence/order when using multiple @pytest.mark.filterwarnings <pytest.mark.filterwarnings ref>{.interpreted-text role="ref"} marks.

Contributor-facing changes

  • #​12497: Fixed two failing pdb-related tests on Python 3.13.

v8.3.3

Compare Source

pytest 8.3.3 (2024-09-09)

Bug fixes

  • #​12446: Avoid calling @property (and other instance descriptors) during fixture discovery -- by asottile{.interpreted-text role="user"}

  • #​12659: Fixed the issue of not displaying assertion failure differences when using the parameter --import-mode=importlib in pytest>=8.1.

  • #​12667: Fixed a regression where type change in [ExceptionInfo.errisinstance]{.title-ref} caused [mypy]{.title-ref} to fail.

  • #​12744: Fixed typing compatibility with Python 3.9 or less -- replaced [typing.Self]{.title-ref} with [typing_extensions.Self]{.title-ref} -- by Avasam{.interpreted-text role="user"}

  • #​12745: Fixed an issue with backslashes being incorrectly converted in nodeid paths on Windows, ensuring consistent path handling across environments.

  • #​6682: Fixed bug where the verbosity levels where not being respected when printing the "msg" part of failed assertion (as in assert condition, msg).

  • #​9422: Fix bug where disabling the terminal plugin via -p no:terminal would cause crashes related to missing the verbose option.

    -- by GTowers1{.interpreted-text role="user"}

Improved documentation

  • #​12663: Clarify that the [pytest_deselected]{.title-ref} hook should be called from [pytest_collection_modifyitems]{.title-ref} hook implementations when items are deselected.
  • #​12678: Remove erroneous quotes from [tmp_path_retention_policy]{.title-ref} example in docs.

Miscellaneous internal changes

  • #​12769: Fix typos discovered by codespell and add codespell to pre-commit hooks.

v8.3.2

Compare Source

pytest 8.3.2 (2024-07-24)

Bug fixes

  • #​12652: Resolve regression [conda]{.title-ref} environments where no longer being automatically detected.

    -- by RonnyPfannschmidt{.interpreted-text role="user"}

v8.3.1

Compare Source

pytest 8.3.1 (2024-07-20)

The 8.3.0 release failed to include the change notes and docs for the release. This patch release remedies this. There are no other changes.

v8.3.0

Compare Source

pytest 8.3.0 (2024-07-20)

New features

  • #​12231: Added [--xfail-tb]{.title-ref} flag, which turns on traceback output for XFAIL results.

    • If the [--xfail-tb]{.title-ref} flag is not given, tracebacks for XFAIL results are NOT shown.
    • The style of traceback for XFAIL is set with [--tb]{.title-ref}, and can be [auto|long|short|line|native|no]{.title-ref}.
    • Note: Even if you have [--xfail-tb]{.title-ref} set, you won't see them if [--tb=no]{.title-ref}.

    Some history:

    With pytest 8.0, [-rx]{.title-ref} or [-ra]{.title-ref} would not only turn on summary reports for xfail, but also report the tracebacks for xfail results. This caused issues with some projects that utilize xfail, but don't want to see all of the xfail tracebacks.

    This change detaches xfail tracebacks from [-rx]{.title-ref}, and now we turn on xfail tracebacks with [--xfail-tb]{.title-ref}. With this, the default [-rx]{.title-ref}/ [-ra]{.title-ref} behavior is identical to pre-8.0 with respect to xfail tracebacks. While this is a behavior change, it brings default behavior back to pre-8.0.0 behavior, which ultimately was considered the better course of action.

  • #​12281: Added support for keyword matching in marker expressions.

    Now tests can be selected by marker keyword arguments. Supported values are int{.interpreted-text role="class"}, (unescaped) str{.interpreted-text role="class"}, bool{.interpreted-text role="class"} & None{.interpreted-text role="data"}.

    See marker examples <marker_keyword_expression_example>{.interpreted-text role="ref"} for more information.

    -- by lovetheguitar{.interpreted-text role="user"}

  • #​12567: Added --no-fold-skipped command line option.

    If this option is set, then skipped tests in short summary are no longer grouped by reason but all tests are printed individually with their nodeid in the same way as other statuses.

    -- by pbrezina{.interpreted-text role="user"}

Improvements in existing functionality

  • #​12469: The console output now uses the "third-party plugins" terminology, replacing the previously established but confusing and outdated reference to setuptools <setuptools:index>{.interpreted-text role="std:doc"} -- by webknjaz{.interpreted-text role="user"}.

  • #​12544, #​12545: Python virtual environment detection was improved by checking for a pyvenv.cfg{.interpreted-text role="file"} file, ensuring reliable detection on various platforms -- by zachsnickers{.interpreted-text role="user"}.

  • #​2871: Do not truncate arguments to functions in output when running with [-vvv]{.title-ref}.

  • #​389: The readability of assertion introspection of bound methods has been enhanced -- by farbodahm{.interpreted-text role="user"}, webknjaz{.interpreted-text role="user"}, obestwalter{.interpreted-text role="user"}, flub{.interpreted-text role="user"} and glyphack{.interpreted-text role="user"}.

    Earlier, it was like:

    =================================== FAILURES ===================================
    _____________________________________ test _____________________________________
    
        def test():
    >       assert Help().fun() == 2
    E       assert 1 == 2
    E        +  where 1 = <bound method Help.fun of <example.Help instance at 0x256a830>>()
    E        +    where <bound method Help.fun of <example.Help instance at 0x256a830>> = <example.Help instance at 0x256a830>.fun
    E        +      where <example.Help instance at 0x256a830> = Help()
    
    example.py:7: AssertionError
    =========================== 1 failed in 0.03 seconds ===========================

    And now it's like:

    =================================== FAILURES ===================================
    _____________________________________ test _____________________________________
    
        def test():
    >       assert Help().fun() == 2
    E       assert 1 == 2
    E        +  where 1 = fun()
    E        +    where fun = <test_local.Help object at 0x1074be230>.fun
    E        +      where <test_local.Help object at 0x1074be230> = Help()
    
    test_local.py:13: AssertionError
    =========================== 1 failed in 0.03 seconds ===========================
  • #​7662: Added timezone information to the testsuite timestamp in the JUnit XML report.

Bug fixes

  • #​11706: Fixed reporting of teardown errors in higher-scoped fixtures when using [--maxfail]{.title-ref} or [--stepwise]{.title-ref}.

    Originally added in pytest 8.0.0, but reverted in 8.0.2 due to a regression in pytest-xdist. This regression was fixed in pytest-xdist 3.6.1.

  • #​11797: pytest.approx{.interpreted-text role="func"} now correctly handles Sequence <collections.abc.Sequence>{.interpreted-text role="class"}-like objects.

  • #​12204, #​12264: Fixed a regression in pytest 8.0 where tracebacks get longer and longer when multiple tests fail due to a shared higher-scope fixture which raised -- by bluetech{.interpreted-text role="user"}.

    Also fixed a similar regression in pytest 5.4 for collectors which raise during setup.

    The fix necessitated internal changes which may affect some plugins:

    • FixtureDef.cached_result[2] is now a tuple (exc, tb) instead of exc.
    • SetupState.stack failures are now a tuple (exc, tb) instead of exc.
  • #​12275: Fixed collection error upon encountering an abstract <abc>{.interpreted-text role="mod"} class, including abstract [unittest.TestCase]{.title-ref} subclasses.

  • #​12328: Fixed a regression in pytest 8.0.0 where package-scoped parameterized items were not correctly reordered to minimize setups/teardowns in some cases.

  • #​12424: Fixed crash with [assert testcase is not None]{.title-ref} assertion failure when re-running unittest tests using plugins like pytest-rerunfailures. Regressed in 8.2.2.

  • #​12472: Fixed a crash when returning category "error" or "failed" with a custom test status from pytest_report_teststatus{.interpreted-text role="hook"} hook -- pbrezina{.interpreted-text role="user"}.

  • #​12505: Improved handling of invalid regex patterns in pytest.raises(match=r'...') <pytest.raises>{.interpreted-text role="func"} by providing a clear error message.

  • #​12580: Fixed a crash when using the cache class on Windows and the cache directory was created concurrently.

  • #​6962: Parametrization parameters are now compared using [==]{.title-ref} instead of [is]{.title-ref} ([is]{.title-ref} is still used as a fallback if the parameter does not support [==]{.title-ref}). This fixes use of parameters such as lists, which have a different [id]{.title-ref} but compare equal, causing fixtures to be re-computed instead of being cached.

  • #​7166: Fixed progress percentages (the [ 87%] at the edge of the screen) sometimes not aligning correctly when running with pytest-xdist -n.

Improved documentation

  • #​12153: Documented using PYTEST_VERSION{.interpreted-text role="envvar"} to detect if code is running from within a pytest run.

  • #​12469: The external plugin mentions in the documentation now avoid mentioning setuptools entry-points <setuptools:index>{.interpreted-text role="std:doc"} as the concept is much more generic nowadays. Instead, the terminology of "external", "installed", or "third-party" plugins (or packages) replaces that.

    -- by webknjaz{.interpreted-text role="user"}

  • #​12577: [CI]{.title-ref} and [BUILD_NUMBER]{.title-ref} environment variables role is discribed in the reference doc. They now also appear when doing [pytest -h]{.title-ref} -- by MarcBresson{.interpreted-text role="user"}.

Contributor-facing changes

  • #​12467: Migrated all internal type-annotations to the python3.10+ style by using the [annotations]{.title-ref} future import.

    -- by RonnyPfannschmidt{.interpreted-text role="user"}

  • #​11771, #​12557: The PyPy runtime version has been updated to 3.9 from 3.8 that introduced a flaky bug at the garbage collector which was not expected to fix there as the 3.8 is EoL.

    -- by x612skm{.interpreted-text role="user"}

  • #​12493: The change log draft preview integration has been refactored to use a third party extension sphinxcontib-towncrier. The previous in-repo script was putting the change log preview file at doc/en/_changelog_towncrier_draft.rst{.interpreted-text role="file"}. Said file is no longer ignored in Git and might show up among untracked files in the development environments of the contributors. To address that, the contributors can run the following command that will clean it up:

    $ git clean -x -i -- doc/en/_changelog_towncrier_draft.rst

    -- by webknjaz{.interpreted-text role="user"}

  • #​12498: All the undocumented tox environments now have descriptions. They can be listed in one's development environment by invoking tox -av in a terminal.

    -- by webknjaz{.interpreted-text role="user"}

  • #​12501: The changelog configuration has been updated to introduce more accurate audience-tailored categories. Previously, there was a trivial change log fragment type with an unclear and broad meaning. It was removed and we now have contrib, misc and packaging in place of it.

    The new change note types target the readers who are downstream packagers and project contributors. Additionally, the miscellaneous section is kept for unspecified updates that do not fit anywhere else.

    -- by webknjaz{.interpreted-text role="user"}

  • #​12502: The UX of the GitHub automation making pull requests to update the plugin list has been updated. Previously, the maintainers had to close the automatically created pull requests and re-open them to trigger the CI runs. From now on, they only need to click the [Ready for review]{.title-ref} button instead.

    -- by webknjaz{.interpreted-text role="user"}

  • #​12522: The :pull: RST role has been replaced with a shorter :pr: due to starting to use the implementation from the third-party sphinx-issues{.interpreted-text role="pypi"} Sphinx extension -- by webknjaz{.interpreted-text role="user"}.

  • #​12531: The coverage reporting configuration has been updated to exclude pytest's own tests marked as expected to fail from the coverage report. This has an effect of reducing the influence of flaky tests on the resulting number.

    -- by webknjaz{.interpreted-text role="user"}

  • #​12533: The extlinks Sphinx extension is no longer enabled. The :bpo: role it used to declare has been removed with that. BPO itself has migrated to GitHub some years ago and it is possible to link the respective issues by using their GitHub issue numbers and the :issue: role that the sphinx-issues extension implements.

    -- by webknjaz{.interpreted-text role="user"}

  • #​12562: Possible typos in using the :user: RST role is now being linted through the pre-commit tool integration -- by webknjaz{.interpreted-text role="user"}.

v8.2.2

Compare Source

pytest 8.2.2 (2024-06-04)

Bug Fixes

  • #​12355: Fix possible catastrophic performance slowdown on a certain parametrization pattern involving many higher-scoped parameters.
  • #​12367: Fix a regression in pytest 8.2.0 where unittest class instances (a fresh one is created for each test) were not released promptly on test teardown but only on session teardown.
  • #​12381: Fix possible "Directory not empty" crashes arising from concurent cache dir (.pytest_cache) creation. Regressed in pytest 8.2.0.

Improved Documentation

  • #​12290: Updated Sphinx theme to use Furo instead of Flask, enabling Dark mode theme.
  • #​12356: Added a subsection to the documentation for debugging flaky tests to mention lack of thread safety in pytest as a possible source of flakyness.
  • #​12363: The documentation webpages now links to a canonical version to reduce outdated documentation in search engine results.

v8.2.1

Compare Source

pytest 8.2.1 (2024-05-19)

Improvements

  • #​12334: Support for Python 3.13 (beta1 at the time of writing).

Bug Fixes

  • #​12120: Fix [PermissionError]{.title-ref} crashes arising from directories which are not selected on the command-line.
  • #​12191: Keyboard interrupts and system exits are now properly handled during the test collection.
  • #​12300: Fixed handling of 'Function not implemented' error under squashfuse_ll, which is a different way to say that the mountpoint is read-only.
  • #​12308: Fix a regression in pytest 8.2.0 where the permissions of automatically-created .pytest_cache directories became rwx------ instead of the expected rwxr-xr-x.

Trivial/Internal Changes

  • #​12333: pytest releases are now attested using the recent Artifact Attestation support from GitHub, allowing users to verify the provenance of pytest's sdist and wheel artifacts.

v8.2.0

Compare Source

pytest 8.2.0 (2024-04-27)

Deprecations

  • #​12069: A deprecation warning is now raised when implementations of one of the following hooks request a deprecated py.path.local parameter instead of the pathlib.Path parameter which replaced it:

    • pytest_ignore_collect{.interpreted-text role="hook"} - the path parameter - use collection_path instead.
    • pytest_collect_file{.interpreted-text role="hook"} - the path parameter - use file_path instead.
    • pytest_pycollect_makemodule{.interpreted-text role="hook"} - the path parameter - use module_path instead.
    • pytest_report_header{.interpreted-text role="hook"} - the startdir parameter - use start_path instead.
    • pytest_report_collectionfinish{.interpreted-text role="hook"} - the startdir parameter - use start_path instead.

    The replacement parameters are available since pytest 7.0.0. The old parameters will be removed in pytest 9.0.0.

    See legacy-path-hooks-deprecated{.interpreted-text role="ref"} for more details.

Features

  • #​11871: Added support for reading command line arguments from a file using the prefix character @, like e.g.: pytest @&#8203;tests.txt. The file must have one argument per line.

    See Read arguments from file <args-from-file>{.interpreted-text role="ref"} for details.

Improvements

  • #​11523: pytest.importorskip{.interpreted-text role="func"} will now issue a warning if the module could be found, but raised ImportError{.interpreted-text role="class"} instead of ModuleNotFoundError{.interpreted-text role="class"}.

    The warning can be suppressed by passing exc_type=ImportError to pytest.importorskip{.interpreted-text role="func"}.

    See import-or-skip-import-error{.interpreted-text role="ref"} for details.

  • #​11728: For unittest-based tests, exceptions during class cleanup (as raised by functions registered with TestCase.addClassCleanup <unittest.TestCase.addClassCleanup>{.interpreted-text role="meth"}) are now reported instead of silently failing.

  • #​11777: Text is no longer truncated in the short test summary info section when -vv is given.

  • #​12112: Improved namespace packages detection when consider_namespace_packages{.interpreted-text role="confval"} is enabled, covering more situations (like editable installs).

  • #​9502: Added PYTEST_VERSION{.interpreted-text role="envvar"} environment variable which is defined at the start of the pytest session and undefined afterwards. It contains the value of pytest.__version__, and among other things can be used to easily check if code is running from within a pytest run.

Bug Fixes

  • #​12065: Fixed a regression in pytest 8.0.0 where test classes containing setup_method and tests using @staticmethod or @classmethod would crash with AttributeError: 'NoneType' object has no attribute 'setup_method'.

    Now the request.instance <pytest.FixtureRequest.instance>{.interpreted-text role="attr"} attribute of tests using @staticmethod and @classmethod is no longer None, but a fresh instance of the class, like in non-static methods. Previously it was None, and all fixtures of such tests would share a single self.

  • #​12135: Fixed issue where fixtures adding their finalizer multiple times to fixtures they request would cause unreliable and non-intuitive teardown ordering in some instances.

  • #​12194: Fixed a bug with --importmode=importlib and --doctest-modules where child modules did not appear as attributes in parent modules.

  • #​1489: Fixed some instances where teardown of higher-scoped fixtures was not happening in the reverse order they were initialized in.

Trivial/Internal Changes

  • #​12069: pluggy>=1.5.0 is now required.
  • #​12167: cache <cache>{.interpreted-text role="ref"}: create supporting files (CACHEDIR.TAG, .gitignore, etc.) in a temporary directory to provide atomic semantics.

v8.1.2

Compare Source

pytest 8.1.2 (2024-04-26)

Bug Fixes

  • #​12114: Fixed error in pytest.approx{.interpreted-text role="func"} when used with [numpy]{.title-ref} arrays and comparing with other types.
sysid/sse-starlette (sse-starlette)

v3.4.4

Compare Source

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.4.3...v3.4.4

v3.4.3

Compare Source

What's Changed

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.4.2...v3.4.3

v3.4.2

Compare Source

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.4.1...v3.4.2

v3.4.1

Compare Source

What's Changed

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.3.4...v3.4.1

v3.3.4

Compare Source

What's Changed

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.3.3...v3.3.4

v3.3.3

Compare Source

What's Changed

Full Changelog: https://github.com/sysid/sse-starlette/compare/v0.0.0...v3.3.3

v3.3.2

Compare Source

What's Changed

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.3.1...v3.3.2

v3.3.1

Compare Source

What's Changed

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.3.0...v3.3.1

v3.3.0

What's Changed

  • feat: expose shutdown event for cooperative generator shutdown (#​167)

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.2.0...v3.3.0

v3.2.0

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.1.2...v3.2.0

v3.1.2

Compare Source

What's Changed

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.1.1...v3.1.2

v3.1.1

Compare Source

What's Changed

  • fix(shutdown): detect uvicorn shutdown via signal handler introspection by @​sysid in #​151

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.1.0...v3.1.1

v3.1.0

Compare Source

What's Changed

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.0.4...v3.1.0

v3.0.4

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.0.3...v3.0.4

v3.0.3

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.0.2...v3.0.3

v3.0.2

Compare Source

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.0.1...v3.0.2

v3.0.1

Compare Source

Full Changelog: https://github.com/sysid/sse-starlette/compare/v3.0.0...v3.0.1

v3.0.0

Compare Source

What's New in v3.0.0

No breaking changes expected.

Major Thread Safety Improvements

  • Multi-Threading Support: SSE now works correctly in multi-threaded applications
  • Multi-Loop Support: Full compatibility with multiple asyncio event loops
  • Automatic Test Isolation: No more manual state resets needed in tests
  • Context-Local Events: Replaced global state with context-aware event management

Development Experience

  • Modern APIs: Updated to Starlette's lifespan parameter (no more deprecation warnings)
  • Clean Testing: Improved pytest configuration and dependency management

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.4.1...v3.0.0

v2.4.1

Compare Source

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.4.0...v2.4.1

v2.4.0

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.3.6...v2.4.0

v2.3.6

Compare Source

What's Changed

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.3.5...v2.3.6

v2.3.5

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.3.0...v2.3.5

v2.3.4

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.3.3...v2.3.4

v2.3.3

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.2.1...v2.3.3

v2.3.2

Compare Source

v2.2.1

Compare Source

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.2.0...v2.2.1

v2.2.0

Compare Source

What's Changed

  • chore (docs): Add documentation note and example about thread safety by @​msukmanowsky in #​112
  • chore(deps): bump codecov/codecov-action from 4 to 5 by @​dependabot in #​115
  • Include workaround for pytest SSE errors in README.md by @​arnoan in #​118
  • refactoring of tests
  • make uvicorn dependency optional

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.1.3...v2.2.0

v2.1.3

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.1.0...v2.1.3

v2.1.2

Compare Source

What's Changed

New Contributors

Full Changelog: https://github.com/sysid/sse-starlette/compare/v2.1.0...v2.1.2


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This MR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Edited by Guilherme Carraro Martins

Merge request reports

Loading