contextvars icon indicating copy to clipboard operation
contextvars copied to clipboard

Typing annotations not working as intented

Open skalecki-imblox opened this issue 4 years ago • 0 comments

Hi! I've found a difference between the built-in version of contextvars and this backport.

Generic type annotations are not supported. This works in python:

 c: contextvars.ContextVar[str] = contextvars.ContextVar('test')

but not in this backport. It caused a pretty surprising issue with celery https://github.com/celery/celery/issues/6534

Would it be possible to fix it?

skalecki-imblox avatar Mar 25 '21 12:03 skalecki-imblox