Re: [Python-Dev] [issue8033] sqlite: broken long integer handling for arguments to user-defined functions

2011-01-05 Thread Virgil Dupras
On 2011-01-05, at 8:16 AM, Phil Le Bienheureux wrote: Hello, I am quite new to development in python, and as a first contribution to the community, I have provided a patch to the issue 8033 (quite trivial). I then ran the test suite an everything was ok. However, the status has not

Re: [Python-Dev] Possible optimization for LOAD_FAST ?

2011-01-05 Thread Terry Reedy
On 1/4/2011 6:39 PM, Guido van Rossum wrote: So, that significantly weakens the argument that this optimization will break unit tests, since I am happy to promise never to optimize these builtins, and any other builtins intended for I/O. This is one comprehensible rule rather than a list of

Re: [Python-Dev] [Python-checkins] devguide: Strip out all generic svn instructions from the FAQ. It's not only

2011-01-05 Thread Terry Reedy
On 1/5/2011 1:18 AM, Eli Bendersky wrote: On Wed, Jan 5, 2011 at 04:13, Nick Coghlan ncogh...@gmail.com Your call as the author, but please reconsider this one. I've found it *hugely* convenient over the years to have these task oriented answers in the FAQ. The problem with the

[Python-Dev] Hello everyone

2011-01-05 Thread yeswanth
Hello everyone, My name is Yeswanth . I am doing my third year Btech in Computer Science in India. My desire is to get into gsoc 2011 . I have been looking over the projects of last year to see where I would fit in. And I found python to be interesting, something I can contribute. I dont know

[Python-Dev] Omit Py_buffer struct from Stable ABI for Python 3.2?

2011-01-05 Thread Nick Coghlan
Currently [1], the implementation and the documentation for PEP 3118's Py_buffer struct don't line up (there's an extra field in the implementation that the PEP doesn't mention). Accordingly, Mark and I think it may be a good idea to leave this structure (and possibly related APIs) out of the

Re: [Python-Dev] Omit Py_buffer struct from Stable ABI for Python 3.2?

2011-01-05 Thread Mark Dickinson
On Wed, Jan 5, 2011 at 12:31 PM, Nick Coghlan ncogh...@gmail.com wrote: Currently [1], the implementation and the documentation for PEP 3118's Py_buffer struct don't line up (there's an extra field in the implementation that the PEP doesn't mention). I think there are actually two such fields:

Re: [Python-Dev] Omit Py_buffer struct from Stable ABI for Python 3.2?

