[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Nick Coghlan
Nick Coghlan added the comment: I vaguely recall discussing that change, and my recollection is that it was deliberate in order to evict improperly configured modules - we didn't count it as a significant compatibility break because it solely affected an error handling path. I guess we never tho

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Thanks, Petr. (And Eric.) -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3cdeafd18e61 by R David Murray in branch '3.4': #24081: Remove obsolete caveat from import docs. https://hg.python.org/cpython/rev/3cdeafd18e61 New changeset d57e0c6d292d by R David Murray in branch 'default': Merge: #24081: Remove obsolete caveat f

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: patch LGTM for the 3 branches. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: I'm pretty sure this is the culprit: changeset: 32882:331e60d8ce6da19b168849418776fea0940787ec branch: legacy-trunk user:Tim Peters date:Mon Aug 02 03:52:12 2004 + summary: PyImport_ExecCodeModuleEx(): remove module from sys.modules i

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread R. David Murray
Changes by R. David Murray : -- stage: -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: I've verified that the documentation is correct under Python 2.3. The behavior changed under Python 2.4 (and the docs were not updated). I expect that the change in behavior is an unintended consequence of a change in the import system for 2.4. There were 7 in 2

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: Either the docs are out-of-date or they are really poorly worded. Most likely it's the former, but I'm taking a look. -- ___ Python tracker ___ ___

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Note that calling reload on temp1.temp2 will fail with an error that temp2 is not in sys.modules. So maybe the caveat needs rewording rather than deletion. -- ___ Python tracker

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread R. David Murray
R. David Murray added the comment: OK, I can't reproduce it either, neither in python3 nor python2. Brett, is this left over from a long time ago? Heh. I just tried another experiment and got an interesting result: rdmurray@pydev:~/python/p34>cat temp1.py import temp2 foo = 1 rdmurray@pydev:

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Petr Viktorin
Petr Viktorin added the comment: Not true (on 3.3 & 2.7). >>> import sys >>> import x Traceback (most recent call last): File "", line 1, in File "/tmp/x.py", line 1, in import y File "/tmp/y.py", line 1, in 1/0 ZeroDivisionError: division by zero >>> sys.modules['x'] Traceback

[issue24081] Obsolete caveat in reload() docs

2015-05-01 Thread R. David Murray
R. David Murray added the comment: This generally comes up in the context of a module importing another module, and *that* module fails to import. The first module is left in sys.modules as a stub. Try that experiment, I'm pretty sure that is still true. -- nosy: +r.david.murray ___

[issue24081] Obsolete caveat in reload() docs

2015-04-30 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue24081] Obsolete caveat in reload() docs

2015-04-30 Thread Petr Viktorin
New submission from Petr Viktorin: imp.reload() and importlib.reload() docs state:: If a module is syntactically correct but its initialization fails, the first :keyword:`import` statement for it does not bind its name locally, but does store a (partially initialized) module object i