Re: [Python-Dev] [Python-checkins] cpython (3.2): Issue #14409: IDLE doesn't not execute commands from shell with default

2012-03-30 Thread martin
Is my suggested rephrasing correct? I don't know, as I'm not familiar with either the original problem or what was done to fix it. I don't know, either, and Andrew may not able to answer the question as he may not see the fine difference between what he wrote and what you wrote (your phrasing

Re: [Python-Dev] peps: PEP 418: Fill the Adjusted by NTP column of the summary table

2012-03-30 Thread Antoine Pitrou
On Fri, 30 Mar 2012 04:21:22 +0200 victor.stinner python-check...@python.org wrote: diff --git a/pep-0418.txt b/pep-0418.txt --- a/pep-0418.txt +++ b/pep-0418.txt @@ -190,13 +190,13 @@ Name Resolution Adjusted by NTP? Action on suspend

Re: [Python-Dev] Integrating the PEP 397 launcher

2012-03-30 Thread Vinay Sajip
martin at v.loewis.de writes: Now that we do have the PEP, I think that should be done properly. I thought you offered to rewrite it. Formally, I could accept the PEP being withdrawn, and the feature integrated anyway, but I still consider that bad style. So: I can offer to rewrite the

Re: [Python-Dev] datetime module and pytz with dateutil

2012-03-30 Thread Serhiy Storchaka
28.03.12 23:20, Andrew Svetlov написав(ла): I figured out what pytz and dateutil are not mentioned in python docs for datetime module. It's clean why these libs is not a part of Python Libraries — but that's not clean for Docs. I don't understand why Python may not include the pytz. The Olson

Re: [Python-Dev] peps: PEP 418: Fill the Adjusted by NTP column of the summary table

2012-03-30 Thread Victor Stinner
diff --git a/pep-0418.txt b/pep-0418.txt --- a/pep-0418.txt +++ b/pep-0418.txt @@ -190,13 +190,13 @@  Name                       Resolution       Adjusted by NTP?  Action on suspend  =  ===     = Is it supposed to be

Re: [Python-Dev] Bug in generator if the generator in created in a C thread

2012-03-30 Thread Tim Lesher
On Thu, Mar 29, 2012 at 17:26, Victor Stinner victor.stin...@gmail.com wrote: The problem is not the frame, but the Python thread state referenced by the frame. It's a private attribute. My patch just updates this reference before running the generator (and it clears the reference when the

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Etienne Robillard
On 03/29/2012 06:07 PM, R. David Murray wrote: On Thu, 29 Mar 2012 23:00:20 +0200, Stefan Behnelstefan...@behnel.de wrote: R. David Murray, 29.03.2012 22:31: On Thu, 29 Mar 2012 13:09:17 -0700, Guido van Rossum wrote: On Thu, Mar 29, 2012 at 12:58 PM, R. David Murray wrote: Some of us have

Re: [Python-Dev] datetime module and pytz with dateutil

2012-03-30 Thread R. David Murray
On Fri, 30 Mar 2012 13:38:13 +0300, Serhiy Storchaka storch...@gmail.com wrote: 28.03.12 23:20, Andrew Svetlov написав(ла): I figured out what pytz and dateutil are not mentioned in python docs for datetime module. It's clean why these libs is not a part of Python Libraries —

Re: [Python-Dev] datetime module and pytz with dateutil

2012-03-30 Thread Andrew Svetlov
I filed the http://bugs.python.org/issue14448 BTW. On Fri, Mar 30, 2012 at 3:47 PM, R. David Murray rdmur...@bitdance.com wrote: On Fri, 30 Mar 2012 13:38:13 +0300, Serhiy Storchaka storch...@gmail.com wrote: 28.03.12 23:20, Andrew Svetlov написав(ла): I figured out what pytz and dateutil

Re: [Python-Dev] datetime module and pytz with dateutil

