homepage

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.

Author terry.reedy
Recipients brett.cannon, r.david.murray, ronaldoussoren, terry.reedy, vstinner
Date 2014年06月30日.15:20:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404141633.24.0.176256736007.issue21884@psf.upfronthosting.co.za>
In-reply-to
Content
(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.
History
Date User Action Args
2014年06月30日 15:20:33terry.reedysetrecipients: + terry.reedy, brett.cannon, ronaldoussoren, vstinner, r.david.murray
2014年06月30日 15:20:33terry.reedysetmessageid: <1404141633.24.0.176256736007.issue21884@psf.upfronthosting.co.za>
2014年06月30日 15:20:33terry.reedylinkissue21884 messages
2014年06月30日 15:20:32terry.reedycreate

AltStyle によって変換されたページ (->オリジナル) /