Skip to content

Commit 8657f72

Browse files
bluetclaude
andcommitted
fix(snyk): remove [tool.poetry.dependencies] shim — it was causing the error
Backwards reasoning: at commit 51ed1f3 (NO [tool.poetry.dependencies]) snyk successfully parsed [project.dependencies] via its uv preview AND reported the click@8.2.1 vuln. Snyk CAN read PEP 621 deps with preview enabled; the parser was working. When I added [tool.poetry.dependencies] alongside in commit 283154b, snyk started erroring with "Failed to detect issues" — presumably because two competing dep declarations (PEP 621 vs Poetry-style) confuse the parser. The shim was the cause, not the fix. Now that the click bump in commit 28405e6 already cleared the only real vuln snyk had flagged, the simpler config (just [project], no shim) should make snyk happy. Keeping a comment explaining why the shim is deliberately absent so a future contributor doesn't re-add it. Build verified (wheel + sdist), 293/293 tests pass. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b65b730 commit 8657f72

1 file changed

Lines changed: 10 additions & 36 deletions

File tree

pyproject.toml

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -68,47 +68,21 @@ dev = [
6868
"ruff>=0.15.12,<1.0.0",
6969
]
7070

71-
# [tool.poetry] block exists for two reasons:
71+
# Tells poetry-core which dirs ship in the wheel + sdist. Mirrors the prior
72+
# [tool.poetry] packages/include settings.
7273
#
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.
74+
# Note: deliberately keeping [tool.poetry.dependencies] OUT of this file.
75+
# At commit 51ed1f3 (no [tool.poetry.dependencies]) snyk successfully
76+
# parsed [project.dependencies] via its uv preview and reported a
77+
# vulnerability — proving snyk CAN read PEP 621 deps with preview enabled.
78+
# Adding [tool.poetry.dependencies] alongside [project.dependencies]
79+
# caused snyk to error with "Failed to detect issues" instead of using
80+
# either, presumably because two competing dep declarations confuse its
81+
# parser.
8982
[tool.poetry]
90-
# name/version/description/authors are required Poetry fields — without
91-
# them snyk's poetry parser rejects the [tool.poetry] block as invalid
92-
# and reports "pyproject.toml error Failed to detect issues". Mirror the
93-
# values from [project] above. poetry-core 2.x prefers [project] when
94-
# both are present, so this duplication doesn't affect builds.
95-
name = "proxybroker2"
96-
version = "2.0.0b3"
97-
description = "The New (auto rotate) Proxy [Finder | Checker | Server]. HTTP(S) & SOCKS."
98-
authors = ["BlueT - Matthew Lien - 練喆明 <bluet@bluet.org>", "Denis Constverum <constverum@gmail.com>"]
9983
packages = [{include = "proxybroker"}]
10084
include = ["proxybroker/data/*.mmdb"]
10185

102-
[tool.poetry.dependencies]
103-
python = "^3.10"
104-
aiohttp = "^3.13.5"
105-
aiodns = "^3.6.1"
106-
attrs = ">=26.1.0,<27.0.0"
107-
maxminddb = "^2.8.2"
108-
cachetools = "^5.5.2"
109-
click = "^8.3.3"
110-
pyyaml = "^6.0.3"
111-
11286
[build-system]
11387
requires = ["poetry-core>=2.1.3"]
11488
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)