2011-01-05 Thread Antoine Pitrou
On Wed, 5 Jan 2011 12:55:55 + Mark Dickinson dicki...@gmail.com wrote: On Wed, Jan 5, 2011 at 12:31 PM, Nick Coghlan ncogh...@gmail.com wrote: Currently [1], the implementation and the documentation for PEP 3118's Py_buffer struct don't line up (there's an extra field in the

Re: [Python-Dev] Possible optimization for LOAD_FAST ?

2011-01-05 Thread Maciej Fijalkowski
How about not changing semantics and still making this optimization possible? PyPy already has CALL_LIKELY_BUILTIN which checks whether builtins has been altered (by keeping a flag on the module dictionary) and if not, loads a specific builtin on top of value stack. From my current experience, I

Re: [Python-Dev] Omit Py_buffer struct from Stable ABI for Python 3.2?

2011-01-05 Thread Mark Dickinson
On Wed, Jan 5, 2011 at 2:03 PM, Mark Dickinson dicki...@gmail.com wrote: Maybe I'm misunderstanding.  What's the responsibility of a buffer export w.r.t. the obj field---i.e., what should 3rd party code be Grr. *buffer exporter*, not *buffer export*. Mark

Re: [Python-Dev] Omit Py_buffer struct from Stable ABI for Python 3.2?

2011-01-05 Thread Mark Dickinson
On Wed, Jan 5, 2011 at 1:13 PM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 5 Jan 2011 12:55:55 + Mark Dickinson dicki...@gmail.com wrote: The need for obj is a little ugly:  as far as I can tell, it's meaningless for a 3rd-party object that wants to export buffers---it's only

Re: [Python-Dev] Omit Py_buffer struct from Stable ABI for Python 3.2?

2011-01-05 Thread Antoine Pitrou
On Wed, 5 Jan 2011 14:03:41 + Mark Dickinson dicki...@gmail.com wrote: On Wed, Jan 5, 2011 at 1:13 PM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 5 Jan 2011 12:55:55 + Mark Dickinson dicki...@gmail.com wrote: The need for obj is a little ugly:  as far as I can tell, it's

Re: [Python-Dev] Omit Py_buffer struct from Stable ABI for Python 3.2?

2011-01-05 Thread Nick Coghlan
On Thu, Jan 6, 2011 at 12:03 AM, Mark Dickinson dicki...@gmail.com wrote: Maybe I'm misunderstanding.  What's the responsibility of a buffer export w.r.t. the obj field---i.e., what should 3rd party code be filling that obj field with in a call to getbuffer? It should be a pointer to the

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Alexander Belopolsky
On Mon, Jan 3, 2011 at 7:47 PM, Guido van Rossum gu...@python.org wrote: Given the rule garbage in - garbage out, I'd do the most useful thing, which would be to produce a longer output string (and update the docs). This would match the behavior of e.g. '%04d' % y when y . If that means

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Antoine Pitrou
On Wed, 5 Jan 2011 12:33:55 -0500 Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Mon, Jan 3, 2011 at 7:47 PM, Guido van Rossum gu...@python.org wrote: Given the rule garbage in - garbage out, I'd do the most useful thing, which would be to produce a longer output string (and

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Alexander Belopolsky
On Wed, Jan 5, 2011 at 12:48 PM, Antoine Pitrou solip...@pitrou.net wrote: .. Couldn't we deprecate and remove time.accept2dyear? It has been there for backward compatibility since Python 1.5.2. It will be useful for another 50 years or so. (POSIX 2-digit years cover 1969 - 2068.) In any

Re: [Python-Dev] Omit Py_buffer struct from Stable ABI for Python 3.2?

2011-01-05 Thread Stefan Behnel
Mark Dickinson, 05.01.2011 13:55: On Wed, Jan 5, 2011 at 12:31 PM, Nick Coghlan wrote: Currently [1], the implementation and the documentation for PEP 3118's Py_buffer struct don't line up (there's an extra field in the implementation that the PEP doesn't mention). I think there are actually

Re: [Python-Dev] Possible optimization for LOAD_FAST ?

2011-01-05 Thread Guido van Rossum
On Wed, Jan 5, 2011 at 5:27 AM, Maciej Fijalkowski fij...@gmail.com wrote: How about not changing semantics and still making this optimization possible? PyPy already has CALL_LIKELY_BUILTIN which checks whether builtins has been altered (by keeping a flag on the module dictionary) and if not,

Re: [Python-Dev] [Python-checkins] devguide: Strip out all generic svn instructions from the FAQ. It's not only

2011-01-05 Thread Brett Cannon
To those that want to keep those steps in the dev FAQ, go ahead but I recuse myself from maintaining it. Having had so many instances of people asking how do I do this? and me almost always able to go read the dev FAQ has basically made me feel like it is not worth the effort if people are not

Re: [Python-Dev] Hello everyone

2011-01-05 Thread R. David Murray
On Wed, 05 Jan 2011 17:18:00 +0530, yeswanth swamiyeswa...@hotmail.com wrote: My name is Yeswanth . I am doing my third year Btech in Computer Science [...] Can anyone suggest me some areas where I can actually start with developing for this proje Welcome, Yeswanth. Great idea to get

Re: [Python-Dev] Hello everyone

2011-01-05 Thread Brian Curtin
On Wed, Jan 5, 2011 at 05:48, yeswanth swamiyeswa...@hotmail.com wrote: Hello everyone, My name is Yeswanth . I am doing my third year Btech in Computer Science in India. My desire is to get into gsoc 2011 . I have been looking over the projects of last year to see where I would fit in. And I

Re: [Python-Dev] Hello everyone

2011-01-05 Thread Martin v. Löwis
Am 05.01.2011 12:48, schrieb yeswanth: Hello everyone, My name is Yeswanth . I am doing my third year Btech in Computer Science in India. My desire is to get into gsoc 2011 . I have been looking over the projects of last year to see where I would fit in. And I found python to be interesting,

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Guido van Rossum
On Wed, Jan 5, 2011 at 10:12 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Wed, Jan 5, 2011 at 12:48 PM, Antoine Pitrou solip...@pitrou.net wrote: .. Couldn't we deprecate and remove time.accept2dyear? It has been there for backward compatibility since Python 1.5.2. It

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Alexander Belopolsky
On Wed, Jan 5, 2011 at 2:19 PM, Guido van Rossum gu...@python.org wrote: .. extending accepted range is a borderline case IMO. I like accepting all years = 1 when accept2dyear is False. Why = 1? Shouldn't it be = 1900 - maxint? Also, what is your take on always accepting [1000 - 1899]?

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Guido van Rossum
On Wed, Jan 5, 2011 at 12:58 PM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Wed, Jan 5, 2011 at 2:19 PM, Guido van Rossum gu...@python.org wrote: .. extending accepted range is a borderline case IMO. I like accepting all years = 1 when accept2dyear is False. Why = 1?

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Glyph Lefkowitz
On Jan 5, 2011, at 4:33 PM, Guido van Rossum wrote: Shouldn't the logic be to take the current year into account? By the time 2070 comes around, I'd expect 70 to refer to 2070, not to 1970. In fact, I'd expect it to refer to 2070 long before 2070 comes around. All of which makes me think

Re: [Python-Dev] [Python-checkins] r87768 - in python/branches/py3k: Lib/socket.py Lib/test/test_socket.py Misc/NEWS

2011-01-05 Thread Terry Reedy
Issue #7995: When calling accept() on a socket with a timeout, the returned socket is now always non-blocking, regardless of the operating system. Seems clear enough +# Issue #7995: if no default timeout is set and the listening +# socket had a (non-zero) timeout, force the

Re: [Python-Dev] [Python-checkins] devguide: Start a doc on running and writing unit tests.

2011-01-05 Thread Terry Reedy
+The shortest, simplest way of running the test suite is:: + +./python -m test Not on Windows. C:\Programs\Python32./python -m test '.' is not recognized as an internal or external command, operable program or batch file. python -m test works (until it failed, separate issue). I would

Re: [Python-Dev] [Python-checkins] r87768 - in python/branches/py3k: Lib/socket.py Lib/test/test_socket.py Misc/NEWS

2011-01-05 Thread Antoine Pitrou
On Wed, 05 Jan 2011 17:21:23 -0500 Terry Reedy tjre...@udel.edu wrote: Issue #7995: When calling accept() on a socket with a timeout, the returned socket is now always non-blocking, regardless of the operating system. Seems clear enough +# Issue #7995: if no default timeout

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Alexander Belopolsky
On Wed, Jan 5, 2011 at 4:33 PM, Guido van Rossum gu...@python.org wrote: .. Why = 1? Because that's what the datetime module accepts. What the datetime module accepts is irrelevant here. Note that functions affected by accept2dyear are: time.mktime(), time.asctime(), time.strftime() and

Re: [Python-Dev] [Python-checkins] devguide: Start a doc on running and writing unit tests.

2011-01-05 Thread Antoine Pitrou
On Wed, 05 Jan 2011 17:43:32 -0500 Terry Reedy tjre...@udel.edu wrote: Not on Windows. C:\Programs\Python32./python -m test '.' is not recognized as an internal or external command, operable program or batch file. python -m test works (until it failed, separate issue). This will not

Re: [Python-Dev] [Python-checkins] devguide: Start a doc on running and writing unit tests.

2011-01-05 Thread Terry Reedy
+Running +--- Is there a way to skip a particular test, such as one that crashes the test process? Terry ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Guido van Rossum
On Wed, Jan 5, 2011 at 2:55 PM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Wed, Jan 5, 2011 at 4:33 PM, Guido van Rossum gu...@python.org wrote: .. Why = 1? Because that's what the datetime module accepts. What the datetime module accepts is irrelevant here. Not

Re: [Python-Dev] [Python-checkins] devguide: Start a doc on running and writing unit tests.

2011-01-05 Thread Brian Curtin
On Wed, Jan 5, 2011 at 17:00, Terry Reedy tjre...@udel.edu wrote: +Running +--- Is there a way to skip a particular test, such as one that crashes the test process? -x {list of tests to skip} ___ Python-Dev mailing list

Re: [Python-Dev] [Python-checkins] devguide: Start a doc on running and writing unit tests.

2011-01-05 Thread Antoine Pitrou
On Wed, 05 Jan 2011 18:00:18 -0500 Terry Reedy tjre...@udel.edu wrote: +Running +--- Is there a way to skip a particular test, such as one that crashes the test process? -x test_foo ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] [Python-checkins] devguide: Start a doc on running and writing unit tests.

