This issue is used to track the PRs split from [gh-103092](https://github.com/python/cpython/pull/103381). Isolate the `_decimal` extension module by: * Establish a global module state and convert static types to heap types * Move other global static variables to the global module state(possibly multiple PRs) - [x] DecimalException - [x] basic_context_template - [x] tls_context_key - [x] cached_context - [x] current_context_var - [x] default_context_template - [x] extended_context_template - [x] round_map - [x] Rational - [x] SignalTuple - [x] External C-API functions * Convert the global module state to true module state - [x] signal_map - [x] cond_map - [x] convert global state to module state See original issue [Isolate Stdlib Extension Modules](https://github.com/python/cpython/issues/103092) and [PEP-687](https://peps.python.org/pep-0687/) for details. <!-- gh-linked-prs --> ### Linked PRs * gh-106079 * gh-106301 * gh-106346 * gh-106395 * gh-106475 * gh-106616 * gh-106880 * gh-107287 * gh-107524 <!-- /gh-linked-prs -->