Skip to content

Add context API and implementation #22

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

Closed
reyang opened this issue Jun 21, 2019 · 4 comments
Closed

Add context API and implementation #22

reyang opened this issue Jun 21, 2019 · 4 comments
Assignees
Labels
api Affects the API package.
Milestone

Comments

@reyang
Copy link
Member

reyang commented Jun 21, 2019

We target Python 3, which has different ways of handing asynchronous context:

  1. Python 3.0 - 3.5, only Thread Local Storage is supported.
  2. Python 3.6, contextvars supported as a backport https://pypi.org/project/contextvars/.
  3. Python 3.7+, contextvars provided by the default library.

The current decision:

  1. In order to support v3.x, we need to take the similar approach like what we did in OpenCensus.
  2. We need to provide the ability for user to switch from contextvars back to Thread Local Storage, in order to make it work for existing systems like gevent and tornado. This can be exposed through a non-public API first, considering this is not a common scenario and we can remove it once all systems onboarded to contextvars.
  3. The context library should be released as an individual package.
@reyang reyang added the api Affects the API package. label Jun 21, 2019
@reyang reyang self-assigned this Jun 21, 2019
@c24t c24t added this to the Tracing API milestone Jun 27, 2019
@c24t
Copy link
Member

c24t commented Jul 30, 2019

@reyang is this closed by #57?

@reyang
Copy link
Member Author

reyang commented Jul 30, 2019

Not yet. I'm working on test cases which will be a separate PR, will close this after test cases added.

This was referenced Aug 15, 2019
@Oberon00
Copy link
Member

I guess this is done now (not including the new spec changes?)

@Oberon00 Oberon00 modified the milestones: Tracing API, Alpha Release Sep 13, 2019
@Oberon00
Copy link
Member

@reyang

@c24t c24t modified the milestones: Alpha Release, Alpha v0.2 Oct 11, 2019
@reyang reyang closed this as completed Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Affects the API package.
Projects
None yet
Development

No branches or pull requests

3 participants