[issue22051] Turtledemo: stop reloading demos

2018-06-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22051] Turtledemo: stop reloading demos

2014-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b76d854f580e by Terry Jan Reedy in branch '2.7':
Issue #22051: remove unneeded reload that allowed bad code.
http://hg.python.org/cpython/rev/b76d854f580e

New changeset 55d4f6c2be2d by Terry Jan Reedy in branch '3.4':
Issue #22051: remove unneeded reload that allowed bad code.
http://hg.python.org/cpython/rev/55d4f6c2be2d

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22051
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22051] Turtledemo: stop reloading demos

2014-07-23 Thread Terry J. Reedy

New submission from Terry J. Reedy:

I propose to remove the following two lines with 'reload' from 
turtledemo.__main__.py.

from importlib import reload
...
... def loadfile(self, filename):
...
reload(self.module)

Reloading modules each time a demo is run allows and even encourages module 
level code that initializes variables (other than classes) and has system 
side-effects. In particular, some such calls created the test problems reported 
in #21882. Code that needs to be run each time the required main() is called 
should be inside main.  Indeed, reforming the two_canvases demo (see patch for 
#21882) made two_canvases work properly within the demo driver.

With the demos patched, I tried them all twice after commenting out the reload. 
I did not notice any difference, except possibly faster response.

I already edited the help text to tell users to initialize in main().

--
assignee: terry.reedy
keywords: patch
messages: 223771
nosy: gregorlingl, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: Turtledemo: stop reloading demos
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22051
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com