Undocumented
Class | ContextVar |
A fake ContextVar based on the previous greenlet/threading ident function. Used on Python 3.6, eventlet, and old versions of gevent. |
Class | Local |
No class docstring; 0/2 property, 0/1 class variable, 1/8 method documented |
Class | LocalManager |
No summary |
Class | LocalProxy |
A proxy to the object bound to a Local . All operations on the proxy are forwarded to the bound object. If no object is bound, a RuntimeError is raised. |
Class | LocalStack |
This class works similar to a Local but keeps a stack of objects instead. This is best explained with an example: |
Function | __release_local__ |
Undocumented |
Function | get_ident |
Undocumented |
Function | release_local |
Releases the contents of the local for the current context. This makes it possible to use locals without a manager. |
Constant | F |
Undocumented |
Variable | greenlet_patched |
Undocumented |
Class | _CannotUseContextVar |
Undocumented |
Class | _ProxyIOp |
Look up an augmented assignment method on a proxied object. The method is wrapped to return the proxy instead of the object. |
Class | _ProxyLookup |
Descriptor that handles proxied attribute lookup for LocalProxy . |
Function | _l_to_r_op |
Swap the argument order to turn an l-op into an r-op. |
Releases the contents of the local for the current context. This makes it possible to use locals without a manager.
Example:
>>> loc = Local() >>> loc.foo = 42 >>> release_local(loc) >>> hasattr(loc, 'foo') False
With this function one can release Local
objects as well
as LocalStack
objects. However it is not possible to
release data held by proxies that way, one always has to retain
a reference to the underlying local object in order to be able
to release it.
Parameters | |
local:t.Union[ | Undocumented |