Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)

2012-04-02 Thread Cameron Simpson
On 03Apr2012 07:51, Lennart Regebro wrote: | I like the aim of letting the user control what clock it get, but I | find this API pretty horrible: | | >  clock = get_clock(T_MONOTONIC|T_HIRES) or get_clock(T_MONOTONIC) FWIW, the leading "T_" is now gone, so it would now read: clock = get_clock

Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)

2012-04-02 Thread Lennart Regebro
I like the aim of letting the user control what clock it get, but I find this API pretty horrible: >  clock = get_clock(T_MONOTONIC|T_HIRES) or get_clock(T_MONOTONIC) Just my 2 groszy. //Lennart ___ Python-Dev mailing list Python-Dev@python.org http://

[Python-Dev] Preparation for VS2010 - MSDN for Windows build slaves, core devs

2012-04-02 Thread Brian Curtin
Hi all, If you are a running a build slave or otherwise have an MSDN account for development work, please check that your MSDN subscription is still in effect. If the subscription expired, please let me know in private what your subscriber ID is along with the email address you use for the account

Re: [Python-Dev] an alternative to embedding policy in PEP 418

2012-04-02 Thread Cameron Simpson
On 02Apr2012 14:59, Glenn Linderman wrote: | On 4/2/2012 2:40 PM, Nick Coghlan wrote: | > On Tue, Apr 3, 2012 at 3:44 AM, Glenn Linderman wrote: | >> > One thing I don't like about the idea of fallback being buried under some | >> > API is that the efficiency of that API on each call must be

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread R. David Murray
On Tue, 03 Apr 2012 00:44:32 +0200, Antoine Pitrou wrote: > On Tue, 3 Apr 2012 07:43:20 +1000 > Nick Coghlan wrote: > > > On Mon, Apr 2, 2012 at 9:50 PM, Antoine Pitrou wrote: > > > That said, these files will always be outdated, so we might as well > > > remove them so that at least git / bzr

Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)

2012-04-02 Thread Cameron Simpson
On 03Apr2012 07:51, I wrote: | Changelog: updates based on suggestions from Victor Stinner: "flat" API | calls to get time directly, make now() a method instead of a property, | default flags for get_clock(), adjust hr_clock() to hires_clock(0 for | consistency. BTW, I'd also happily change T_HIRE

Re: [Python-Dev] an alternative to embedding policy in PEP 418

2012-04-02 Thread Glenn Linderman
On 4/2/2012 2:40 PM, Nick Coghlan wrote: On Tue, Apr 3, 2012 at 3:44 AM, Glenn Linderman wrote: > One thing I don't like about the idea of fallback being buried under some > API is that the efficiency of that API on each call must be less than the > efficiency of directly calling an API to g

Re: [Python-Dev] an alternative to embedding policy in PEP 418

2012-04-02 Thread Nick Coghlan
On Tue, Apr 3, 2012 at 3:44 AM, Glenn Linderman wrote: > One thing I don't like about the idea of fallback being buried under some > API is that the efficiency of that API on each call must be less than the > efficiency of directly calling an API to get a single clock's time. No, that's a misunde

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread Antoine Pitrou
On Tue, 3 Apr 2012 07:43:20 +1000 Nick Coghlan wrote: > On Mon, Apr 2, 2012 at 9:50 PM, Antoine Pitrou wrote: > > That said, these files will always be outdated, so we might as well > > remove them so that at least git / bzr users don't get confused. > > Given that they were originally *added*

Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)

2012-04-02 Thread Cameron Simpson
On 03Apr2012 07:38, I wrote: | On 02Apr2012 13:37, Victor Stinner wrote: | | Should I use | | MONTONIC_CLOCKS or HIRES_CLOCKS when I would like a monotonic and | | high-resolution clock? | | Note that you don't need to provide a clock list at all; get_clock(0 | will use ALL_CLOCKS by default, and

Re: [Python-Dev] an alternative to embedding policy in PEP 418

2012-04-02 Thread Cameron Simpson
On 02Apr2012 10:44, Glenn Linderman wrote: | On 4/2/2012 4:37 AM, Victor Stinner wrote: | > The API looks much more complex than the API proposed in PEP 418 just | > to get the time. You have to call a function to get a function, and | > then call the function, instead of just calling a function d

Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)

2012-04-02 Thread Cameron Simpson
On 03Apr2012 07:38, I wrote: | On 02Apr2012 13:37, Victor Stinner wrote: | | Could you please update your code according to my remarks? I will try | | to integrate it into the PEP. A PEP should list all alternatives! New code here: https://bitbucket.org/cameron_simpson/css/src/91848af8663b/lib

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread Nick Coghlan
On Mon, Apr 2, 2012 at 9:50 PM, Antoine Pitrou wrote: > That said, these files will always be outdated, so we might as well > remove them so that at least git / bzr users don't get confused. Given that they were originally *added* by core devs that are (or were) using git/bzr for their own local

Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)

