Repository navigation
Conversation
Python 3.10 reaches end of life in October 2026. Raise requires-python to >=3.11, target py311 in ruff, drop 3.10 from the CI unit matrix, and remove the pre-3.11 fallbacks for asyncio.create_task(context=...) and typing.NotRequired. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
|
@claude review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Claude Code Review
No review was started: this request came from a bot account. Manual reviews can only be requested by someone with write access to this repository. Ask a maintainer to comment @claude review, or have your automation post the comment from a user account with write access.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18a7f21cbe
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
LGTM, straightforward minimum-Python-version bump.
What was reviewed: the pyproject.toml/ruff/CI matrix/AGENTS.md version bumps for consistency (all now 3.11+), the removal of the _ASYNCIO_CREATE_TASK_SUPPORTS_CONTEXT fallback and typing_extensions.NotRequired fallback in favor of direct 3.11+ APIs, and the corresponding test cleanup (removed skipif markers and the now-dead fallback test). The asyncio.iscoroutinefunction to inspect.iscoroutinefunction swap in observe.py was already investigated by the bug hunter as a candidate and ruled out as a duplicate.
Extended reasoning...
The diff is a mechanical minimum-Python-version bump (3.10 to 3.11) touching pyproject.toml, CI config, AGENTS.md docs, uv.lock, and two source files (observe.py, types.py) plus matching test removals; no security-sensitive surface (auth, crypto, permissions) is touched. Every file change matches the PR description precisely with no discrepancies found on inspection. The one non-mechanical code change (iscoroutinefunction swap) was already examined by the automated bug-hunting system and ruled out as a duplicate, leaving no open findings or unaddressed objections in the timeline.
inspect.iscoroutinefunction ignores asyncio's _is_coroutine marker, which asgiref's markcoroutinefunction sets on Python < 3.12. Accept both so such functions keep the async wrapper and their observation ends after the coroutine runs. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
What does this PR do?
Python SDK v5 requires Python
>=3.11(3.10 reaches end of life in October 2026). This redoes the closed #1923 onprepare-v5-release:requires-python = ">=3.11,<4.0"and rufftarget-version = "py311"asyncio.create_task(context=...)in the async-generator wrapper ofobserve, thetyping_extensions.NotRequiredfallback, and theskipif(python<3.11)markersuv.lockregenerated with the CI-pinned uv 0.11.2; only the 3.10-only packages (backports-asyncio-runner,exceptiongroup,tomli) and markers drop out. The relativeexclude-newerheader is kept as it was, so later lock edits on this stack don't collide with it.Stack: 1 of 10 in the v5 stack. Base:
prepare-v5-release. Merge this first.Type of change
Verification
Checklist
code_review.md..env.templateif needed.The PR should not merge until
@observepreserves asynchronous tracing for asyncio-marker-bearing callables.Summary
The PR raises the SDK’s minimum Python version to 3.11, updates CI and tooling targets, and removes older-version fallbacks and lockfile entries.
@observedispatch for asyncio-marker-bearing callables on Python 3.11.Reviews (1) · Last reviewed commit: "chore!: require Python 3.11 or newer"