2011-01-05 Thread Brian Curtin
On Jan 5, 2011 4:45 PM, Terry Reedy tjre...@udel.edu wrote: +The shortest, simplest way of running the test suite is:: + +./python -m test Not on Windows. C:\Programs\Python32./python -m test '.' is not recognized as an internal or external command, operable program or batch file.

[Python-Dev] 3.2b2 fails test suite on (my) Windows XP

2011-01-05 Thread Terry Reedy
To test Brett's test running instruction, I ran python -m test # not ./Python! in a Command Prompt window --- Microsoft Windows XP [Version 5.1.2600] == CPython 3.2b2 (r32b2:87398, Dec 19 2010, 22:51:00) [MSC v.1500 32 bit (Intel)] == Windows-XP-5.1.2600-SP3 little-endian ==

Re: [Python-Dev] 3.2b2 fails test suite on (my) Windows XP

2011-01-05 Thread Brian Curtin
On Wed, Jan 5, 2011 at 17:47, Terry Reedy tjre...@udel.edu wrote: To test Brett's test running instruction, I ran python -m test # not ./Python! in a Command Prompt window --- Microsoft Windows XP [Version 5.1.2600] == CPython 3.2b2 (r32b2:87398, Dec 19 2010, 22:51:00) [MSC v.1500 32

