We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c79c1c1 commit 86af698Copy full SHA for 86af698
posthog/scopes.py
@@ -5,13 +5,12 @@
5
# Use contextvars if available (Python 3.7+), otherwise fall back to threading.local
6
if sys.version_info >= (3, 7):
7
import contextvars
8
- _context_stack: contextvars.ContextVar[list] = contextvars.ContextVar(
9
- 'posthog_context_stack',
10
- default=[{}]
11
- )
+
+ _context_stack: contextvars.ContextVar[list] = contextvars.ContextVar("posthog_context_stack", default=[{}])
12
_use_contextvars = True
13
else:
14
import threading
15
_scopes_local = threading.local()
16
_use_contextvars = False
17
0 commit comments