Skip to content

Commit 283154b

Browse files
bluetclaude
andcommitted
chore(snyk): add [tool.poetry.dependencies] shim with bumped versions
Snyk's GitHub PR app integration uses the legacy poetry parser even when the org has "uv preview" enabled — preview is CLI-only per their docs: https://docs.snyk.io/supported-languages/supported-languages-list/python/cli-support-for-uv Without [tool.poetry.dependencies] in pyproject.toml the snyk PR check fails with "pyproject.toml error Failed to detect issues" and never falls through to scan requirements.txt or uv.lock. The shim mirrors the just-bumped (and verified vuln-free) [project.dependencies] versions so snyk's legacy parser succeeds without finding any vulns at the constraint floor. Pre-commit hook still keeps requirements.txt in sync for redundancy. Will revert this whole [tool.poetry.dependencies] block once snyk's PR app integration uses uv preview natively (snyk-python-plugin#251). Build verified: `python -m build` produces wheel + sdist. Tests verified: 293/293 pass. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 28405e6 commit 283154b

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,38 @@ dev = [
6868
"ruff>=0.15.12,<1.0.0",
6969
]
7070

71-
# Tells poetry-core which dirs ship in the wheel + sdist. Mirrors the prior
72-
# [tool.poetry] packages/include settings.
71+
# [tool.poetry] block exists for two reasons:
72+
#
73+
# 1. `packages` + `include` tell poetry-core (the build backend) which
74+
# files to ship in the wheel + sdist.
75+
# 2. `[tool.poetry.dependencies]` is a snyk-compat shim. Snyk's GitHub PR
76+
# app integration uses the legacy poetry parser even when the org has
77+
# "uv preview" enabled (preview is CLI-only per docs:
78+
# https://docs.snyk.io/supported-languages/supported-languages-list/python/cli-support-for-uv).
79+
# Without [tool.poetry.dependencies] the scan fails with "pyproject.toml
80+
# error Failed to detect issues" and never falls through to scan
81+
# requirements.txt or uv.lock. Versions below MUST stay in sync with
82+
# [project.dependencies] above.
83+
#
84+
# DO NOT run `poetry install/lock` against this file. If you `poetry add`
85+
# a dep it will write to [tool.poetry] only and silently drift from
86+
# [project]. uv reads [project.dependencies] (authoritative); this section
87+
# is read only by snyk. DELETE this whole [tool.poetry.dependencies]
88+
# section once snyk's PR app uses uv preview natively.
7389
[tool.poetry]
7490
packages = [{include = "proxybroker"}]
7591
include = ["proxybroker/data/*.mmdb"]
7692

93+
[tool.poetry.dependencies]
94+
python = "^3.10"
95+
aiohttp = "^3.13.5"
96+
aiodns = "^3.6.1"
97+
attrs = ">=26.1.0"
98+
maxminddb = "^2.8.2"
99+
cachetools = "^5.5.2"
100+
click = "^8.3.3"
101+
pyyaml = "^6.0.3"
102+
77103
[build-system]
78104
requires = ["poetry-core>=2.1.3"]
79105
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)