Re: [Python-Dev] 3.2b2 fails test suite on (my) Windows XP

2011-01-05 Thread Brian Curtin
On Wed, Jan 5, 2011 at 17:56, Brian Curtin brian.cur...@gmail.com wrote: On Wed, Jan 5, 2011 at 17:47, Terry Reedy tjre...@udel.edu wrote: To test Brett's test running instruction, I ran python -m test # not ./Python! in a Command Prompt window --- Microsoft Windows XP [Version 5.1.2600]

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Alexander Belopolsky
On Wed, Jan 5, 2011 at 6:12 PM, Guido van Rossum gu...@python.org wrote: .. If they both impose some arbitrary limits, it would be easier for users to remember the limits if they were the same for both modules. Unfortunately, that is not possible on 32-bit systems where range supported by say

Re: [Python-Dev] 3.2b2 fails test suite on (my) Windows XP

2011-01-05 Thread Nick Coghlan
On Thu, Jan 6, 2011 at 9:47 AM, Terry Reedy tjre...@udel.edu wrote: To test Brett's test running instruction, I ran python -m test # not ./Python! in a Command Prompt window Does it behave itself if you add -x test_capi to the command line? Cheers, Nick. -- Nick Coghlan   |  

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Guido van Rossum
I'm sorry, but at this point I'm totally confused about what you're asking or proposing. You keep referring to various implementation details and behaviors. Maybe if you summarized how the latest implementation (say python 3.2) works and what you propose to change that would be quicker than this

