Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-03-19 Thread Stefan Behnel
Larry Hastings, 19.03.2013 05:45: The original impetus for Argument Clinic was adding introspection information for builtins [...] On to the representation. Consider the function def foo(arg, b=3, *, kwonly='a'): pass [...] 4. Store a string that looks like the Python

Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-03-19 Thread Nick Coghlan
On Mon, Mar 18, 2013 at 11:08 PM, Stefan Behnel stefan...@behnel.de wrote: I can't see why the size would matter in any way. We're mildly concerned about the possible impact on the size of the ever-growing CPython binaries. However, it turns out that this is a case where readability and brevity

Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-03-19 Thread Serhiy Storchaka
On 19.03.13 06:45, Larry Hastings wrote: 4. Store a string that looks like the Python declaration of the signature, and parse it (Nick's suggestion). For foo above, this would be (arg,b=3,*,kwonly='a'). Length: 23 bytes. Strip parenthesis and it will be only 21 bytes long. We'd want one

[Python-Dev] Tarfile CLI

2013-03-19 Thread Serhiy Storchaka
There is a proposition to add a command line interface to tarfile module. It will be useful on platforms where tar is not included in the base system. The question is about interface. Should it be a subset of tar options (-t as --extract, -t as --list, -f to specify an archive name) or be

Re: [Python-Dev] Tarfile CLI

2013-03-19 Thread Serhiy Storchaka
On 19.03.13 09:52, Serhiy Storchaka wrote: There is a proposition to add a command line interface to tarfile module. Link: http://bugs.python.org/issue13477 ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Recent changes to TextIOWrapper and its tests

2013-03-19 Thread Serhiy Storchaka
On 18.03.13 22:26, Jeff Allen wrote: The puzzle is that it requires t.read() to succeed. When I insert a check for bytes type in all the places it seems necessary in my code, I pass the first two conditions, but since t.read() also raises TypeError, the overall test fails. Is reading the stream

Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-03-19 Thread Larry Hastings
On 03/19/2013 12:37 AM, Serhiy Storchaka wrote: On 19.03.13 06:45, Larry Hastings wrote: 4. Store a string that looks like the Python declaration of the signature, and parse it (Nick's suggestion). For foo above, this would be (arg,b=3,*,kwonly='a'). Length: 23 bytes. Strip parenthesis and

Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-03-19 Thread Ronald Oussoren
On 19 Mar, 2013, at 10:24, Larry Hastings la...@hastings.org wrote: We'd want one more mild hack: the DSL will support positional parameters, and inspect.Signature supports positional parameters, so it'd be nice to render that information. But we can't represent that in Python syntax

Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-03-19 Thread Larry Hastings
On 03/19/2013 12:23 AM, Nick Coghlan wrote: On Mon, Mar 18, 2013 at 11:08 PM, Stefan Behnel stefan...@behnel.de wrote: My first idea for implementation: add a def x to the front and : pass to the end Why not require it to be there already? Maybe more like def foo(arg, b=3, *,

Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-03-19 Thread Antoine Pitrou
Le Tue, 19 Mar 2013 03:00:45 -0700, Larry Hastings la...@hastings.org a écrit : As for handling optional argument groups, my gut feeling is that we're better off not leaking it out of Argument Clinic--don't expose it in this string we're talking about, and don't add support for it in the

Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-03-19 Thread Nick Coghlan
On Tue, Mar 19, 2013 at 3:00 AM, Larry Hastings la...@hastings.org wrote: Why not require it to be there already? Maybe more like def foo(arg, b=3, *, kwonly='a'): ... (i.e. using Ellipsis instead of pass, so that it's clear that it's not an empty function but one the

Re: [Python-Dev] [Python-checkins] peps: New DSL syntax and slightly changed semantics for the Argument Clinic DSL.

2013-03-19 Thread Stefan Krah
Guido van Rossum gu...@python.org wrote: On Mon, Mar 18, 2013 at 3:36 AM, Stefan Krah ste...@bytereef.org wrote: Larry Hastings la...@hastings.org wrote: * The DSL currently makes no provision for specifying per-parameter type annotations. This is something explicitly supported in

Re: [Python-Dev] Rough idea for adding introspection information for builtins

2013-03-19 Thread Barry Warsaw
On Mar 18, 2013, at 09:45 PM, Larry Hastings wrote: 4. Store a string that looks like the Python declaration of the signature, and parse it (Nick's suggestion). For foo above, this would be (arg,b=3,*,kwonly='a'). Length: 23 bytes. Very nice. -Barry

Re: [Python-Dev] [Python-checkins] cpython: ../bug-fixes/http_error_interface/.hg/last-message.txt

2013-03-19 Thread Senthil Kumaran
Looks like I used hg commit -m /path/to/.hg/last-message.txt instead of hg commit -l /path/to/.hg/last-message.txt I have amended it, merged it and pushed it again. On Tue, Mar 19, 2013 at 12:04 PM, senthil.kumaran python-check...@python.org wrote: http://hg.python.org/cpython/rev/4f2080e9eee2

Re: [Python-Dev] [Python-checkins] cpython (2.7): Issue #9090 : Error code 10035 calling socket.recv() on a socket with a timeout

2013-03-19 Thread Kristján Valur Jónsson
Yes, it is a symbol problem on unix. Working on it. -Original Message- From: Python-checkins [mailto:python-checkins-bounces+kristjan=ccpgames@python.org] On Behalf Of Senthil Kumaran Sent: 19. mars 2013 12:28 To: swesk...@gmail.com Cc: python-check...@python.org Subject: Re:

Re: [Python-Dev] [Python-checkins] cpython (2.7): Issue #9090 : Error code 10035 calling socket.recv() on a socket with a timeout

2013-03-19 Thread Kristján Valur Jónsson
Apparently timemodule is not a built-in module on linux. But it is on windows. Funny! -Original Message- From: Python-Dev [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Kristján Valur Jónsson Sent: 19. mars 2013 12:34 To: python-dev@python.org Subject: Re:

Re: [Python-Dev] [Python-checkins] cpython (2.7): Issue #9090 : Error code 10035 calling socket.recv() on a socket with a timeout

2013-03-19 Thread Guido van Rossum
On Tue, Mar 19, 2013 at 11:08 AM, kristjan.jonsson python-check...@python.org wrote: http://hg.python.org/cpython/rev/8ec39bfd1f01 changeset: 82764:8ec39bfd1f01 branch: 2.7 parent: 82740:b10ec5083a53 user:Kristján Valur Jónsson swesk...@gmail.com date:Tue Mar 19

[Python-Dev] Early results from Argument Clinic automation discussion

2013-03-19 Thread Larry Hastings
Mark Shannon, Dmitry Jemerov (from PyCharm) and I sat down to talk about rearchitecting the Argument Clinic prototype to make it easily to interact with. We came up with the following. The DSL will now produce an intermediate representation. The output will consume this intermediate

Re: [Python-Dev] cpython: Closes issue 17467. Add readline and readlines support to

2013-03-19 Thread Antoine Pitrou
On Wed, 20 Mar 2013 01:22:58 +0100 (CET) michael.foord python-check...@python.org wrote: http://hg.python.org/cpython/rev/684b75600fa9 changeset: 82811:684b75600fa9 user:Michael Foord mich...@voidspace.org.uk date:Tue Mar 19 17:22:51 2013 -0700 summary: Closes issue

Re: [Python-Dev] [Python-checkins] cpython: Issue #17385: Fix quadratic behavior in threading.Condition

2013-03-19 Thread Ezio Melotti
On Mon, Mar 11, 2013 at 3:14 AM, Ezio Melotti ezio.melo...@gmail.com wrote: Hi, On Mon, Mar 11, 2013 at 2:58 AM, raymond.hettinger python-check...@python.org wrote: http://hg.python.org/cpython/rev/0f86b51f8f8b changeset: 82592:0f86b51f8f8b user:Raymond Hettinger pyt...@rcn.com

Re: [Python-Dev] [Python-checkins] cpython: #15927: Fix cvs.reader parsing of escaped \r\n with quoting off.

2013-03-19 Thread Kristján Valur Jónsson
The compiler complains about this line: if (c == '\n' | c=='\r') { Perhaps you wanted a Boolean operator? -Original Message- From: Python-checkins [mailto:python-checkins-bounces+kristjan=ccpgames@python.org] On Behalf Of r.david.murray Sent: 19. mars 2013 19:42 To:

Re: [Python-Dev] [Python-checkins] cpython: #15927: Fix cvs.reader parsing of escaped \r\n with quoting off.

2013-03-19 Thread R. David Murray
On Wed, 20 Mar 2013 03:16:53 -, =?utf-8?B?S3Jpc3Rqw6FuIFZhbHVyIErDs25zc29u?= krist...@ccpgames.com wrote: The compiler complains about this line: if (c == '\n' | c=='\r') { Perhaps you wanted a Boolean operator? Indeed, yes. --David ___

Re: [Python-Dev] [Python-checkins] peps: update 2.7.4 release dates

2013-03-19 Thread Andrew Svetlov
Are you sure about 2.7.4 2012-04-06? I mean 2012 year. On Tue, Mar 19, 2013 at 9:15 PM, benjamin.peterson python-check...@python.org wrote: http://hg.python.org/peps/rev/ce17779c395c changeset: 4810:ce17779c395c user:Benjamin Peterson benja...@python.org date:Tue Mar 19

Re: [Python-Dev] cpython: Closes issue 17467. Add readline and readlines support to

2013-03-19 Thread Michael Foord
On 19 Mar 2013, at 17:26, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 20 Mar 2013 01:22:58 +0100 (CET) michael.foord python-check...@python.org wrote: http://hg.python.org/cpython/rev/684b75600fa9 changeset: 82811:684b75600fa9 user:Michael Foord mich...@voidspace.org.uk