This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _decimal: successful import despite build failure
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: The Modules/ directory should not be added to sys.path
View: 22285
Assigned To: Nosy List: eric.snow, skrah, vstinner
Priority: normal Keywords: buildbot

Created on 2014-08-26 21:56 by skrah, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg225931 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-08-26 21:56
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'])
msg225934 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-08-26 22:17
The effect can also be seen on the two buildbots that currently fail
to build _decimal due to a libmpdec version mismatch:

http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/7088/steps/test/logs/stdio
msg225958 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-08-27 10:18
Oh, it looks like I opened a similar issue: #22285 (with a patch).
msg225960 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-08-27 10:25
Ah nice, let's continue with your issue then.
History
Date User Action Args
2022-04-11 14:58:07adminsetgithub: 66476
2014-08-27 10:25:33skrahsetstatus: open -> closed
superseder: The Modules/ directory should not be added to sys.path
messages: + msg225960

resolution: duplicate
stage: resolved
2014-08-27 10:18:27vstinnersetnosy: + vstinner
messages: + msg225958
2014-08-26 22:17:18skrahsetkeywords: + buildbot

messages: + msg225934
2014-08-26 21:56:28skrahcreate