zc.buildout: bootstrap.py script
Hi, The code in bootstrap.py doesn't use the if __name__ == "__main__" idiom. This can lead to funny behaviour if it is imported for some reason (I stumbled upon this in conjunction with nose). Is there a reason for not checking for __name__ == "__main__", or should this be changed? -- René Fleschenberg Am Stadtgarten 28, 45276 Essen, Germany Phone: +49 1577 170 7363 E-Mail: rene@fleschenberg.net
On Wed, Mar 31, 2010 at 12:08 AM, René Fleschenberg <rene@fleschenberg.net> wrote:
Hi,
The code in bootstrap.py doesn't use the if __name__ == "__main__" idiom. This can lead to funny behaviour if it is imported for some reason (I stumbled upon this in conjunction with nose).
Is there a reason for not checking for __name__ == "__main__", or should this be changed?
I don't see any goog reason not to have a __main__ section, +1 for changing this
-- René Fleschenberg
Am Stadtgarten 28, 45276 Essen, Germany Phone: +49 1577 170 7363 E-Mail: rene@fleschenberg.net
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- Tarek Ziadé | http://ziade.org
On Wed, Mar 31, 2010 at 12:50:33AM +0200, Tarek Ziadé wrote:
On Wed, Mar 31, 2010 at 12:08 AM, René Fleschenberg <rene@fleschenberg.net> wrote:
Hi,
The code in bootstrap.py doesn't use the if __name__ == "__main__" idiom. This can lead to funny behaviour if it is imported for some reason (I stumbled upon this in conjunction with nose).
Is there a reason for not checking for __name__ == "__main__", or should this be changed?
I don't see any goog reason not to have a __main__ section,
+1 for changing this
There's an open bug for it, with a patch attached (not that you need a patch for something this trivial): https://bugs.launchpad.net/zc.buildout/+bug/303432 I assume Jim is just busy. I assume anyone with commit access to Zope SVN could change this and release a zc.buildout point release, if Jim has no objections. Jim? Marius Gedminas -- "What's the name of the new OO COBOL -- an equivalent of C++?" "ADD 1 TO COBOL GIVING COBOL"
On Fri, Apr 2, 2010 at 9:40 AM, Marius Gedminas <marius@pov.lt> wrote:
On Wed, Mar 31, 2010 at 12:50:33AM +0200, Tarek Ziadé wrote:
On Wed, Mar 31, 2010 at 12:08 AM, René Fleschenberg <rene@fleschenberg.net> wrote:
Hi,
The code in bootstrap.py doesn't use the if __name__ == "__main__" idiom. This can lead to funny behaviour if it is imported for some reason (I stumbled upon this in conjunction with nose).
Is there a reason for not checking for __name__ == "__main__", or should this be changed?
I don't see any goog reason not to have a __main__ section,
+1 for changing this
There's an open bug for it, with a patch attached (not that you need a patch for something this trivial): https://bugs.launchpad.net/zc.buildout/+bug/303432
I assume Jim is just busy.
I assume anyone with commit access to Zope SVN could change this and release a zc.buildout point release, if Jim has no objections. Jim?
Nope. +1 Jim -- Jim Fulton
participants (4)
-
Jim Fulton
-
Marius Gedminas
-
René Fleschenberg
-
Tarek Ziadé