Message221965
(Brett, the question is about import.)
The problem is the mode call in clock.py, which I will move today as part of 21882.
I am sorely puzzled that the patch in #21823 could have changed the effect of mode(). There are only two changes, only one of which could be relevant.
1.
from turtle import *
+from turtle import Terminator # not in __all__
mode()
My understanding is that the newly added second import should just add a reference to Terminator in the existing module. It is a standard Exception subclass: from turtle.py, "class Terminator(Exception): pass". I could and will add 'Terminator' to __all__ instead, but it seems to me that the added statement *should* be innocuous.
What am I missing? Does __all__ change the import machinery in the calls to frozen importlib.bootstrap or do these call always happen behind the scene with any import? From the most recent first traceback:
...
File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/turtledemo/clock.py", line 17 in <module>
File "<frozen importlib._bootstrap>", line 321 in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1420 in exec_module
File "<frozen importlib._bootstrap>", line 1149 in _load_unlocked
File "<frozen importlib._bootstrap>", line 2175 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 2186 in _find_and_load
File "<string>", line 1 in <module>
File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test___all__.py", line 23 in check_all
...
2. Added a try:except: within a function, not called on import, to catch previously uncaught Terminator exception. |
|
Date |
User |
Action |
Args |
2014-06-30 15:20:33 | terry.reedy | set | recipients:
+ terry.reedy, brett.cannon, ronaldoussoren, vstinner, r.david.murray |
2014-06-30 15:20:33 | terry.reedy | set | messageid: <1404141633.24.0.176256736007.issue21884@psf.upfronthosting.co.za> |
2014-06-30 15:20:33 | terry.reedy | link | issue21884 messages |
2014-06-30 15:20:32 | terry.reedy | create | |
|