Skip to content

Hide pending new settings from the active mapping - #1351

Open
iamabhisheknag wants to merge 1 commit into
python-hyper:masterfrom
iamabhisheknag:fix/settings-pending-mapping
Open

iamabhisheknag wants to merge 1 commit into
python-hyper:masterfrom
iamabhisheknag:fix/settings-pending-mapping

Conversation

@iamabhisheknag

Copy link
Copy Markdown

A newly proposed setting raises KeyError on lookup until its first acknowledgement, but currently appears in iteration and length. Consequently, dict(settings) and iteration over settings.items() can raise KeyError while an update is in flight, including after H2Connection.update_settings().

Filter those pending keys from iteration and count only visible keys. Acknowledgement still activates the queued value; the regressions cover a new known/extension setting, repeated proposals, and deletion before acknowledgement.

Local validation on Python 3.14: 1,688 tests pass with 100% line and branch coverage; required Ruff and mypy checks pass. Three new cases fail before the fix. An in-memory client/server exchange confirms settings are transmitted and become visible after ACK.

AI assistance: OpenAI coding assistant (GPT-6).

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