Re: [Python-Dev] [Python-checkins] devguide: Add a note about a possible starter project.

2011-01-05 Thread Nick Coghlan
On Thu, Jan 6, 2011 at 8:11 AM, brett.cannon python-check...@python.org wrote: +.. todo:: +    See if tempfile or test.support has a context manager that creates and +    deletes a temp file so as to move off of test.support.TESTFN. Yeah, tempfile.TemporaryFile and friends all support the CM

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Alexander Belopolsky
On Wed, Jan 5, 2011 at 9:18 PM, Guido van Rossum gu...@python.org wrote: I'm sorry, but at this point I'm totally confused about what you're asking or proposing. You keep referring to various implementation details and behaviors. Maybe if you summarized how the latest implementation (say

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Guido van Rossum
On Wed, Jan 5, 2011 at 6:46 PM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Wed, Jan 5, 2011 at 9:18 PM, Guido van Rossum gu...@python.org wrote: I'm sorry, but at this point I'm totally confused about what you're asking or proposing. You keep referring to various

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Alexander Belopolsky
On Wed, Jan 5, 2011 at 10:50 PM, Guido van Rossum gu...@python.org wrote: .. I propose to change that to if y 1000:    if accept2dyear:        if 69 = y = 99:            y += 1900        elif 0 = y = 68:            y += 2000        else:            raise ValueError(year out of range) #

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Alexander Belopolsky
On Wed, Jan 5, 2011 at 10:50 PM, Guido van Rossum gu...@python.org wrote: .. But what guarantees do we have that the system functions accept negative values for tm_year on all relevant platforms? Also note that the subject of this thread is limited to time.asctime and time.ctime. The other

Re: [Python-Dev] [Python-checkins] devguide: Start a doc on running and writing unit tests.

2011-01-05 Thread Terry Reedy
On 1/5/2011 5:57 PM, Antoine Pitrou wrote: On Wed, 05 Jan 2011 17:43:32 -0500 Terry Reedytjre...@udel.edu wrote: Not on Windows. C:\Programs\Python32./python -m test Installation, not checkout. '.' is not recognized as an internal or external command, operable program or batch file.

Re: [Python-Dev] [Python-checkins] r87768 - in python/branches/py3k: Lib/socket.py Lib/test/test_socket.py Misc/NEWS

2011-01-05 Thread Terry Reedy
On 1/5/2011 5:43 PM, Antoine Pitrou wrote: On Wed, 05 Jan 2011 17:21:23 -0500 Terry Reedytjre...@udel.edu wrote: Thank you for spotting the contradiction; this is now fixed. I am following your example of looking at checkins. -- Terry Jan Reedy

Re: [Python-Dev] 3.2b2 fails test suite on (my) Windows XP

2011-01-05 Thread Terry Reedy
On 1/5/2011 8:59 PM, Nick Coghlan wrote: On Thu, Jan 6, 2011 at 9:47 AM, Terry Reedytjre...@udel.edu wrote: To test Brett's test running instruction, I ran python -m test # not ./Python! in a Command Prompt window Does it behave itself if you add -x test_capi to the command line? No, it

Re: [Python-Dev] [Python-checkins] devguide: Start a doc on running and writing unit tests.

2011-01-05 Thread Antoine Pitrou
On Thu, 06 Jan 2011 00:34:11 -0500 python -m test works (until it failed, separate issue). This will not run the right interpreter, unless this is an installed build. It is, from 32b2.msi. I have no compiler ;-). Ah, sorry. For the devguide, however, I recommend assuming an