bpo-32630: Use contextvars in the decimal module by 1st1 · Pull Request #5278 · python/cpython (original) (raw)
Maybe I missed it, but I don't see anything to make with localcontext(...) use the token to reset?
Correct, I didn't use the var.reset()
mechanism in this patch to make it as minimal as possible and also make it easier for Stefan to review.
For 3.7 it doesn't really matter if var.reset()
is used or not since we don't have chained lookups yet. When we have them, we can just update decimal to use var.reset()
to be fully compatible.