-
-
Notifications
You must be signed in to change notification settings - Fork 332
ContextLocalSingleton Provider Class #442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7bfb66f
to
67e89bd
Compare
Build is red because of coveralls failing to upload the results.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Thanks a lot for the contribution. I left some comments, appreciate if you could take a look. Also please target PR to the develop
branch.
5efc8fd
to
5113d93
Compare
I've made the amends and rebased onto dev. |
5efb8c6
to
6523abc
Compare
6523abc
to
aca67c3
Compare
Fixed the pipeline. |
Hey @rmk135 are you still interested in merging this? |
Hey @sonthonaxrk , I do. Merging it now :) |
Just a heads up that there is no documentation of this provider in the main docs |
@billcrook , thanks for the heads up. It's still in my backlog, will prioritize it! |
This is just a preliminary example of how I'd switch to using ContextVars. The advantage of ContextVars is that they actually work when using asyncio. I think it might be worth having a
ContextLocalSingleton
and aThreadLocalSingleton
. Most people will need aContextLocalSingleton
.Things I need to do here. Please add anything I'm missing :)
contextvars
library to the dependencies so we can support earlier Python 3 versions.Thanks for all your work on this library.