Re: [Python-Dev] 3.2 "What's New"

2010-09-03 Thread Georg Brandl
Am 04.09.2010 01:26, schrieb Raymond Hettinger: > > On Sep 3, 2010, at 3:52 PM, Georg Brandl wrote: > >> Hi, >> >> I'm not sure what the arrangement for the What's New in Python 3.2 document >> is; especially if either Andrew or Raymond still feel in charge for it. > > I'm already working on it

Re: [Python-Dev] 3.2 "What's New"

2010-09-03 Thread Georg Brandl
Am 04.09.2010 01:40, schrieb Victor Stinner: > Le samedi 04 septembre 2010 00:52:38, Georg Brandl a écrit : >> For this weekend's 3.2a2, it would be rather nice to have some more >> coverage of changes in the document, since it is the main thing people >> will look at when determining whether to do

Re: [Python-Dev] 3.2 "What's New"

2010-09-03 Thread Victor Stinner
Le samedi 04 septembre 2010 00:52:38, Georg Brandl a écrit : > For this weekend's 3.2a2, it would be rather nice to have some more > coverage of changes in the document, since it is the main thing people > will look at when determining whether to download and test the alpha. About unicode, Python

Re: [Python-Dev] 3.2 "What's New"

2010-09-03 Thread Raymond Hettinger
On Sep 3, 2010, at 3:52 PM, Georg Brandl wrote: > Hi, > > I'm not sure what the arrangement for the What's New in Python 3.2 document > is; especially if either Andrew or Raymond still feel in charge for it. I'm already working on it. Raymond ___ P

[Python-Dev] 3.2 "What's New"

2010-09-03 Thread Georg Brandl
Hi, I'm not sure what the arrangement for the What's New in Python 3.2 document is; especially if either Andrew or Raymond still feel in charge for it. For this weekend's 3.2a2, it would be rather nice to have some more coverage of changes in the document, since it is the main thing people will l

Re: [Python-Dev] C API doc question

2010-09-03 Thread Georg Brandl
Am 03.09.2010 13:44, schrieb Nick Coghlan: > On Fri, Sep 3, 2010 at 9:19 PM, Amaury Forgeot d'Arc > wrote: >> 2010/9/3 Nick Coghlan : >>> Due to the Unicode API discussion, I happened to be looking at the C >>> API docs at http://docs.python.org/dev/c-api/unicode.html#plain-py-unicode >>> and not

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread Victor Stinner
Le samedi 04 septembre 2010 00:02:59, Georg Brandl a écrit : > What about Py_UNICODE_strcat? If it remains, it needs to be documented as > well. There is already an issue for that: http://bugs.python.org/issue8649 -- Victor Stinner http://www.haypocalc.com/ _

Re: [Python-Dev] r84456 - python/branches/py3k/Doc/c-api/unicode.rst

2010-09-03 Thread Victor Stinner
Le vendredi 03 septembre 2010 20:07:54, Georg Brandl a écrit : > Please add a "versionadded" tag. Oh no, I always forget this one. Done in r84475. -- Victor Stinner http://www.haypocalc.com/ ___ Python-Dev mailing list Python-Dev@python.org http://mail

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread Georg Brandl
Am 03.09.2010 18:24, schrieb Victor Stinner: >> Other than that, ok, let's have them. > > Ok. > > r84455 renames PyUnicode_strdup() to PyUnicode_AsUnicodeCopy(), and r84456 > document it: > > -- > ... cfunction:: Py_UNICODE* PyUnicode_AsUnicodeCopy(PyObject *unicode) > >Create a co

Re: [Python-Dev] Two small PEP ideas

2010-09-03 Thread Guido van Rossum
On Fri, Sep 3, 2010 at 12:50 PM, Brett Cannon wrote: > I guess the real question comes down to whether you want us to bug you > to select the temp dictator or just make a call amongst ourselves? It's okay to bug me only if you can't find or agree on a temp dictator. -- --Guido van Rossum (pytho

Re: [Python-Dev] Two small PEP ideas

2010-09-03 Thread Brett Cannon
On Fri, Sep 3, 2010 at 08:45, Guido van Rossum wrote: > On Fri, Sep 3, 2010 at 8:15 AM, Barry Warsaw wrote: >> One thing that would help would be for Guido to let us know early on when >> he'd >> prefer to delegate the decision. > > Hey! I'm still here! :-) > > More to the point, you can assume

Re: [Python-Dev] PEP 3149 accepted

2010-09-03 Thread Barry Warsaw
On Sep 03, 2010, at 09:36 AM, Georg Brandl wrote: >This is to let you all know that PEP 3149 is accepted. > >Benjamin and I decided that on the basis that > >* strong precedent is set with PEP 3147 >* it is not mutually exclusive with PEP 384; should PEP 384 become > widely accepted, its use can

