Comments (1)
Hey @nikhilk sorry for the delay, been on annual leave for couple of months :).
With the simple task factory, a dict is used and the dict is propagated from parent to child. A simple child_context = parent_context
is done. This has the side effect that if you update an already existing key in the child, the parent will also be affected because it is the same object. If you don't want this behavior, you can set the copy_context
variable to True
and then deepcopy
will be use (with the extra overhead this implies).
Side note -- this functionality is super useful, and should be more deeply merged into asyncio IMO.
Glad you like it, it's proven very useful for us and it is really simple to use. In Python 3.7 you can use contextvars module (pep-567)
from aiotask-context.
Related Issues (15)
- Support wait_for and others
- Context is global for all the parallel coroutines running HOT 1
- Catch AttributeError when context does not exist HOT 3
- Add RTD integration
- Add CHANGELOG and CONTRIBUTING
- Context.get raises an error if there is no event loop HOT 3
- Python 3.7: PendingDeprecationWarning: Task.current_task() is deprecated, use asyncio.current_task() instead HOT 5
- Does it have integration with aiohttp using gunicorn? HOT 1
- Please remove dependency to "pytest-runner" HOT 1
- how to use with sanic mutiple worker HOT 1
- Add test for count reference
- TypeError: 'Context' object does not support item assignment
- Tests fail on Python 3.11
- Add tests for uvloop support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiotask-context.