2012-03-30 Thread Nick Coghlan
On Fri, Mar 30, 2012 at 10:47 PM, R. David Murray rdmur...@bitdance.com wrote: On Fri, 30 Mar 2012 13:38:13 +0300, Serhiy Storchaka storch...@gmail.com wrote: 28.03.12 23:20, Andrew Svetlov написав(ла): I figured out what pytz and dateutil are not mentioned in python docs for datetime

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Guido van Rossum
Etienne, I have not understood either of your messages in this thread. They just did not make sense to me. Do you actually understand the issue at hand? --Guido On Friday, March 30, 2012, Etienne Robillard wrote: On 03/29/2012 06:07 PM, R. David Murray wrote: On Thu, 29 Mar 2012 23:00:20

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Etienne Robillard
Hi Guido, I'm sorry for being unclear! I just try actually to learn what thoses consequences for theses 'unattended' mutations in dictionary key lookups could be, :-) however, it seems now that I might have touch a nerve without realizing it. I would therefore appreciate more light on this

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Etienne Robillard
Multiple threads can agree by convention not to mutate a shared dict, there's no great need for enforcement. Multiple processes can't share dicts. its not sure I get completely the meaning of mutate... And if possible, I would like also the rational for the 2nd phrase while we're at it as

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Stefan Behnel
Etienne Robillard, 30.03.2012 17:45: Sorry also if this is OT... :) Yes, it is. Please do as Nick told you. Stefan ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Etienne Robillard
you wish...are you also truth allergic or irritated by the consequences of free speech ? Please stop giving me orders. You don't even know me and this is at all not necessary and good netiquette if you want to bring a point to ponder. Sorry for others who thinks this is not OT as I its

[Python-Dev] Summary of Python tracker Issues

2012-03-30 Thread Python tracker
ACTIVITY SUMMARY (2012-03-23 - 2012-03-30) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open3359 (+13) closed 22871 (+42) total 26230 (+55) Open issues

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Stefan Behnel
Etienne Robillard, 30.03.2012 18:08: are you also truth allergic or irritated by the consequences of free speech ? Please note that free speech is a concept that is different from asking beginner's computer science questions on the core developer mailing list of a software development project.

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Etienne Robillard
your reasoning is pathetic at best. i pass... Thanks for the tip :-) Cheers, Etienne On 03/30/2012 12:18 PM, Stefan Behnel wrote: Etienne Robillard, 30.03.2012 18:08: are you also truth allergic or irritated by the consequences of free speech ? Please note that free speech is a concept

Re: [Python-Dev] [Python-checkins] cpython (3.2): Issue #14409: IDLE doesn't not execute commands from shell with default

2012-03-30 Thread Andrew Svetlov
Thank you for mentoring. I will fix NEWS if you help me with better text. The bug fixed is that commit is: IDLE has 3 configs: user, system default and hardcoded in python code. Last one had bad binding for Return key. Usually this config is never used: user or system ones overrides former. But

[Python-Dev] OT: refusal to listen and learn [was Re: Issue 14417: consequences of new dict runtime error]

2012-03-30 Thread Ethan Furman
Etienne Robillard wrote: your reasoning is pathetic at best. i pass... Thanks for the tip :-) The Python Developer list is for the discussion of developing Python, not for teaching basic programming. You are being rude, and a smiley does not make you less rude. I am adding you to my

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Etienne Robillard
On 03/30/2012 02:23 PM, Ethan Furman wrote: Etienne Robillard wrote: your reasoning is pathetic at best. i pass... Thanks for the tip :-) The Python Developer list is for the discussion of developing Python, not for teaching basic programming. You are being rude, and a smiley does not make

Re: [Python-Dev] PEP 418: Add monotonic clock