Re: [Python-Dev] r84456 - python/branches/py3k/Doc/c-api/unicode.rst

2010-09-03 Thread Georg Brandl
Please add a "versionadded" tag. Georg Am 03.09.2010 18:23, schrieb victor.stinner: > Author: victor.stinner > Date: Fri Sep 3 18:23:29 2010 > New Revision: 84456 > > Log: > Document PyUnicode_AsUnicodeCopy() > > > Modified: >python/branches/py3k/Doc/c-api/unicode.rst > > Modified: pytho

Re: [Python-Dev] Internal counter to debug leaking file descriptors

2010-09-03 Thread Giampaolo Rodolà
The Windows part slipped under my radar. =) Unfortunately the Windows binaries still refer to the current version which doesn't include open files and open connections functionalities. To have those he'll have to get the latest code from svn and compile it with mingw32. --- Giampaolo http://code.

Re: [Python-Dev] Internal counter to debug leaking file descriptors

2010-09-03 Thread Terry Reedy
On 9/3/2010 6:09 AM, Giampaolo Rodolà wrote: Of course it would be nice to get access to FD stack so that a full filename can also be retrieved in this case. On Linux, this can be easily achieved by using /proc. You can take a look at how this is done in the current development version of psuti

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Guido van Rossum
On Fri, Sep 3, 2010 at 10:03 AM, Antoine Pitrou wrote: > On Fri, 3 Sep 2010 09:32:22 -0700 > Guido van Rossum wrote: >> >> > It could not be resized, but it could be modified (same as what happens >> >> > with bytearrays today). Actually, the buffer itself would be writable, >> >> > and allow mod

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Antoine Pitrou
On Fri, 3 Sep 2010 09:32:22 -0700 Guido van Rossum wrote: > >> > It could not be resized, but it could be modified (same as what happens > >> > with bytearrays today). Actually, the buffer itself would be writable, > >> > and allow modifying the BytesIO contents. > >> > >> You may need to be caref

Re: [Python-Dev] Summary of Python tracker Issues

2010-09-03 Thread Paul Moore
On 3 September 2010 17:30, Victor Stinner wrote: > Remember also the buildbot report: > http://code.google.com/p/bbreport/wiki/PythonBuildbotReport > > Eg. there are some "no space left on device" on "x86 XP-5 *" build slaves. Thanks, I wasn't aware of that. I'll look into those issues. Paul. ___

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Guido van Rossum
On Fri, Sep 3, 2010 at 3:56 AM, Antoine Pitrou wrote: > On Fri, 3 Sep 2010 20:44:01 +1000 > Nick Coghlan wrote: >> >> It actually strikes me as a fairly bad thing, so I think you're right >> to distrust it. Better to follow the precedent set with getvalue() and >> require an explicit call to getb

Re: [Python-Dev] Summary of Python tracker Issues

2010-09-03 Thread Victor Stinner
Le vendredi 03 septembre 2010 18:07:45, Python tracker a écrit : > ACTIVITY SUMMARY (2010-08-27 - 2010-09-03) > Python tracker at http://bugs.python.org/ Remember also the buildbot report: http://code.google.com/p/bbreport/wiki/PythonBuildbotReport Eg. there are some "no space left on device" on

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread Victor Stinner
Le vendredi 03 septembre 2010 10:01:12, vous avez écrit : > > (...) > > About PyUnicode_strdup() (PyUnicode_AsUnicodeCopy): I don't know. It is > > possible to rewrite it in few lines. Why don't you want to add them to > > the public API? For my work, it doesn't matter if it's public or not. > > Th

[Python-Dev] Summary of Python tracker Issues

2010-09-03 Thread Python tracker
ACTIVITY SUMMARY (2010-08-27 - 2010-09-03) 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 stats: open2569 (+41) closed 18970 (+40) total 21539 (+55) Open issues with patches: 1

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Éric Araujo
> It just occurred to me that it could be interpreted as a breach of the > moratorium. On the other hand, according to PEP 3003: > > “The case for adding a method to a built-in object can be made.” > > This case seems even lighter than adding a new method. I’ve been satisfied to see other pr

Re: [Python-Dev] Two small PEP ideas

2010-09-03 Thread Guido van Rossum
On Fri, Sep 3, 2010 at 8:15 AM, Barry Warsaw wrote: > One thing that would help would be for Guido to let us know early on when he'd > prefer to delegate the decision. Hey! I'm still here! :-) More to the point, you can assume that I'm happy to have every PEP decision made by someone else *excep