2012-04-02 Thread Cameron Simpson
On 02Apr2012 13:37, Victor Stinner wrote: | > I've just finished sketching out a skeleton here: | >   https://bitbucket.org/cameron_simpson/css/src/fb476fcdcfce/lib/python/cs/clockutils.py | | get_clock() returns None if no clock has the requested flags, whereas | I expected an exception (LookupE

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread Scott Dial
On 4/2/2012 11:03 AM, Chris Angelico wrote: > On Mon, Apr 2, 2012 at 9:50 PM, Antoine Pitrou wrote: >> That said, these files will always be outdated, so we might as well >> remove them so that at least git / bzr users don't get confused. > > Apologies for what may be a stupid suggestion, but is

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

2012-04-02 Thread Glyph Lefkowitz
On Apr 2, 2012, at 10:39 AM, Kristján Valur Jónsson wrote: > "no steps" is something unquantifiable. All time has steps in it. "No steps" means something very specific when referring to time APIs. As I recently explained here: . -gly

Re: [Python-Dev] an alternative to embedding policy in PEP 418

2012-04-02 Thread Glenn Linderman
On 4/2/2012 4:37 AM, Victor Stinner wrote: The API looks much more complex than the API proposed in PEP 418 just to get the time. You have to call a function to get a function, and then call the function, instead of just calling a function directly. Instead of returning an object with a now() me

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

2012-04-02 Thread Guido van Rossum
You seem to have missed the episode where I explained that caching the last value in order to avoid going backwards doesn't work -- at least not if the cached value is internal to the API implementation. 2012/4/2 Kristján Valur Jónsson : > > >> -Original Message- >> From: python-dev-bounce

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

2012-04-02 Thread Kristján Valur Jónsson
> -Original Message- > From: python-dev-bounces+kristjan=ccpgames@python.org > [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On > Behalf Of Cameron Simpson > Sent: 30. mars 2012 21:43 > There seem to be a few competing features for clocks that people want: > > - mono

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

2012-04-02 Thread Lukas Lueg
At least on some versions of Windows (e.g. XP) the QueryPerformanceCounter()-API is more or less only a stub around a call to RDTSC which in turn varies in frequency on (at least) Intel Pentium 4, Pentium M and Xeon processors (bound to the current clock frequencies). __

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread Chris Angelico
On Mon, Apr 2, 2012 at 9:50 PM, Antoine Pitrou wrote: > That said, these files will always be outdated, so we might as well > remove them so that at least git / bzr users don't get confused. Apologies for what may be a stupid suggestion, but is it possible to write a script that generates .gitign

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

2012-04-02 Thread Guido van Rossum
On Mon, Apr 2, 2012 at 2:31 AM, Sam Partington wrote: > On 30 March 2012 21:52, Guido van Rossum wrote: >> Oh dear. I really want to say that 15 ms is good enough. Some possible >> exceptions I can think of: >> >> - Profiling. But this really wants to measure CPU time anyways, and it >> already u

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread Stefan Behnel
Antoine Pitrou, 02.04.2012 13:50: > On Sun, 1 Apr 2012 19:44:00 -0500 > Brian Curtin wrote: >> On Sun, Apr 1, 2012 at 17:31, Matěj Cepl wrote: >>> On 1.4.2012 23:46, Brian Curtin wrote: For what reason? Are the git or bzr files causing issues on HG? >>> >>> >>> No, but wrong .gitignore causes

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread Antoine Pitrou
On Sun, 1 Apr 2012 19:44:00 -0500 Brian Curtin wrote: > On Sun, Apr 1, 2012 at 17:31, Matěj Cepl wrote: > > On 1.4.2012 23:46, Brian Curtin wrote: > >> > >> For what reason? Are the git or bzr files causing issues on HG? > > > > > > No, but wrong .gitignore causes issues with git repo obtained v

Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)

2012-04-02 Thread Victor Stinner
> I've just finished sketching out a skeleton here: > >  https://bitbucket.org/cameron_simpson/css/src/fb476fcdcfce/lib/python/cs/clockutils.py get_clock() returns None if no clock has the requested flags, whereas I expected an exception (LookupError or NotImplementError?). get_clock() doesn't re

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread Matěj Cepl
On 2.4.2012 00:52, Guido van Rossum wrote: Please file a bug to get this reviewed and checked in. OK, I don't agree with the reasoning, but I willingly submit to BDFL ;) http://bugs.python.org/issue14472 Matěj ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread Matej Cepl
On 2.4.2012 05:26, Scott Dial wrote: Create an issue on the bug tracker. In the meantime, you can either commit the change to your clone, or you can put your ignores into .git/info/exclude. No reason to be so sore about it, since Git lets you have your own ignore file without requiring it be a tr

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

2012-04-02 Thread Sam Partington
On 30 March 2012 21:52, Guido van Rossum wrote: > Oh dear. I really want to say that 15 ms is good enough. Some possible > exceptions I can think of: > > - Profiling. But this really wants to measure CPU time anyways, and it > already uses a variety of hacks and heuristics to pick the best timer,

Re: [Python-Dev] .{git,bzr}ignore in cpython HG repo

2012-04-02 Thread Tim Golden
On 02/04/2012 07:03, "Martin v. Löwis" wrote: Am 02.04.2012 00:31, schrieb Matěj Cepl: On 1.4.2012 23:46, Brian Curtin wrote: For what reason? Are the git or bzr files causing issues on HG? No, but wrong .gitignore causes issues with git repo obtained via hg-fast-import. If it is meant as an