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: Add missing verbosity message to importlib
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, python-dev, twouters
Priority: normal Keywords: easy

Created on 2013-03-05 18:23 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg183539 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-03-05 18:23
Looks like I missed some verbosity messages in importlib. The most obvious one is the "trying" messages under verbosity 2 (-vv or PYTHONVERBOSE=2). Should probably go through import.c again and make sure no other messages are missing (http://hg.python.org/cpython/file/637d7c953b10/Python/import.c).
msg183541 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-03-05 18:39
Any change below needs to be checked for what verbosity it matters for (although I think there is only a single level 2 message):

PySys_WriteStderr("# %s has bad magic\n", cpathname); (http://hg.python.org/cpython/file/637d7c953b10/Python/import.c#l1038)

PySys_WriteStderr("import %s # directory %s\n", name, pathname);  although that might be confusing in the face of namespace packages (http://hg.python.org/cpython/file/637d7c953b10/Python/import.c#l1435)

PySys_WriteStderr("# trying %s\n", buf); (http://hg.python.org/cpython/file/637d7c953b10/Python/import.c#l1837)

PySys_WriteStderr("import %s # frozen%s\n", name, ispackage ? " package" : ""); (http://hg.python.org/cpython/file/637d7c953b10/Python/import.c#l2335)

PySys_WriteStderr("import %s # builtin\n", name); (http://hg.python.org/cpython/file/637d7c953b10/Python/import.c#l2224)

Everything else changed, but is covered by some new verbose message.



Should probably change "created {!r}" to "wrote {!r}" in importlib (http://hg.python.org/cpython/file/b0890674bc21/Lib/importlib/_bootstrap.py#l1091)
msg183542 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-03-05 18:42
Actually, the builtin/frozen stuff is covered by a catch-all "import ..." message in importlib itself (I thought I wasn't _that_ sloppy when I added the messages). That just leaves the bad magic number, what to do about a matching directory, and "trying".
msg185747 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-04-01 17:26
New changeset ac89e7bc0e2f by Brett Cannon in branch '3.3':
Issue #17357: Add missing verbosity messages when running under
http://hg.python.org/cpython/rev/ac89e7bc0e2f
msg185748 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-04-01 17:28
Also done in default but since I forgot to say it was a merge for this issue it didn't add the commit message.
msg187952 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-04-28 03:21
New changeset 75e32a0bfd74 by Brett Cannon in branch '3.3':
Issue #17357: Use more stern wording for
http://hg.python.org/cpython/rev/75e32a0bfd74

New changeset 5fac0ac46f54 by Brett Cannon in branch 'default':
merge for issue #17357
http://hg.python.org/cpython/rev/5fac0ac46f54
History
Date User Action Args
2022-04-11 14:57:42adminsetgithub: 61559
2013-04-28 03:21:38python-devsetmessages: + msg187952
2013-04-01 17:28:02brett.cannonsetstatus: open -> closed
resolution: fixed
messages: + msg185748

stage: needs patch -> resolved
2013-04-01 17:26:33python-devsetnosy: + python-dev
messages: + msg185747
2013-03-05 18:42:10brett.cannonsetmessages: + msg183542
2013-03-05 18:39:46brett.cannonsetmessages: + msg183541
2013-03-05 18:23:49brett.cannoncreate