I have a context var in in file a.py and I want to use it in b.py.
a.py:
import contextvars
cntx = contextvars.ContextVar("abcd")
b.py:
from .a import cntx
print(cntx.get())
Error:
Traceback (most recent call last):
File "/home/user/Desktop/b.py", line 1, in <module>
from .a import cntx
ImportError: attempted relative import with no known parent package
Isn't this how context variables supposed to work? I'm using python 3.9