[Python-checkins] cpython: Issue #19232: Fix sys.modules lookup (--without-threads)
stefan.krah
python-checkins at python.org
Sun Oct 12 13:30:39 CEST 2014
https://hg.python.org/cpython/rev/75b5617b8dfc
changeset: 92989:75b5617b8dfc
user: Stefan Krah <skrah at bytereef.org>
date: Sun Oct 12 13:29:15 2014 +0200
summary:
Issue #19232: Fix sys.modules lookup (--without-threads)
files:
Lib/_pydecimal.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/_pydecimal.py b/Lib/_pydecimal.py
--- a/Lib/_pydecimal.py
+++ b/Lib/_pydecimal.py
@@ -144,6 +144,7 @@
'HAVE_THREADS'
]
+__xname__ = __name__ # sys.modules lookup (--without-threads)
__name__ = 'decimal' # For pickling
__version__ = '1.70' # Highest version of the spec this complies with
# See http://speleotrove.com/decimal/
@@ -441,7 +442,7 @@
# Python was compiled without threads; create a mock object instead
class MockThreading(object):
def local(self, sys=sys):
- return sys.modules[__name__]
+ return sys.modules[__xname__]
threading = MockThreading()
del MockThreading
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list