Skip to content

[3.12] gh-153030: Fix quadratic complexity in incremental parsing in HTMLParser (GH-153031) - #153041

Merged
Yhg1s merged 1 commit into
python:3.12from
miss-islington:backport-bcf98dd-3.12
Aug 4, 2026
Merged

Yhg1s merged 1 commit into
python:3.12from
miss-islington:backport-bcf98dd-3.12

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

When an unterminated construct (e.g. a tag or comment) spanned many
feed() calls, rescanning the growing buffer and concatenating new data
onto it were both quadratic. New data is now accumulated in a list and
only joined and parsed once enough has piled up.
(cherry picked from commit bcf98dd)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

…TMLParser (pythonGH-153031)

When an unterminated construct (e.g. a tag or comment) spanned many
feed() calls, rescanning the growing buffer and concatenating new data
onto it were both quadratic.  New data is now accumulated in a list and
only joined and parsed once enough has piled up.
(cherry picked from commit bcf98dd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jef-n added a commit to jef-n/OSGeo4W that referenced this pull request Jul 10, 2026
* add nlohmann-json-devel (for sfcgal 2.3)
* osm2pgsql, osmium: switch to nlohmann-json-devel
* python3-giturlparse: pin to 0.14.0 for qgis-deployment-toolbelt
* python3-blosc2: add python3-rich dependency
* add python3-rich (for python3-blosc2)
* add python3-markdown-it-py (for python3-rich)
* add python3-mdurl (for python3-markdown-it-py)
* add python3-jupyter-builder (for python3-jupyterlab and python3-notebook)
* python3-momepy: drop python3-scipy and add python3-numpy dependency
* python3-nltk: add python3-defusedxml dependency
* python3-jupyterlab: pin to 4.5.9 for python3-notebook and add python3-jupyter-builder
* python3-notebook: add python3-jupyter-builder dependency
* python3-numpy: pin to 2.4.6 for python3-numba
* python3-pdal: drop python3-pybind11 and python3-pyparsing dependency
* python3-pyogrio: workaround CRLF gdal version misdetection
* python3-rich: add python3-pygments and python3-markdown-it-py dependency
* python3: apply python/cpython#153041 (CVE-2026-15308)
@chrisahl

Copy link
Copy Markdown

Any idea when this will be merged?

@Yhg1s
Yhg1s merged commit 785df8f into python:3.12 Aug 4, 2026
23 checks passed
@miss-islington
miss-islington deleted the backport-bcf98dd-3.12 branch August 4, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants