Re: [Python-Dev] should tests be thread-safe?

2014-05-10 Thread Nick Coghlan
On 10 May 2014 06:53, akira 4kir4...@gmail.com wrote: Hi, May tests expect that unless they themselves start a thread then there are no threads to worry about? I see that some old tests are not thread-safe and I have not found it to be explicitly mentioned in the devguide. I've written a

Re: [Python-Dev] Tix version needed to build 2.7 Windows installer?

2014-05-10 Thread Brian Curtin
On Fri, May 9, 2014 at 12:00 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: On Thu, May 8, 2014 at 4:20 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: I updated the 2.7 buildbot scripts to pull in Tcl/Tk 8.5.15 a couple of weeks ago (see http://bugs.python.org/issue21303), but

Re: [Python-Dev] Tix version needed to build 2.7 Windows installer?

2014-05-10 Thread Steve Dower
Brian Curtin wrote: On Fri, May 9, 2014 at 12:00 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: On Thu, May 8, 2014 at 4:20 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: I updated the 2.7 buildbot scripts to pull in Tcl/Tk 8.5.15 a couple of weeks ago (see

[Python-Dev] python process creation overhead

2014-05-10 Thread Gregory Szorc
I was investigating speeding up Mercurial's test suite (it runs ~13,000 Python processes) and I believe I've identified CPython process/interpreter creation and destruction as sources of significant overhead and thus a concern for any CPython user. Full details are at [1]. tl;dr 10-18% of CPU

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Alex Gaynor
Hi python-dev and Raymond, I think this change is a considerable usability regression for the documentation. Right now the warnings about CSPRNGs are hidden in the introductory paragraph, which users are likely to skip. I agree that there's no need to repeat the same advice twice, but I'd much

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Raymond Hettinger
On May 10, 2014, at 2:18 PM, Alex Gaynor alex.gay...@gmail.com wrote: I think this change is a considerable usability regression for the documentation. Right now the warnings about CSPRNGs are hidden in the introductory paragraph, which users are likely to skip In the past couple of

Re: [Python-Dev] should tests be thread-safe?

2014-05-10 Thread Victor Stinner
If you need a well defined environement, run your test in a subprocess. Depending on the random function, your test may be run with more threads. On BSD, it changes for example which thread receives a signal. Importing the tkinter module creates a hidden C thread for the Tk loop. Victor

Re: [Python-Dev] python process creation overhead

2014-05-10 Thread Antoine Pitrou
Hello, On Sat, 10 May 2014 13:05:54 -0700 Gregory Szorc gregory.sz...@gmail.com wrote: I was investigating speeding up Mercurial's test suite (it runs ~13,000 Python processes) and I believe I've identified CPython process/interpreter creation and destruction as sources of significant

Re: [Python-Dev] python process creation overhead

2014-05-10 Thread Victor Stinner
Le 10 mai 2014 22:51, Gregory Szorc gregory.sz...@gmail.com a écrit : Furthermore, Python 3 appears to be 50% slower than Python 2. Please mention the minor version. It looks like you compared 2.7 and 3.3. Please test 3.4, we made interesting progress on the startup time. There is still

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Antoine Pitrou
On Sat, 10 May 2014 14:35:38 -0700 Raymond Hettinger raymond.hettin...@gmail.com wrote: In the past couple of years, we've grown an unfortunate tendency to fill the docs with big warning boxes (the subprocess docs are an example of implicitly communicating that the module is dangerous and

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Nick Coghlan
On 11 May 2014 07:37, Raymond Hettinger raymond.hettin...@gmail.com wrote: On May 10, 2014, at 2:18 PM, Alex Gaynor alex.gay...@gmail.com wrote: I think this change is a considerable usability regression for the documentation. Right now the warnings about CSPRNGs are hidden in the

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Donald Stufft
On May 10, 2014, at 6:10 PM, Nick Coghlan ncogh...@gmail.com wrote: On 11 May 2014 07:37, Raymond Hettinger raymond.hettin...@gmail.com wrote: On May 10, 2014, at 2:18 PM, Alex Gaynor alex.gay...@gmail.com wrote: I think this change is a considerable usability regression for the

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Raymond Hettinger
On May 10, 2014, at 2:54 PM, Antoine Pitrou solip...@pitrou.net wrote: It's not about being bright or not, it's about being *willing* to eat walls of text. However pleasant it may be for some people to *write* documentation, for most readers (and especially non-native English readers, who

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Guido van Rossum
Give it up, Raymond. On Saturday, May 10, 2014, Raymond Hettinger raymond.hettin...@gmail.com wrote: On May 10, 2014, at 2:54 PM, Antoine Pitrou solip...@pitrou.netjavascript:_e(%7B%7D,'cvml','solip...@pitrou.net'); wrote: It's not about being bright or not, it's about being *willing* to

Re: [Python-Dev] python process creation overhead

2014-05-10 Thread Donald Stufft
On May 10, 2014, at 5:46 PM, Victor Stinner victor.stin...@gmail.com wrote: Le 10 mai 2014 22:51, Gregory Szorc gregory.sz...@gmail.com a écrit : Furthermore, Python 3 appears to be 50% slower than Python 2. Please mention the minor version. It looks like you compared 2.7 and 3.3. Please

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Ezio Melotti
Hi, On Sun, May 11, 2014 at 12:35 AM, Raymond Hettinger raymond.hettin...@gmail.com wrote: On May 10, 2014, at 2:18 PM, Alex Gaynor alex.gay...@gmail.com wrote: I think this change is a considerable usability regression for the documentation. Right now the warnings about CSPRNGs are hidden

Re: [Python-Dev] should tests be thread-safe?

2014-05-10 Thread Charles-François Natali
You might have forgotten to include Python-dev in the reply. Indeed, adding it back! Thank you for the reply. I might have expressed the question poorely. I meant: I have a script that I know is not thread-safe but it doesn't matter because the test itself doesn't run any threads and the

Re: [Python-Dev] python process creation overhead

2014-05-10 Thread Guido van Rossum
Yeah, but 200 test in 30 minutes is 9 *seconds* per test -- the Python startup time is only a tiny fraction of that (20-40 *milliseconds*). On Sat, May 10, 2014 at 3:33 PM, Donald Stufft don...@stufft.io wrote: On May 10, 2014, at 5:46 PM, Victor Stinner victor.stin...@gmail.com wrote: Le

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Nick Coghlan
On 11 May 2014 08:24, Raymond Hettinger raymond.hettin...@gmail.com wrote: Before proceeding further with stamping distracting security warnings all over the module documentation, we should look to other languages to see what others have found necessary. This warning does not appear anywhere

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Stefan Behnel
Nick Coghlan, 11.05.2014 01:01: As you point out, most language development teams do very little to try to educate their users about security issues. The consequences of that are clearly visible in the world around us: when security is treated as an optional afterthought, you get widespread

Re: [Python-Dev] python process creation overhead

2014-05-10 Thread Donald Stufft
Yes right, sorry I didn’t mean to imply that all that time was spent in the Python start up time. I’ve personally never actually spent time to figure out which part of that was slow because getting visibility inside of a subprocess.Popen is a pain and I’m slowly trying to rewrite our tests to not

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Raymond Hettinger
On May 10, 2014, at 4:15 PM, Stefan Behnel stefan...@behnel.de wrote: Total +1 on keeping these little bits around. Since all of you want a warning, I'll add one back but with improved wording. I'm not all at comfortable with the wording of the second sentence. I was the author of the

Re: [Python-Dev] [Python-checkins] cpython: Remove the redundant and poorly worded warning message.

2014-05-10 Thread Tim Peters
[Raymond Hettinger] ... I'm not all at comfortable with the wording of the second sentence. I was the author of the SystemRandom() class and I only want to guarantee that it provides access to the operating system's source of random numbers. It is a bold claim to guarantee that it is

Re: [Python-Dev] Values and objects

2014-05-10 Thread Ethan Furman
[bringing back on-list] On 05/10/2014 07:30 PM, Devin Jeanpierre wrote: On Sat, May 10, 2014 at 2:38 PM, Ethan Furman et...@stoneleaf.us wrote: On 05/10/2014 02:03 PM, Devin Jeanpierre wrote: spam is referring to a local variable that has not been bound. This is not an implementation