Issue 22280: _decimal: successful import despite build failure (original) (raw)
This may be related to PEP 451: Previously, if the _decimal.so build failed for whatever reason, decimal.py would be used instead. For that to work, importing _decimal needs to fail.
But now the import is successful:
Simulate build failure:
rm Modules/_decimal/_decimal.c ./configure --with-pydebug && make
$ ./python Python 3.5.0a0 (default:0337a460f05b+, Aug 26 2014, 23:47:43) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information.
import _decimal _decimal.path _NamespacePath(['/home/stefan/pydev/cpython/Modules/_decimal'])