Re: [Python-Dev] Two small PEP ideas

2010-09-03 Thread Barry Warsaw
On Sep 02, 2010, at 09:08 PM, Raymond Hettinger wrote: >On Apr 30, 2010, at 12:51 PM, Martin v. Löwis wrote: >> Without a BDFL, I think we need a committee to make decisions, e.g. >> by majority vote amongst committers. > >I like Guido's idea. Just appoint have one of the experienced >developers

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Antoine Pitrou
On Fri, 3 Sep 2010 21:16:13 +1000 Nick Coghlan wrote: > On Fri, Sep 3, 2010 at 8:56 PM, Antoine Pitrou wrote: > > On Fri, 3 Sep 2010 20:44:01 +1000 Nick Coghlan wrote: > > That's an interesting idea. I was planning to return a memoryview > > object (in order to hide the intermediate object, and

Re: [Python-Dev] PEP 3149 accepted

2010-09-03 Thread Barry Warsaw
On Sep 03, 2010, at 09:36 AM, Georg Brandl wrote: >This is to let you all know that PEP 3149 is accepted. > >Benjamin and I decided that on the basis that > >* strong precedent is set with PEP 3147 >* it is not mutually exclusive with PEP 384; should PEP 384 become > widely accepted, its use can

Re: [Python-Dev] C API doc question

2010-09-03 Thread Nick Coghlan
On Fri, Sep 3, 2010 at 9:19 PM, Amaury Forgeot d'Arc wrote: > 2010/9/3 Nick Coghlan : >> Due to the Unicode API discussion, I happened to be looking at the C >> API docs at http://docs.python.org/dev/c-api/unicode.html#plain-py-unicode >> and noticed that out of: >> >> PyUnicode_FromUnicode >> PyU

Re: [Python-Dev] C API doc question

2010-09-03 Thread Amaury Forgeot d'Arc
2010/9/3 Nick Coghlan : > Due to the Unicode API discussion, I happened to be looking at the C > API docs at http://docs.python.org/dev/c-api/unicode.html#plain-py-unicode > and noticed that out of: > > PyUnicode_FromUnicode > PyUnicode_FromStringAndSize > PyUnicode_FromString > PyUnicode_FromForma

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Nick Coghlan
On Fri, Sep 3, 2010 at 8:56 PM, Antoine Pitrou wrote: > On Fri, 3 Sep 2010 20:44:01 +1000 Nick Coghlan wrote: > That's an interesting idea. I was planning to return a memoryview > object (in order to hide the intermediate object, and make it really > minimal), so perhaps the context protocol shou

[Python-Dev] C API doc question

2010-09-03 Thread Nick Coghlan
Due to the Unicode API discussion, I happened to be looking at the C API docs at http://docs.python.org/dev/c-api/unicode.html#plain-py-unicode and noticed that out of: PyUnicode_FromUnicode PyUnicode_FromStringAndSize PyUnicode_FromString PyUnicode_FromFormat PyUnicode_FromFormatV PyUnicode_FromE

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Stefan Behnel
Antoine Pitrou, 03.09.2010 12:56: On Fri, 3 Sep 2010 20:44:01 +1000 Nick Coghlan wrote: It actually strikes me as a fairly bad thing, so I think you're right to distrust it. +1 It could not be resized, but it could be modified (same as what happens with bytearrays today). Actually, the buf

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread Nick Coghlan
On Fri, Sep 3, 2010 at 6:01 PM, M.-A. Lemburg wrote: >> About PyUnicode_strdup() (PyUnicode_AsUnicodeCopy): I don't know. It is >> possible to rewrite it in few lines. Why don't you want to add them to the >> public API? For my work, it doesn't matter if it's public or not. This >> function uses P

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Antoine Pitrou
On Fri, 3 Sep 2010 20:44:01 +1000 Nick Coghlan wrote: > > It actually strikes me as a fairly bad thing, so I think you're right > to distrust it. Better to follow the precedent set with getvalue() and > require an explicit call to getbuffer(). The fact there are two > options (immutable copy via

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread Nick Coghlan
On Fri, Sep 3, 2010 at 8:14 PM, Victor Stinner wrote: > Le vendredi 03 septembre 2010 11:20:04, vous avez écrit : >> > But I didn't found any doc for other Py_UNICODE_str*() >> > functions in Doc/c-api/*.rst. >> >> http://bugs.python.org/issue8649 - Py_UNICODE_* functions are undocumented > > Open

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Nick Coghlan
On Fri, Sep 3, 2010 at 6:54 PM, Antoine Pitrou wrote: >> What would be the advantage of having to do two operations? Is it just that >> you want to make the internal buffer joining step more visible? > > I was just wondering if it's a good thing to let people, e.g., > concatenate a bytes object an

