forked from jupyter/notebook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add base.handlers.get_current_request()
This function allows to retrieve the current web request in async contexts. Retrieving the current context can be useful for example when customizing Enterprise Gateway RemoteProcessProxy, to retrieve authentication headers. The implementation makes uses of Python 3.7's new contextvars module. There are backports efforts for 3.6: - https://pypi.org/project/aiocontextvars/ - does not have automatic asyncio support - https://pypi.org/project/contextvars/ - which doesn't have it either. The tracking issue on this matter has been stale for 3 years now, and the conclusion of the discussion is "upgrade to a newer version of Python": MagicStack/contextvars#2 Since notebook has no control on the event loop it is running into, I preferred to drop Python 3.6 support.
- Loading branch information
Showing
6 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters