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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VARIANT="3.9"
ARG VARIANT="3.10"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}

USER vscode
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.18
3.10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 After this merge, CI no longer runs the client.copy() memory-leak regression test on any Python version. Before, the 3.9 lane ran it. Both test_copy_build_request tests are skipped when sys.version_info >= (3, 10) (tests/test_client.py:248, :1151). The 3.10 and 3.14 lanes both match that condition. Fix: keep the test running on at least one supported lane. For example, narrow both skipif conditions to >= (3, 12), which is where the skip reason says the leak starts. Or, if 3.10 also leaks, say in the PR that this coverage is being dropped. [also at: scripts/test:13 - After merging, no test lane runs the memory-leak regression tests for client.copy(), on either the sync or async client.]

Why this was flagged

On the base branch, CI runs ./scripts/bootstrap, and uv python install installs .python-version (3.9.18). The min lane in scripts/test (UV_PYTHON=">=3.9.0") then runs on 3.9, where test_copy_build_request (sync at tests/test_client.py:248, async at :1151) runs. That test traces allocations from client.copy() and _build_request with tracemalloc. Its decorator is @ pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12"). This PR sets .python-version to 3.10, PY_VERSION_MIN to >=3.10.0 and requires-python to >= 3.10. Both remaining lanes, 3.10 and 3.14, therefore satisfy the skip condition. No CI run will catch a per-copy memory leak in the Sent or AsyncSent clients after this merge. The PR's reported 472 passed is consistent with both tests being skipped. Nothing else in tests/ covers a leak in copy().

Verification: tests/test_client.py:248 (sync) and :1151 (async) both skip when sys.version_info >= (3, 10). On the base, .python-version was 3.9.18 and PY_VERSION_MIN=">=3.9.0", so the min lane ran these tests on 3.9. This diff changes .python-version to 3.10 and PY_VERSION_MIN to ">=3.10.0", so both tests are always skipped.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- prettier-ignore -->
[![PyPI version](https://img.shields.io/pypi/v/sentdm.svg?label=pypi%20(stable))](https://pypi.org/project/sentdm/)

The Sent Python library provides convenient access to the Sent REST API from any Python 3.9+
The Sent Python library provides convenient access to the Sent REST API from any Python 3.10+
application. The library includes type definitions for all request params and response fields,
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

Expand Down Expand Up @@ -528,7 +528,7 @@ print(sent_dm.__version__)

## Requirements

Python 3.9 or higher.
Python 3.10 or higher.

## Contributing

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ dependencies = [
"sniffio",
]

requires-python = ">= 3.9"
requires-python = ">= 3.10"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Customers would see an unscoped changelog entry, and the commit subject forces a major version bump instead of leaving that to a maintainer. The subject is feat!: require Python 3.10 or later. CLAUDE.md requires a scope ("Conventional Commits with a scope ... feat(api):, fix(client):, chore(repo):"). It also says "A major version is a maintainer's call. Describe the compatibility impact in the PR instead of deciding it in the commit type." Fix: reword to a scoped subject without !, for example feat(client): require Python 3.10 or later. Describe the 3.9 impact in the PR body so a maintainer can decide the bump.

Why this was flagged

The only commit, 6aaec21, uses the subject feat!: require Python 3.10 or later. It has no scope, and its ! marks a breaking change. release-please reads that marker to choose the release type. The PR description says it will propose 0.50.0 with this as the headline entry, so the bump is decided by the commit type rather than by a maintainer. On the base branch, no commit in history forces a breaking bump this way. Both rules are in CLAUDE.md under "Breaking changes" and "Commits and pull requests". REVIEW.md says to report CLAUDE.md violations as Important.

Verification: nit. Trigger: the PR merges with its only commit's subject as written. Commit 6aaec21 has the subject feat!: require Python 3.10 or later. The subject has no scope, which CLAUDE.md line 81 requires. The ! decides breaking-ness in the commit type, against CLAUDE.md lines 75-76. The ! does not force a major (1.0.0) bump.

classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down Expand Up @@ -129,7 +128,7 @@ filterwarnings = [
# there are a couple of flags that are still disabled by
# default in strict mode as they are experimental and niche.
typeCheckingMode = "strict"
pythonVersion = "3.9"
pythonVersion = "3.10"

exclude = [
"_dev",
Expand Down
34 changes: 10 additions & 24 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
-e .
annotated-types==0.7.0
# via pydantic
anyio==4.12.1
anyio==4.16.0
# via
# httpx
# sentdm
backports-asyncio-runner==1.2.0 ; python_full_version < '3.11'
# via pytest-asyncio
certifi==2026.1.4
certifi==2026.10.23
# via
# httpcore
# httpx
Expand All @@ -32,18 +32,14 @@ httpx==0.28.1
# via
# respx
# sentdm
idna==3.11
idna==3.20
# via
# anyio
# httpx
importlib-metadata==8.7.1
iniconfig==2.1.0 ; python_full_version < '3.10'
iniconfig==2.3.0
# via pytest
iniconfig==2.3.0 ; python_full_version >= '3.10'
# via pytest
markdown-it-py==3.0.0 ; python_full_version < '3.10'
# via rich
markdown-it-py==4.0.0 ; python_full_version >= '3.10'
markdown-it-py==4.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
Expand All @@ -62,38 +58,28 @@ pydantic==2.12.5
# via sentdm
pydantic-core==2.41.5
# via pydantic
pygments==2.19.2
pygments==2.21.0
# via
# pytest
# rich
pyright==1.1.399
pytest==8.4.2 ; python_full_version < '3.10'
# via
# pytest-asyncio
# pytest-xdist
pytest==9.0.2 ; python_full_version >= '3.10'
pytest==9.2.0
# via
# pytest-asyncio
# pytest-xdist
pytest-asyncio==1.2.0 ; python_full_version < '3.10'
pytest-asyncio==1.3.0 ; python_full_version >= '3.10'
pytest-asyncio==1.4.1.post1
pytest-xdist==3.8.0
python-dateutil==2.9.0.post0 ; python_full_version < '3.10'
# via time-machine
respx==0.22.0
rich==14.2.0
ruff==0.14.13
six==1.17.0 ; python_full_version < '3.10'
# via python-dateutil
sniffio==1.3.1
# via sentdm
time-machine==2.19.0 ; python_full_version < '3.10'
time-machine==3.2.0 ; python_full_version >= '3.10'
time-machine==3.2.0
tomli==2.4.0 ; python_full_version < '3.11'
# via
# mypy
# pytest
typing-extensions==4.15.0
typing-extensions==4.16.0
# via
# anyio
# exceptiongroup
Expand Down
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export DEFER_PYDANTIC_BUILD=false

# Note that we need to specify the patch version here so that uv
# won't use unstable (alpha, beta, rc) releases for the tests
PY_VERSION_MIN=">=3.9.0"
PY_VERSION_MIN=">=3.10.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Maintainers get a minimum-Python bump that the next generated commit will revert or conflict on, which can block every SDK's release. This hand-written commit edits generator-owned scripts/ and generator-written lines. CLAUDE.md: "Generator-owned, so don't edit them here: ... scripts/" and "Fix generator-owned behaviour at the source." Fix: raise the minimum Python version in the SDK configuration and land it through a generated commit, which covers the 5 sites listed. Same pattern at 5 sites (scripts/test:13, pyproject.toml:20, README.md:6, .devcontainer/Dockerfile:1, .python-version:1).

Why this was flagged

Commit 6aaec21 has no Stainless-Generated-From trailer, so it is a hand-written commit. It changes PY_VERSION_MIN=">=3.10.0" in scripts/test:13, a file CLAUDE.md lists as generator-owned. It also changes generator-written lines: requires-python, the 3.9 classifier and pyright pythonVersion in pyproject.toml, the "Python 3.10+" lines in README.md, the devcontainer VARIANT and .python-version. The pipeline still targets 3.9 at its source. On the next regeneration it either rewrites these lines back to 3.9 and silently restores 3.9 support, or the carried patch conflicts. CLAUDE.md says such a conflict "blocks every SDK's release, not only this one". REVIEW.md asks for both hand edits to generator lines and changes to generator-owned files outside a generated commit to be reported as Important.

Verification: Trigger: the next generated commit from the SDK pipeline, as long as the SDK configuration still targets 3.9. HEAD commit 6aaec21 has no Stainless-Generated-From trailer. It changes scripts/test:13 from PY_VERSION_MIN=">=3.9.0" to PY_VERSION_MIN=">=3.10.0". CLAUDE.md:19-22 says: "The next generated commit rewrites them, and an edit conflicts."

PY_VERSION_MAX=">=3.14.0"

function run_tests() {
Expand Down
Loading
Loading