Open
Conversation
LocalRequest and LocalResponse now use ContextVar instead of threading.local() to implement thread-local state. This is natively supported by greenlet and monkey-patching the threading library is no longer needeed to support greenlet-based servers (e.g. gunicorn with gevent worker). The Cheetah template adapter was changed to no longer depend on any form of thread-local state. depr: The module-global `local` variable is still an instance of threading.local, but not used by bottle and now deprecated.
Bottle used to depend on monkey-patching to work with greenlet-based concurrency. This is no longer the case, so we can remove this error-prone and incomplete workaround from the bottle CLI startup logic. change: Bottle CLI no longer monkey-patches the python standard library when selecting the gevent or eventlet server adapters from the command line.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LocalRequest and LocalResponse now use ContextVar instead of threading.local() to implement thread-local state. This is natively supported by greenlet and monkey-patching the threading library is no longer needeed to support greenlet-based servers (e.g. gunicorn with gevent worker).
The Cheetah template adapter was changed to no longer depend on any form of thread-local state.
The module-global
localvariable is still an instance of threading.local, but not used by bottle and now deprecated.