Repository navigation
fix(deps): resolve pip-audit failures for dnspython, tornado and soupsieve - #156
Conversation
…sieve - dnspython 2.9.2 fixes CVE-2026-128089 and tornado 6.6.1 fixes CVE-2026-126347. Both need Python 3.11, so the floors are raised on the >= 3.11 lines and 3.10 keeps dnspython 2.8.0 and tornado 6.5.10. - soupsieve 4.1.2 fixes CVE-2026-126189..126193 and four newer advisories published only in soupsieve's repo. soupsieve 3.0.2+ requires CPython 3.11.5 and fails every selector below it. The 3.11 kernel bundle is frozen on the builder's latest 3.11 but installed on any 3.11 patch release, so 4.1.2 is limited to Python >= 3.12. Python < 3.12 moves to 2.10, which fixes CVE-2026-126192, and the audit ignores the three CVEs 2.10 still carries. Only the dnspython, soupsieve and tornado blocks and the content-hash were spliced into the lock, since a Poetry 2.2.0 relock also drops about 1,200 unrelated older-Python lines.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
📦 Python package built successfully!
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #156 +/- ##
=======================================
Coverage 78.43% 78.43%
=======================================
Files 121 121
Lines 6920 6920
Branches 1005 1005
=======================================
Hits 5428 5428
Misses 1182 1182
Partials 310 310
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
🚀 Review App Deployment Started
|
Deepnote's 3.11 runtime image is on CPython 3.11.5 or newer, and the bundle builder's 3.11 is 3.11.16, so the 3.11 kernel bundle can take soupsieve 4.1.2 instead of 2.10. The split moves from Python 3.12 to 3.11.5, the first release whose re module has working possessive quantifiers, which soupsieve 3.0.2+ requires. With 3.11 on 4.1.2, the audit no longer needs to ignore CVE-2026-126190, CVE-2026-126191 and CVE-2026-126193, so ci.yml is back to main's version. Only the soupsieve blocks and the content-hash change in the lock.
Summary
Audit - ProductionandAudit - Serverfail onmainwith six advisories in dnspython, tornado and soupsieve. This PR raises the floors of all three:The audit's ignore list is unchanged.
Audit
auditjob of.github/workflows/ci.yml(around line 452).poetry-plugin-export, and exports three requirement sets:--without dev(Production),--extras server(Server) and--only dev(Dev).--require-hashes --disable-pip --vulnerability-service pypiand theignore-vulnslist.mainat 0b0d0ab, Production and Server report the same six advisories. Dev is clean.Precedent
pyproject.toml'sdependencies, with a trailing comment naming the advisories and(transitive via <parent>). A floor that already exists is raised in place, and its comment is replaced (fix(deps): resolve pip-audit failures for pillow, gitpython, certifi and black #143, fix(deps): resolve pip-audit failures for pymongo, dnspython, oauthlib and pylint #145, fix(deps): resolve pip-audit failures for tornado and pyasn1 #146).main. So fix(deps): resolve pip-audit failures for pillow, gitpython, certifi and black #143, fix(deps): resolve pip-audit failures for pymongo, dnspython, oauthlib and pylint #145 and fix(deps): resolve pip-audit failures for tornado and pyasn1 #146 copied only the affected package blocks and the content-hash intopoetry.lock.tk/fix-pip-audit-<date>, and titles arefix(deps): resolve pip-audit failures for <packages>.dnspython
pymongo→dnspython, in the main dependencies.>=2.7.0,<3.0.0.mongodb+srvlookups return the same hosts on 2.9.0 and 2.9.2.tornado
RedirectHandler. Affects <= 6.6.0.deepnote_core/widget_assets.py.tests/unit/test_widget_assets.pypasses.RedirectHandlerfix that restores the 6.5 behaviour, and aStaticFileHandlerfix that applies only on Windows.soupsieve
Advisories on the locked 2.9.2:
:has(a ~ b), quadratic timePath:
nbconvert→beautifulsoup44.12.3 (requiressoupsieve >1.2) →soupsieve.pyproject.tomlpinned>=2.8.4,<3in #118.Fix: soupsieve 3.0.2 and later require CPython 3.11.5. Their selector parser relies on possessive quantifiers in
re, which are broken before 3.11.5; 3.0 and 3.0.1 were yanked for that reason. The constraint is therefore split atpython_full_version3.11.5:Kernel bundles: a bundle is frozen with
pip freezeon the builder's Python (dockerfiles/builder/bundle.sh). The installer then picks a bundle by major.minor version only (installer/module/downloader.py,helper.pyget_current_python_version). The pinned builder image ships CPython 3.11.16, so the 3.11 bundle gets soupsieve 4.1.2 and is installed on every 3.11 runtime. Deepnote's 3.11 runtime image is on CPython 3.11.5 or newer. A runtime on CPython 3.11.0–3.11.4 using this bundle would get a soupsieve that rejects every selector;BeautifulSoup(...).select("p")raisesSelectorSyntaxErroron 3.11.4.Lock: the single soupsieve 2.9.2 block becomes two blocks, 2.10 for
python_full_version < "3.11.5"and 4.1.2 forpython_full_version >= "3.11.5". beautifulsoup4 stays at 4.12.3. Poetry's relock also reorders theandterms in the markers of jeepney, ptyprocess, pywin32-ctypes and secretstorage. The old and new markers evaluate the same in every environment, so those blocks were not copied.Behaviour change on Python 3.11.5+: soupsieve 4 changes how some selectors in user notebooks behave.
:has()that contains combinator chains, such asdiv:has(section p), now raisesSelectorSyntaxError. Passingflags=soupsieve.NOSTRICTrestores the old result.<template>contents are no longer matched.Nothing in the toolkit uses bs4 or soupsieve directly.
Verified:
Decisions
Checks
poetry check --lock(Poetry 2.2.0) passes.ignore-vulnslist parsed fromci.yml(unchanged frommain):pyproject.toml. The soupsieve wheel and sdist hashes match PyPI.mainwith its own lock has the same 46 failures on Python 3.11.17 with the same extra and group. They are pyspark tests that fail withPYTHON_VERSION_MISMATCH, because the Spark workers start Python 3.13 under the 3.11 driver, andtest_databricks_connector_dialect_alias_is_registered.Not fixed