You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@burr.apache.org by "MrlixiangWE (via GitHub)" <gi...@apache.org> on 2026/08/02 16:59:28 UTC
[PR] Restore outer ApplicationContext after nested execution [burr]
MrlixiangWE opened a new pull request, #867:
URL: https://github.com/apache/burr/pull/867
Problem
`ApplicationContext.__enter__()` sets the current context, but
`ApplicationContext.__exit__()` clears it to `None`. When one Burr application
runs inside another application's action, exiting the inner context removes the
outer current context even though the outer application is still running.
Before / after
Before:
- After `inner_app.run()` returns, `ApplicationContext.get()` in the outer
action returns `None` instead of the outer application's context.
After:
- Each entered scope restores the exact preceding `ContextVar` value when it
exits.
- Nested, reentrant, and concurrent context-manager uses retain task-local
restoration tokens.
Verification
- `.venv/bin/pytest tests/core/test_application.py -k 'context' -q`
(15 passed, 126 deselected)
- `.venv/bin/pytest tests/core --ignore=tests/core/test_graphviz_display.py -q`
(393 passed; Graphviz display tests were excluded because this local
environment lacks `dot`)
- `.venv/bin/pre-commit run --files burr/core/application.py tests/core/test_application.py`
(passed)
- `.venv/bin/python -m build` (passed)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Restore outer ApplicationContext after nested execution [burr]
Posted by "MrlixiangWE (via GitHub)" <gi...@apache.org>.
MrlixiangWE closed pull request #867: Restore outer ApplicationContext after nested execution
URL: https://github.com/apache/burr/pull/867
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org