Skip to content

Preserve pending table resize after repeated size assignment - #299

Open
fhgffy wants to merge 1 commit into
python-hyper:masterfrom
fhgffy:fix-pending-table-resize-20261011
Open

fhgffy wants to merge 1 commit into
python-hyper:masterfrom
fhgffy:fix-pending-table-resize-20261011

Conversation

@fhgffy

@fhgffy fhgffy commented Oct 10, 2026

Copy link
Copy Markdown

Setting Encoder.header_table_size to a new value and then setting the same value again clears HeaderTable.resized. The pending size update is omitted from the next header block, so a peer that has acknowledged the smaller limit rejects it. A shrink to zero followed by a restore can instead leave the encoder and decoder with different dynamic entries.

Skip the table assignment when the size is unchanged, preserving the pending update. The regression checks repeated assignments after shrinking to zero, shrinking to a nonzero limit, and clearing then restoring the table. It also checks that the update is only emitted once.

Validation: the three regression cases fail on the original source; the full suite passes with 505 tests and 100% statement/branch coverage. Ruff, mypy, check-manifest, wheel/sdist builds, twine check, and the HTML docs build pass on Python 3.12.2. Existing Hypothesis initialization warnings remain; the docs build reports one unresolved link in the unchanged installation guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant