Skip to content

Upgrade Python dev tooling (mypy 2, ruff 0.17, pytest-asyncio 1) - #28

Merged
johanngan merged 1 commit into
mainfrom
johanngan/python-dev-deps
Nov 12, 2026
Merged

johanngan merged 1 commit into
mainfrom
johanngan/python-dev-deps

Conversation

@johanngan

Copy link
Copy Markdown
Contributor

What was changed

Bump dev dependencies in modal_function and the Python package template:

  • mypy ~=2.4 (was <2)
  • ruff ~=0.17.2 (was <0.16)
  • pytest-asyncio ~=1.0 (was <0.22, a pin inherited from sdk-python that the template's tests don't need)
  • basedpyright ~=1.40 (floor relaxed slightly from 1.40.2)
  • pydocstyle, pytest-xdist: same ranges, spelled with ~=

mypy 2 infers the async-generator yield type in _run_configure as object, so cast it to AsyncGenerator[None, None] before wrapping it in asynccontextmanager.

Why?

This should fix the nightly failures. And while we're here, we may as well clean up/update the dependency versions before the first modal_function release.

Checklist

  1. How was this tested:
    Had Claude test the different deps configurations (lowest, locked, latest) locally, and it should be clear from CI/future nightly runs whether this works.

Bump dev dependencies in modal_function and the Python package template:
- mypy ~=2.4 (was <2)
- ruff ~=0.17.2 (was <0.16)
- pytest-asyncio ~=1.0 (was <0.22, a pin inherited from sdk-python that
  the template's tests don't need)
- basedpyright ~=1.40 (floor relaxed slightly from 1.40.2)
- pydocstyle, pytest-xdist: same ranges, spelled with ~=

mypy 2 infers the async-generator yield type in _run_configure as object,
so cast it to AsyncGenerator[None, None] before wrapping it in
asynccontextmanager.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@johanngan
johanngan requested review from a team and harish-narayanappa-10 November 12, 2026 19:01
@johanngan
johanngan added this pull request to stack #30 November 12, 2026 19:03
@johanngan johanngan mentioned this pull request Nov 12, 2026
@johanngan
johanngan merged commit 80971b4 into main Nov 12, 2026
16 checks passed
@johanngan
johanngan deleted the johanngan/python-dev-deps branch November 12, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants