Skip to content

Commit 74872ae

Browse files
zeevmoneyclaude
andcommitted
Keep Dependabot off pydantic and let it read the tomli pin
Under the uv ecosystem Dependabot skips any requirement whose marker contains `<`, so it never read the python_version < "3.13" pydantic line or the tomli pin. On the pydantic lines it does read, it rewrites each `!=X.Y.*` exclusion as `!=X.Y.0.dev`, as it did in #130. Ignore pydantic for every update type, since its floors and exclusions are kept by hand, and write the tomli marker as == "3.10", which is the same under requires-python and has no `<`. uv.lock is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QoCAyNyBAmzgSkofgvKjEg
1 parent 8198244 commit 74872ae

2 files changed

Lines changed: 25 additions & 10 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ updates:
77
# so a Dependabot PR here raises the *floor* consumers are allowed to install
88
# on, not just the version CI happens to resolve. That is the whole point:
99
# the floor is the exposure, and the audit gate in security.yml scans it
10-
# explicitly.
10+
# explicitly. pydantic's floors are the exception: they are kept by hand
11+
# (see `ignore` below).
1112
- package-ecosystem: "uv"
1213
directory: "/"
1314
schedule:
@@ -37,15 +38,26 @@ updates:
3738
minor-and-patch:
3839
update-types: ["minor", "patch"]
3940
ignore:
40-
# pydantic is dual-supported on purpose: permit/utils/pydantic_version.py
41-
# branches on PYDANTIC_VERSION and every model imports from either
42-
# `pydantic` (v1) or `pydantic.v1` (v2 compat shim). A Dependabot major
43-
# bump cannot reason about that and would silently propose dropping v1
44-
# support, so majors are handled by hand. Minor/patch still flow through.
41+
# pydantic is updated by hand, for every update type. The SDK supports
42+
# both majors on purpose (permit/utils/pydantic_version.py), and
43+
# [project].dependencies has one pydantic line per Python range, with
44+
# floors and `!=` exclusions whose reasons are in the comments there.
45+
# Dependabot cannot keep those lines correct:
46+
# - it skips a requirement whose marker contains `<`, so the
47+
# python_version < "3.13" line would never be updated;
48+
# - on the lines it does update, it rewrites each `!=X.Y.*` exclusion as
49+
# `!=X.Y.0.dev`, which lets the X.Y releases back in (as PR #130 did to
50+
# the old requirements.txt);
51+
# - a major bump would drop pydantic 1 support.
52+
# An ignore with no update-types also stops Dependabot security updates
53+
# for pydantic. The audit gate in security.yml scans the newest pydantic
54+
# and its pydantic 1 and pydantic 2 floors (resolved for Python 3.10), and
55+
# fails on a fixable advisory. The pydantic versions in uv.lock move with
56+
# `uv lock --upgrade-package pydantic`.
4557
#
46-
# Removal gate: drop this entry once the SDK stops supporting pydantic v1.
58+
# Removal gate: drop this entry once pydantic is one requirement with no
59+
# `!=` exclusions and no `<` marker.
4760
- dependency-name: "pydantic"
48-
update-types: ["version-update:semver-major"]
4961
commit-message:
5062
prefix: "deps"
5163
prefix-development: "deps-dev"

‎pyproject.toml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ dependencies = [
3030
# 0.7.3 is the first loguru release that imports without a DeprecationWarning on
3131
# Python 3.14: earlier ones call asyncio.iscoroutinefunction, which 3.16 removes.
3232
"loguru>=0.7.3,<1",
33-
# pydantic has one line per Python range. Why each version is excluded:
33+
# pydantic has one line per Python range, updated by hand: Dependabot ignores
34+
# pydantic (see .github/dependabot.yml). Why each version is excluded:
3435
# - CVE-2024-3772 (ReDoS in email validation) affects pydantic 1.x before
3536
# 1.10.13. Under pydantic 2, permit validates emails with the pydantic.v1 copy
3637
# that pydantic 2 bundles, and only 2.4.2 and later bundle the fixed 1.10.13:
@@ -94,7 +95,9 @@ dev = [
9495
"ruff==0.6.9",
9596
# The offline tests and the migration skill's tests read [project].dependencies
9697
# from this file, and tomllib is in the standard library only from Python 3.11.
97-
'tomli==2.4.1; python_version < "3.11"',
98+
# The marker says == "3.10" rather than < "3.11", which is the same under
99+
# requires-python, because Dependabot skips a requirement whose marker has `<`.
100+
'tomli==2.4.1; python_version == "3.10"',
98101
# Imported directly by the offline tests (Request/Response are used to assert
99102
# on what the SDK actually put on the wire), as well as backing
100103
# pytest-httpserver. Keep it at 3.1.6 or later, the highest fixed version

0 commit comments

Comments
 (0)