summaryrefslogtreecommitdiffstats
path: root/Lib/_pydecimal.py
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2020-02-29 18:43:42 (GMT)
committerGitHub <noreply@github.com>2020-02-29 18:43:42 (GMT)
commit815280eb160af637e1347213659f9236adf78f80 (patch)
treeecb6e85f7e8cec204316d3bfb82289a3724a173d /Lib/_pydecimal.py
parent0aeab5c4381f0cc11479362af2533b3a391312ac (diff)
downloadcpython-815280eb160af637e1347213659f9236adf78f80.zip
cpython-815280eb160af637e1347213659f9236adf78f80.tar.gz
cpython-815280eb160af637e1347213659f9236adf78f80.tar.bz2
bpo-39794: Add --without-decimal-contextvar (#18702)
Diffstat (limited to 'Lib/_pydecimal.py')
-rw-r--r--Lib/_pydecimal.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/_pydecimal.py b/Lib/_pydecimal.py
index c14d8ca..ab989e5 100644
--- a/Lib/_pydecimal.py
+++ b/Lib/_pydecimal.py
@@ -140,8 +140,11 @@ __all__ = [
# Limits for the C version for compatibility
'MAX_PREC', 'MAX_EMAX', 'MIN_EMIN', 'MIN_ETINY',
- # C version: compile time choice that enables the thread local context
- 'HAVE_THREADS'
+ # C version: compile time choice that enables the thread local context (deprecated, now always true)
+ 'HAVE_THREADS',
+
+ # C version: compile time choice that enables the coroutine local context
+ 'HAVE_CONTEXTVAR'
]
__xname__ = __name__ # sys.modules lookup (--without-threads)
@@ -172,6 +175,7 @@ ROUND_05UP = 'ROUND_05UP'
# Compatibility with the C version
HAVE_THREADS = True
+HAVE_CONTEXTVAR = True
if sys.maxsize == 2**63-1:
MAX_PREC = 999999999999999999
MAX_EMAX = 999999999999999999