Skip to content

chore(deps-dev): bump mypy from 1.17 to 2.3.1 - #3747

Merged
jbeckwith-oai merged 3 commits into
mainfrom
dependabot/uv/mypy-2.3.1
Aug 27, 2026
Merged

chore(deps-dev): bump mypy from 1.17 to 2.3.1#3747
jbeckwith-oai merged 3 commits into
mainfrom
dependabot/uv/mypy-2.3.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 27, 2026

Copy link
Copy Markdown
Contributor

Bumps mypy from 1.17 to 2.3.1.

Changelog

Sourced from mypy's changelog.

Mypy 2.3.1

  • Fix mypyc crash on double yielding Iterators (Daniël van Noord, PR 21826)
  • Fix mypyc default_factory for inherited dataclass (Daniël van Noord, PR 21785)
  • Clear mypyc coroutine env on coroutine completion (Piotr Sawicki, PR 21734)
  • Fix crash when unpacking return value from overload (Shantanu, PR 21830)

Acknowledgements

Thanks to all mypy contributors who contributed to this release:

  • Agriya Khetarpal
  • Ethan Sarp
  • Ivan Levkivskyi
  • Jingchen Ye
  • Jukka Lehtosalo
  • Piotr Sawicki
  • Shantanu
  • Tom Bannink
  • Viktor Szépe
  • ygale

I'd also like to thank my employer, Dropbox, for supporting mypy development.

Mypy 2.2

We've just uploaded mypy 2.2.0 to the Python Package Index (PyPI). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:

python3 -m pip install -U mypy

You can read the full documentation for this release on Read the Docs.

Support for Closed TypedDicts (PEP 728)

Mypy now supports closed TypedDicts as specified in PEP 728. A closed TypedDict cannot have extra keys beyond those explicitly defined. This allows the type checker to determine that certain operations are safe when they otherwise wouldn't be due to the potential presence of unknown keys.

You can use the closed keyword argument with TypedDict:

HasName = TypedDict("HasName", {"name": str})
HasOnlyName = TypedDict("HasOnlyName", {"name": str}, closed=True)
Movie = TypedDict("Movie", {"name": str, "year": int})
movie: Movie = {"name": "Nimona", "year": 2023}
has_name: HasName = movie  # OK: HasName is open (default)
has_only_name: HasOnlyName = movie  # Error: HasOnlyName is closed and Movie has extra "year" key
</tr></table>

... (truncated)

