Skip to content

Replace update_context with set_context - #54

Merged
thomas-samoht merged 4 commits into
mainfrom
feat/replace-update-context-with-set-context
Nov 10, 2026
Merged

thomas-samoht merged 4 commits into
mainfrom
feat/replace-update-context-with-set-context

Conversation

@thomas-samoht

@thomas-samoht thomas-samoht commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

update_context ends with its block, so a value added from a dependency never reached the access record, the 500 record, or the records of refused and invalid requests.

  • New: set_context() adds values for the rest of the request, so they reach those records too. It refuses the fields the middleware sets, refuses undeclared fields with strict_fields on, and does nothing where no context is bound.
  • Breaking: update_context is removed. In a dependency, replace with update_context(values): yield with set_context(values).
  • Changed: set_strict_fields moved to gfmodules.logging.strict and is still exported from gfmodules.logging.

@thomas-samoht
thomas-samoht marked this pull request as ready for review November 5, 2026 09:06
@thomas-samoht
thomas-samoht requested a review from a team as a code owner November 5, 2026 09:06
@thomas-samoht
thomas-samoht force-pushed the feat/replace-update-context-with-set-context branch from e0a79f7 to f9f8138 Compare November 9, 2026 15:57
@thomas-samoht
thomas-samoht changed the base branch from main to feat/log-unhandled-thread-exceptions November 9, 2026 15:57
@thomas-samoht
thomas-samoht added this pull request to stack #61 November 9, 2026 15:57
Comment thread docs/STARTING_GUIDE.md Resolved
@thomas-samoht
thomas-samoht force-pushed the feat/replace-update-context-with-set-context branch 7 times, most recently from d48f154 to 0919386 Compare November 10, 2026 09:16
Base automatically changed from feat/log-unhandled-thread-exceptions to main November 10, 2026 09:19
@thomas-samoht
thomas-samoht force-pushed the feat/replace-update-context-with-set-context branch from 0919386 to 5137844 Compare November 10, 2026 09:19
Comment thread examples/README.md Resolved
@thomas-samoht
thomas-samoht merged commit 97b8ddc into main Nov 10, 2026
14 checks passed
@thomas-samoht
thomas-samoht deleted the feat/replace-update-context-with-set-context branch November 10, 2026 09:30
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.

2 participants