Re: [Python-Dev] r84447 - in python/branches/py3k: Lib/test/test_set.py Objects/setobject.c

2010-09-03 Thread Antoine Pitrou
On Fri, 3 Sep 2010 12:00:51 +0200 (CEST) raymond.hettinger wrote: > rv = set_discard_entry(so, &an_entry); > -if (rv == -1) > + if (rv == -1) { > +Py_DECREF(key); > return NULL; > +} > if (rv ==

Re: [Python-Dev] PEP 384 status

2010-09-03 Thread Nick Coghlan
On Fri, Sep 3, 2010 at 12:44 PM, Greg Ewing wrote: > On 02/09/10 09:04, Nick Coghlan wrote: > >> I think it would be better if everything dealing with FILE* was a >> macro rather than a function, yes. > > How would that help? Macros (and, as Antoine pointed out, inline functions) will never cross

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread Victor Stinner
Le vendredi 03 septembre 2010 11:20:04, vous avez écrit : > > But I didn't found any doc for other Py_UNICODE_str*() > > functions in Doc/c-api/*.rst. > > http://bugs.python.org/issue8649 - Py_UNICODE_* functions are undocumented Opened since 3 months. It looks like programmers don't like writing

Re: [Python-Dev] Internal counter to debug leaking file descriptors

2010-09-03 Thread Giampaolo Rodolà
> Of course it would be nice to get access to FD stack so that a > full filename can also be retrieved in this case. On Linux, this can be easily achieved by using /proc. You can take a look at how this is done in the current development version of psutil: http://code.google.com/p/psutil/source/br

Re: [Python-Dev] Internal counter to debug leaking file descriptors

2010-09-03 Thread anatoly techtonik
On Tue, Aug 31, 2010 at 5:03 PM, Guido van Rossum wrote: > If you wanted to do something like this in the Python stdlib, you'd > have to monkey-patch (with a proxy/wrapper) all places that can open > or close a filedescriptor -- os.open, os.popen, os.close, file > open/close, socket open/close, an

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread Daniel Stutzbach
On Thu, Sep 2, 2010 at 6:26 PM, Victor Stinner wrote: > But I didn't found any doc for other Py_UNICODE_str*() > functions in Doc/c-api/*.rst. > http://bugs.python.org/issue8649 - Py_UNICODE_* functions are undocumented -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Antoine Pitrou
On Fri, 03 Sep 2010 10:04:12 +0200 Stefan Behnel wrote: > Antoine Pitrou, 02.09.2010 22:35: > > In issue #5506, I originally proposed that io.BytesIO objects support > > the buffer protocol, to make it possible to access the internal buffer > > without intermediate copies. > > > > Then it came to

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Stefan Behnel
Antoine Pitrou, 02.09.2010 22:35: In issue #5506, I originally proposed that io.BytesIO objects support the buffer protocol, to make it possible to access the internal buffer without intermediate copies. Then it came to me then perhaps it would be too automatic. So I'm currently floating between

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread M.-A. Lemburg
Victor Stinner wrote: > Hi, > > Le jeudi 02 septembre 2010 11:13:22, vous avez écrit : >>> 1. This function and PyUnicode_strcat are missing documentation. > > It's Py_UNICODE_strcat(), not PyUnicode_strcat(). But yes, > Py_UNICODE_strcat() > is not documented. But I didn't found any doc for ot

Re: [Python-Dev] Buffer protocol for io.BytesIO?

2010-09-03 Thread Hrvoje Niksic
On 09/02/2010 10:35 PM, Antoine Pitrou wrote: Then it came to me then perhaps it would be too automatic. So I'm currently floating between: - add implicit buffer protocol support to BytesIO objects - add explicit buffer protocol support through the call of a getbuffer() method, which would re

[Python-Dev] PEP 3149 accepted

2010-09-03 Thread Georg Brandl
This is to let you all know that PEP 3149 is accepted. Benjamin and I decided that on the basis that * strong precedent is set with PEP 3147 * it is not mutually exclusive with PEP 384; should PEP 384 become widely accepted, its use can fade out again * it is a strictly optional feature Barry

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread Georg Brandl
Am 03.09.2010 01:26, schrieb Victor Stinner: > Hi, > > Le jeudi 02 septembre 2010 11:13:22, vous avez écrit : >> > 1. This function and PyUnicode_strcat are missing documentation. > > It's Py_UNICODE_strcat(), not PyUnicode_strcat(). But yes, > Py_UNICODE_strcat() > is not documented. But I did