2012-03-30 Thread Lennart Regebro
The overview of the different monotonic clocks was interesting, because only one of them is adjusted by NTP, and that's the unix CLOCK_MONOTONIC. Hence we don't need a raw=False flag, which I previously suggested, we only need to not use CLOCK_MONOTONIC (which the PEP psuedo-code indeed also does

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Etienne Robillard
On 03/30/2012 03:02 PM, Guido van Rossum wrote: Hey Etienne, I am honestly trying to understand your contribution but you seem to have started a discussion about free speech. Trust me that we don't mind your contributions, we're just trying to understand what you're saying, and the free speech

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread R. David Murray
On Fri, 30 Mar 2012 15:13:36 -0400, Etienne Robillard animelo...@gmail.com wrote: So far I was only attempting to verify whether this is related to PEP-416 or not. If this is indeed related PEP 416, then I must obviously attest that I must still understand why a immutable dict would prevent

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Guido van Rossum
On Fri, Mar 30, 2012 at 12:13 PM, Etienne Robillard animelo...@gmail.com wrote: On 03/30/2012 03:02 PM, Guido van Rossum wrote: Hey Etienne, I am honestly trying to understand your contribution but you seem to have started a discussion about free speech. Trust me that we don't mind your

Re: [Python-Dev] [Python-checkins] cpython: Issue #14065: Added cyclic GC support to ET.Element

2012-03-30 Thread Benjamin Peterson
2012/3/30 eli.bendersky python-check...@python.org: http://hg.python.org/cpython/rev/0ca32013d77e changeset:   75997:0ca32013d77e parent:      75995:cf2e74e0b7d4 user:        Eli Bendersky eli...@gmail.com date:        Fri Mar 30 16:38:33 2012 +0300 summary:  Issue #14065: Added cyclic GC

Re: [Python-Dev] PEP 418: Add monotonic clock

2012-03-30 Thread Guido van Rossum
On Fri, Mar 30, 2012 at 12:01 PM, Lennart Regebro rege...@gmail.com wrote: The overview of the different monotonic clocks was interesting, because only one of them is adjusted by NTP, and that's the unix CLOCK_MONOTONIC. Hence we don't need a raw=False flag, which I previously suggested, we

[Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Victor Stinner
Hi, Windows provides two main monotonic clocks: QueryPerformanceCounter() and GetTickCount(). QueryPerformanceCounter() has a good accuracy (0.3 ns - 5 ns) but has various issues and is know to not have a steady rate. GetTickCount() has a worse accuracy (1 ms - 15 ms) but is more stable and

Re: [Python-Dev] PEP 418: Add monotonic clock

2012-03-30 Thread R. David Murray
On Fri, 30 Mar 2012 12:40:25 -0700, Guido van Rossum gu...@python.org wrote: But for the other, I'm still at a loss, and that name is the most important one. We can't call it steady because it isn't always. highres or hires sounds awkward; try_monotonic or try_steady are even more awkward. I

Re: [Python-Dev] PEP 418: Add monotonic clock

2012-03-30 Thread Yury Selivanov
On 2012-03-30, at 3:40 PM, Guido van Rossum wrote: I still think the name monotonic give the wrong impression; I would be happy calling it steady. Simple google search comparison shows that people ask about 'monotonic' clock in python, not 'steady'. How about following Nick's (if I recall

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Guido van Rossum
On Fri, Mar 30, 2012 at 1:21 PM, Victor Stinner victor.stin...@gmail.com wrote: Windows provides two main monotonic clocks: QueryPerformanceCounter() and GetTickCount(). QueryPerformanceCounter() has a good accuracy (0.3 ns - 5 ns) but has various issues and is know to not have a steady rate.

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Guido van Rossum
On Fri, Mar 30, 2012 at 1:52 PM, Guido van Rossum gu...@python.org wrote: On Fri, Mar 30, 2012 at 1:21 PM, Victor Stinner victor.stin...@gmail.com wrote: Windows provides two main monotonic clocks: QueryPerformanceCounter() and GetTickCount(). QueryPerformanceCounter() has a good accuracy (0.3

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Guido van Rossum
Possibly we really do need two timers, one for measuring short intervals and one for measuring long intervals? Perhaps we can use this to decide on the names? Anyway, the more I think about it, the more I believe these functions should have very loose guarantees, and instead just cater to common

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Cameron Simpson
On 30Mar2012 13:52, Guido van Rossum gu...@python.org wrote: | (In fact, this even argues against having both the timer with fallback | and the timer without fallback. So maybe we should just have a single | timer function, *with* fallback, and a separate mechanism to inquire | its properties.)

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Guido van Rossum
On Fri, Mar 30, 2012 at 2:43 PM, Cameron Simpson c...@zip.com.au wrote: On 30Mar2012 13:52, Guido van Rossum gu...@python.org wrote: | (In fact, this even argues against having both the timer with fallback | and the timer without fallback. So maybe we should just have a single | timer

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Etienne Robillard
On 03/30/2012 03:27 PM, Guido van Rossum wrote: On Fri, Mar 30, 2012 at 12:13 PM, Etienne Robillard animelo...@gmail.com wrote: On 03/30/2012 03:02 PM, Guido van Rossum wrote: Hey Etienne, I am honestly trying to understand your contribution but you seem to have started a discussion about

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Victor Stinner
Can you go into more detail about QPC()'s issues? Yes, see the PEP: http://www.python.org/dev/peps/pep-0418/#windows-queryperformancecounter What is unsteady about its rate? Hum, I read that you can expect a drift between QPC and GetTickCount. I don't have exact numbers. There are also issues

Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012-03-30 Thread Victor Stinner
No, not really. Anyways, I guess I'll have to further dig down why is PEP-416 is really important to Python and why it was likewise rejected, supposing I confused the pep 416 and issue 14417 along the way.. :-) The frozendict builtin type was rejected, but we are going to add

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Cameron Simpson
On 30Mar2012 15:21, Guido van Rossum gu...@python.org wrote: | On Fri, Mar 30, 2012 at 2:43 PM, Cameron Simpson c...@zip.com.au wrote: | Given the subtlety sought for various purposes, people should be | calling: |  T = time.getclock(flags) | and then later calling: |  T.now() | to get their

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Guido van Rossum
Given the amount of disagreement I sense, I think we'll need to wait for more people to chime in. On Fri, Mar 30, 2012 at 3:47 PM, Victor Stinner victor.stin...@gmail.com wrote: Can you go into more detail about QPC()'s issues? Yes, see the PEP:

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Guido van Rossum
On Fri, Mar 30, 2012 at 4:44 PM, Cameron Simpson c...@zip.com.au wrote: [Lots of good stuff] Maybe you and Victor should try to merge your proposals off-line and then get back with a new proposal here. Make the epoch available in the clock wrapper as a property. At least then there's a

Re: [Python-Dev] PEP 418: Add monotonic clock

2012-03-30 Thread Steven D'Aprano
Guido van Rossum wrote: But for the other, I'm still at a loss, and that name is the most important one. We can't call it steady because it isn't always. highres or hires sounds awkward; try_monotonic or try_steady are even more awkward. I looked in an online thesaurus and here's a list of what

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Victor Stinner
2012/3/31 Guido van Rossum gu...@python.org: Given the amount of disagreement I sense, I think we'll need to wait for more people to chime in. I hope that the PEP now gives enough data to help to choose the best API. Hum, I read that you can expect a drift between QPC and GetTickCount. I

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Glyph
On Mar 30, 2012, at 8:51 PM, Victor Stinner wrote: time.highres() (QPC) rate is only steady during a short duration QPC is not even necessarily steady for a short duration, due to BIOS bugs, unless the code running your timer is bound to a single CPU core.

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Victor Stinner
There seem to be a few competing features for clocks that people want:  - monotonic - never going backward at all  - high resolution These features look to be exclusive on Windows. On other platforms, it looks like monotonic clocks are always the most accurate clocks. So I don't think that we

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Guido van Rossum
On Fri, Mar 30, 2012 at 5:51 PM, Victor Stinner victor.stin...@gmail.com wrote: 2012/3/31 Guido van Rossum gu...@python.org: Given the amount of disagreement I sense, I think we'll need to wait for more people to chime in. I hope that the PEP now gives enough data to help to choose the best

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Guido van Rossum
On Fri, Mar 30, 2012 at 6:24 PM, Victor Stinner victor.stin...@gmail.com wrote: There seem to be a few competing features for clocks that people want:  - monotonic - never going backward at all  - high resolution These features look to be exclusive on Windows. On other platforms, it looks

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Glyph
On Mar 30, 2012, at 9:32 PM, Guido van Rossum wrote: - no steps You mean not adjusted by NTP? Except CLOCK_MONOTONIC on Linux, no monotonic clock is adjusted by NTP. On Linux, there is CLOCK_MONOTONIC_RAW, but it is only available on recent Linux kernel (2.6.28). Do you think that it

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Victor Stinner
Impact: A timeout may be 42 seconds shorter than the requested duration if is uses QPC. For a scheduler, a task would be scheduled at the right moment. I don't understand this paragraph. And why is it always exactly a loss of 42 seconds? Sorry, it's late here, I'm too tired. A jump of 42

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Victor Stinner
(...)  By contrast, stepping only happens if your local clock is just set incorrectly and the re-sync delta has more to do with administrative error or failed batteries than differences in timekeeping accuracy. Are you talking about CLOCK_REALTIME or CLOCK_MONOTONIC? Victor

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Glyph
On Mar 30, 2012, at 10:17 PM, Victor Stinner wrote: (...) By contrast, stepping only happens if your local clock is just set incorrectly and the re-sync delta has more to do with administrative error or failed batteries than differences in timekeeping accuracy. Are you talking about

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Glyph
On Mar 30, 2012, at 10:25 PM, Glyph wrote: On Mar 30, 2012, at 10:17 PM, Victor Stinner wrote: (...) By contrast, stepping only happens if your local clock is just set incorrectly and the re-sync delta has more to do with administrative error or failed batteries than differences in

Re: [Python-Dev] PEP 418: Add monotonic clock

2012-03-30 Thread Terry Reedy
On 3/30/2012 8:26 PM, Steven D'Aprano wrote: hires is a real English word, the present tense verb for engaging the service or labour of someone or something in return for payment, as in he hires a gardener to mow the lawn. Can we please eliminate it from consideration I agree. Heavy cognitive

Re: [Python-Dev] [Python-checkins] cpython: Issue #14065: Added cyclic GC support to ET.Element

2012-03-30 Thread Eli Bendersky
On Fri, Mar 30, 2012 at 21:30, Benjamin Peterson benja...@python.orgwrote: +def test_cyclic_gc(self): +class ShowGC: +def __init__(self, flaglist): +self.flaglist = flaglist +def __del__(self): +