Commits
  • d642c44 Bump version to 2.3.1
  • a392429 [mypyc] Fix crash on double yielding Iterators (#21826)
  • 4843e77 [mypyc] Fix default_factory for inherited dataclass (#21785)
  • 14f5df9 [mypyc] Clear coroutine env on coroutine completion (#21734)
  • 6dfa06d Fix crash when unpacking return value from overload (#21830)
  • a385746 Bump version to 2.3.1+dev
  • 8aabf84 Drop +dev from version
  • 4d8ad2a Update changelog for 2.3 release (#21728)
  • 2c21546 [mypyc] Update documentation of race conditions under free threading (#21726)
  • a9f62a3 [mypyc] Make attribute access memory safe on free-threaded builds (#21705)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [mypy](https://github.com/python/mypy) from 1.17 to 2.3.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](python/mypy@v1.17.0...v2.3.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-version: 2.3.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Aug 27, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner August 27, 2026 16:05
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Aug 27, 2026
@openai-sdks

openai-sdks Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 9.769s for Python SDK PR #3747.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 148ms
tests/chat-completions-create.test.ts ✅ Passed 192ms
tests/chat-completions-stream.test.ts ✅ Passed 112ms
tests/files-content-binary.test.ts ✅ Passed 208ms
tests/files-create-multipart.test.ts ✅ Passed 222ms
tests/files-list-pagination.test.ts ✅ Passed 124ms
tests/initialize-config.test.ts ✅ Passed 130ms
tests/instance-isolation.test.ts ✅ Passed 132ms
tests/models-list.test.ts ✅ Passed 208ms
tests/responses-background-lifecycle.test.ts ✅ Passed 200ms
tests/responses-body-method-errors.test.ts ✅ Passed 282ms
tests/responses-cancel-timeout.test.ts ✅ Passed 194ms
tests/responses-cancel.test.ts ✅ Passed 247ms
tests/responses-compact-retries.test.ts ✅ Passed 259ms
tests/responses-compact.test.ts ✅ Passed 268ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 109ms
tests/responses-create-advanced.test.ts ✅ Passed 199ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.14s
tests/responses-create-errors.test.ts ✅ Passed 191ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 117ms
tests/responses-create-retries.test.ts ✅ Passed 444ms
tests/responses-create-stream-failures.test.ts ✅ Passed 118ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 211ms
tests/responses-create-stream-wire.test.ts ✅ Passed 3.086s
tests/responses-create-stream.test.ts ✅ Passed 80ms
tests/responses-create-terminal-states.test.ts ✅ Passed 208ms
tests/responses-create-timeout.test.ts ✅ Passed 220ms
tests/responses-create.test.ts ✅ Passed 208ms
tests/responses-delete.test.ts ✅ Passed 170ms
tests/responses-input-items-errors.test.ts ✅ Passed 344ms
tests/responses-input-items-list.test.ts ✅ Passed 248ms
tests/responses-input-items-options.test.ts ✅ Passed 340ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 207ms
tests/responses-input-tokens-count.test.ts ✅ Passed 252ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.325s
tests/responses-not-found-errors.test.ts ✅ Passed 219ms
tests/responses-parse.test.ts ✅ Passed 319ms
tests/responses-retrieve-retries.test.ts ✅ Passed 206ms
tests/responses-retrieve.test.ts ✅ Passed 210ms
tests/responses-stored-method-errors.test.ts ✅ Passed 496ms
tests/retry-behavior.test.ts ✅ Passed 3.178s
tests/sdk-error-shape.test.ts ✅ Passed 237ms

View OkTest run #33120949330

SDK merge (0fb248c0e012) · head (2cf13d9c2773) · base (a36010dbb5d9) · OkTest (2b1bdfd25e98)

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

34 mixed files remain; 0 existing customizations changed.

Compared a36010dbb5d92cf13d9c2773. Generated baselines verified.

34 existing customizations unchanged
  • api.md
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/openai/init.py
  • src/openai/_client.py
  • src/openai/resources/audio/transcriptions.py
  • src/openai/resources/audio/translations.py
  • src/openai/resources/beta/beta.py
  • src/openai/resources/beta/responses/responses.py
  • src/openai/resources/beta/threads/runs/runs.py
  • src/openai/resources/beta/threads/threads.py
  • src/openai/resources/chat/completions/completions.py
  • src/openai/resources/embeddings.py
  • src/openai/resources/files.py
  • src/openai/resources/realtime/realtime.py
  • src/openai/resources/responses/responses.py
  • src/openai/resources/uploads/uploads.py
  • src/openai/resources/vector_stores/file_batches.py
  • src/openai/resources/vector_stores/files.py
  • src/openai/resources/videos.py
  • src/openai/resources/webhooks/init.py
  • src/openai/resources/webhooks/webhooks.py
  • src/openai/types/chat/init.py
  • src/openai/types/chat/chat_completion_message_tool_call.py
  • src/openai/types/fine_tuning/fine_tuning_job_integration.py
  • src/openai/types/responses/init.py
  • src/openai/types/responses/response.py
  • src/openai/types/responses/response_function_web_search.py
  • src/openai/types/responses/response_function_web_search_param.py
  • src/openai/types/responses/tool.py
  • src/openai/types/responses/tool_param.py
  • src/openai/types/webhooks/init.py
  • tests/api_resources/test_videos.py

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 33120979461 --repo openai/openai-python \
  --name castiron-custom-code-33120979461-1 --dir /tmp/castiron-custom-code-33120979461-1
git apply --stat /tmp/castiron-custom-code-33120979461-1/custom-code.patch
cat /tmp/castiron-custom-code-33120979461-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin a36010dbb5d9c15a1fdf780772bc0204d0acf138 2cf13d9c2773338f988d66134d1b52bb50b4f11b
python3 scripts/castiron/custom_code_report.py report \
  --base a36010dbb5d9c15a1fdf780772bc0204d0acf138 \
  --head 2cf13d9c2773338f988d66134d1b52bb50b4f11b --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-2cf13d9c2773
cat /tmp/castiron-custom-code-2cf13d9c2773/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1b3e1e9dd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread uv.lock Outdated
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-27T22:05:56.605492Z 2cf13d9 New commits
🔒 Security Review Completed 2026-08-27T22:06:01.350548Z 2cf13d9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after two consecutive clean independent adversarial-review rounds and supply-chain/compatibility verification. mypy remains development-only; Python >=3.10, runtime package metadata, public APIs, public-PyPI SHA-256 artifact provenance, release automation, and typed file-upload imports are preserved. Required lint, build, breaking-change, Python 3.10/3.14, HTTPX2, CodeQL, Python-policy, and both Castiron checks are green.

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Aug 27, 2026
Merged via the queue into main with commit 0b52c9e Aug 27, 2026
26 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the dependabot/uv/mypy-2.3.1 branch August 27, 2026 22:20
@openai-sdks openai-sdks Bot mentioned this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant