Re: [Python-Dev] Iterable String Redux (aka String ABC)

2008-05-29 Thread Georg Brandl
Greg Ewing schrieb: Bill Janssen wrote: Look, even if there were *no* additional methods, it's worth adding the base class, just to differentiate the class from the Sequence, as a marker, so that those of us who want to ask isinstance(o, String) can do so. Doesn't isinstance(x, basestring)

Re: [Python-Dev] Finishing up PEP 3108

2008-05-29 Thread Georg Brandl
Brett Cannon schrieb: The issues related to PEP 3108 now total 14. With the beta (supposedly) in a week, I am hoping the last minor details can be pulled together or decisions made on what can be postponed and what should definitely be considered a release blocker. Issue 2847 - the aifc module

Re: [Python-Dev] [Python-3000] PyString - PyBytes C API renaming (Stabilizing the C API of 2.6 and 3.0)

2008-05-29 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 M.-A. Lemburg wrote: | If you use PyBytes APIs, you expect to find PyBytes functions in | the libs and also set breakpoints on these. Very good point. - -- Jesus Cea Avion _/_/ _/_/_/_/_/_/ [EMAIL PROTECTED] -

Re: [Python-Dev] Why is type_modified() in typeobject .c not a public function?

2008-05-29 Thread Antoine Pitrou
Stefan Behnel stefan_ml at behnel.de writes: BTW, I noticed that the code in typeobject.c uses DECREF before set two times, like this: method_cache[h].version = type-tp_version_tag; method_cache[h].value = res; /* borrowed */ Py_INCREF(name);

Re: [Python-Dev] [Python-3000] PyString - PyBytes C API renaming

2008-05-29 Thread Nick Coghlan
Stefan Behnel wrote: M.-A. Lemburg wrote: If you use PyBytes APIs, you expect to find PyBytes functions in the libs and also set breakpoints on these. AFAICT, the PyBytes_* functions are in both Py2.6 and Py3 now, so no problem here. The PyBytes_* functions appear to be there, but a

Re: [Python-Dev] A thought on generic functions

2008-05-29 Thread Nick Coghlan
Greg Ewing wrote: Paul Moore wrote: I'd rather see a solution which addressed the wider visitor use case (I think I just sprained my back bending over backwards to avoid mentioning generic functions :-)) Speaking of generic functions, while thinking about the recent discussion on proxy

Re: [Python-Dev] Py_SETREF/Py_XSETREF (was: Why is type_modified() in typeobject.c not a public function?)

2008-05-29 Thread Stefan Behnel
Antoine Pitrou wrote: Stefan Behnel stefan_ml at behnel.de writes: BTW, I noticed that the code in typeobject.c uses DECREF before set two times, like this: method_cache[h].version = type-tp_version_tag; method_cache[h].value = res; /* borrowed */

Re: [Python-Dev] Stabilizing the C API of 2.6 and 3.0

2008-05-29 Thread Christian Heimes
Stefan Behnel schrieb: Christian Heimes wrote: * add a new file stringobject.h which contains the aliases PyString_ - PyBytes_ Just a quick note that that file is still missing from SVN, so it's kind of hard to compile existing code against the current branch state... No, the file is in

Re: [Python-Dev] PyString - PyBytes C API renaming

2008-05-29 Thread Christian Heimes
Stefan Behnel schrieb: M.-A. Lemburg wrote: If you use PyBytes APIs, you expect to find PyBytes functions in the libs and also set breakpoints on these. AFAICT, the PyBytes_* functions are in both Py2.6 and Py3 now, so no problem here. In Python 2.6 the PyBytes_* functions are only

Re: [Python-Dev] Stabilizing the C API of 2.6 and 3.0

2008-05-29 Thread Stefan Behnel
Christian Heimes wrote: Stefan Behnel schrieb: Christian Heimes wrote: * add a new file stringobject.h which contains the aliases PyString_ - PyBytes_ Just a quick note that that file is still missing from SVN, so it's kind of hard to compile existing code against the current branch

Re: [Python-Dev] [Python-3000] PyString - PyBytes C API renaming

2008-05-29 Thread Stefan Behnel
Nick Coghlan wrote: Stefan Behnel wrote: Besides, how likely is it that users set a breakpoint on the PyBytes/PyString functions? Not very likely at all - but it would still be nice if the PyBytes_* symbols were visible to the linker as well as the preprocessor. Right, that's a

Re: [Python-Dev] [Python-3000] PyString - PyBytes C API renaming

2008-05-29 Thread Nick Coghlan
Stefan Behnel wrote: Nick Coghlan wrote: Stefan Behnel wrote: Besides, how likely is it that users set a breakpoint on the PyBytes/PyString functions? Not very likely at all - but it would still be nice if the PyBytes_* symbols were visible to the linker as well as the preprocessor. Right,

Re: [Python-Dev] PEP 371 Discussion (pyProcessing Module)

2008-05-29 Thread Michael Foord
Nick Coghlan wrote: Jesse Noller wrote: Georg kindly published the PEP I submitted last night to the PEP site: http://www.python.org/dev/peps/pep-0371/ This PEP includes some of the previous discussion on the processing module's inclusion, and I hope clears up/clarifies some of the

Re: [Python-Dev] PEP 371 Discussion (pyProcessing Module)

2008-05-29 Thread Jesse Noller
On Thu, May 29, 2008 at 6:22 AM, Michael Foord [EMAIL PROTECTED] wrote: Nick Coghlan wrote: Jesse Noller wrote: Georg kindly published the PEP I submitted last night to the PEP site: http://www.python.org/dev/peps/pep-0371/ This PEP includes some of the previous discussion on the

Re: [Python-Dev] Finishing up PEP 3108

2008-05-29 Thread Quentin Gallet-Gilles
On Thu, May 29, 2008 at 9:12 AM, Georg Brandl [EMAIL PROTECTED] wrote: Brett Cannon schrieb: The issues related to PEP 3108 now total 14. With the beta (supposedly) in a week, I am hoping the last minor details can be pulled together or decisions made on what can be postponed and what

Re: [Python-Dev] PEP 371 Discussion (pyProcessing Module)

2008-05-29 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Could you possibly extend the PEP to also document performance when, for instance, passing big objects via a queue, or sending Events back, testing thread.isAlive(), and stuff like that?. What about mutexes? (not to protect shared objects, but files,

Re: [Python-Dev] optimization required: .format() is much slower than %

2008-05-29 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: Nick $ ./python -m timeit '' % () Nick 100 loops, best of 3: 0.389 usec per loop vs. Nick $ ./python -m timeit '%s' % 'nothing' Nick 1000 loops, best of 3: 0.0736 usec per loop I think you need to use a tuple for the second case to make it

Re: [Python-Dev] PEP 371 Discussion (pyProcessing Module)

2008-05-29 Thread Jesse Noller
On Thu, May 29, 2008 at 9:39 AM, Jesus Cea [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Could you possibly extend the PEP to also document performance when, for instance, passing big objects via a queue, or sending Events back, testing thread.isAlive(), and stuff

Re: [Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0

2008-05-29 Thread M.-A. Lemburg
On 2008-05-28 19:08, Bill Janssen wrote: I'm beginning to wonder whether I'm the only one who cares about the Python 2.x branch not getting cluttered up with artifacts caused by a broken forward merge strategy. I share your concern. Seems to me that perhaps (not sure, but perhaps) the rush to

Re: [Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0

2008-05-29 Thread M.-A. Lemburg
On 2008-05-28 22:47, Gregory P. Smith wrote: On Wed, May 28, 2008 at 3:12 AM, M.-A. Lemburg [EMAIL PROTECTED] wrote: I'm beginning to wonder whether I'm the only one who cares about the Python 2.x branch not getting cluttered up with artifacts caused by a broken forward merge strategy. How can

Re: [Python-Dev] [Python-3000] Finishing up PEP 3108

2008-05-29 Thread Quentin Gallet-Gilles
On Thu, May 29, 2008 at 4:56 PM, Lars Immisch [EMAIL PROTECTED] wrote: snip Issue 2847 - the aifc module still imports the cl module in 3.0. Problem is that the cl module is gone. =) So it seems silly to have the imports lying about. This can probably be changed to

Re: [Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0

2008-05-29 Thread Christian Heimes
M.-A. Lemburg schrieb: Well, first of all, it is a change in the C API: APIs have different names now, they live in different files, the Python documentation doesn't apply anymore, books have to be updated, programmers trained, etc. etc. That's fine for 3.x, it's not for 2.x. No, that's not

Re: [Python-Dev] Finishing up PEP 3108

2008-05-29 Thread Brett Cannon
On Thu, May 29, 2008 at 12:12 AM, Georg Brandl [EMAIL PROTECTED] wrote: Brett Cannon schrieb: The issues related to PEP 3108 now total 14. With the beta (supposedly) in a week, I am hoping the last minor details can be pulled together or decisions made on what can be postponed and what

Re: [Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0

2008-05-29 Thread M.-A. Lemburg
Christian, so far you have not responded to any of the suggestions made on this thread, only defended your checkin. That's not very helpful in getting to some conclusion. * What's so hard about going with a proper, standard solution that doesn't involve using your preprocessor hack ? * Why

Re: [Python-Dev] optimization required: .format() is much slower than %

2008-05-29 Thread Steve Holden
Nick Coghlan wrote: [EMAIL PROTECTED] wrote: Nick $ ./python -m timeit '' % () Nick 100 loops, best of 3: 0.389 usec per loop vs. Nick $ ./python -m timeit '%s' % 'nothing' Nick 1000 loops, best of 3: 0.0736 usec per loop I think you need to use a tuple for the second

Re: [Python-Dev] PEP 371 Discussion (pyProcessing Module)

2008-05-29 Thread Guido van Rossum
On Thu, May 29, 2008 at 3:18 AM, Nick Coghlan [EMAIL PROTECTED] wrote: Jesse Noller wrote: Georg kindly published the PEP I submitted last night to the PEP site: http://www.python.org/dev/peps/pep-0371/ This PEP includes some of the previous discussion on the processing module's inclusion,

Re: [Python-Dev] PEP 371 Discussion (pyProcessing Module)

2008-05-29 Thread Raymond Hettinger
I would like to renew the discussion now that there is a PEP to see if there are any outstanding things people would like to get resolved. I chose to continue to push it for 2.6 / 3.0 inclusion due to feedback both here and elsewhere that people would rather see this in sooner in some form,

Re: [Python-Dev] Finishing up PEP 3108

2008-05-29 Thread Benjamin Peterson
On Wed, May 28, 2008 at 11:38 PM, Brett Cannon [EMAIL PROTECTED] wrote: Issue 2854 - gestalt needs to be added back into 3.0. This is Benjamin's issue. =) Is that your way of say Check in the patch! ? :) -- Cheers, Benjamin Peterson There's no place like 127.0.0.1.

Re: [Python-Dev] Finishing up PEP 3108

2008-05-29 Thread Brett Cannon
On Thu, May 29, 2008 at 1:49 PM, Benjamin Peterson [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 11:38 PM, Brett Cannon [EMAIL PROTECTED] wrote: Issue 2854 - gestalt needs to be added back into 3.0. This is Benjamin's issue. =) Is that your way of say Check in the patch! ? :) More or

Re: [Python-Dev] Iterable String Redux (aka String ABC)

2008-05-29 Thread Greg Ewing
Georg Brandl wrote: Greg Ewing schrieb: Doesn't isinstance(x, basestring) already cover that? That doesn't cover UserString, for example. A better solution to that might be to have UserString inherit from basestring. -- Greg ___ Python-Dev

Re: [Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0

2008-05-29 Thread Nick Coghlan
M.-A. Lemburg wrote: * Why can't we have both PyString *and* PyBytes exposed in 2.x, with one redirecting to the other ? We do have that - the PyString_* names still work perfectly fine in 2.x. They just won't be used in the Python core codebase anymore - everything in the Python core will

Re: [Python-Dev] A thought on generic functions

2008-05-29 Thread Greg Ewing
Nick Coghlan wrote: I don't think it would actually be that much worse - something like typetools.ProxyMixin would just involve a whole series of register calls instead of method definitions. I wouldn't expect the total amount of code involved to change much. I'm not thinking about the

Re: [Python-Dev] A thought on generic functions

2008-05-29 Thread Nick Coghlan
Greg Ewing wrote: Nick Coghlan wrote: I don't think it would actually be that much worse - something like typetools.ProxyMixin would just involve a whole series of register calls instead of method definitions. I wouldn't expect the total amount of code involved to change much. I'm not

Re: [Python-Dev] A thought on generic functions

2008-05-29 Thread Greg Ewing
Nick Coghlan wrote: That's where the generic system itself needs to be based on generic functions - then you can hook the lookup function so that proxies get looked up based on their target type rather than the fact they're a proxy. It all gets very brain bending and self referential, which

Re: [Python-Dev] [Python-3000] Finishing up PEP 3108

2008-05-29 Thread Humberto Diogenes
On 29/05/2008, at 14:32, Brett Cannon wrote: On Thu, May 29, 2008 at 12:12 AM, Georg Brandl [EMAIL PROTECTED] wrote: Issue 2848 - mimetools has been deprecated for a while, but it is still used in a bunch of places. Since this has been deprecated in PEP 4 for a long time, should we add

[Python-Dev] http://bugs.python.org/issue708007 - telnetpopen

2008-05-29 Thread Luke Kenneth Casson Leighton
my apologies, i found the issue closed after doing a search for my own work, requiring (again) the telnetlib code for yet another project. since 2001, the work done has been reimplemented time and time again, by different individuals, in different projects, in different ways, all solving exactly

Re: [Python-Dev] Addition of pyprocessing module to standard lib.

2008-05-29 Thread C. Titus Brown
On Tue, May 13, 2008 at 09:23:02PM -0400, Tom Pinckney wrote: - Why not use MPI? It's cross platform, cross language and very widely - supported already. And there're Python bindings already. MPI requires far more setup than the pyprocessing module does; it's by no means plug play. --titus --

Re: [Python-Dev] BSDDB3

2008-05-29 Thread Trent Nelson
Thanks Jesus. I'll import BSDDB 4.6.4 into svn.python.org/projects/external today. Once that's done, I'll create a new bsddb46.vcproj and update the pcbuild.sln to use this project instead of the bsddb44 one currently being used. (Hopefully I'll be able to get that done today as well.) I

Re: [Python-Dev] PEP 370 extras

2008-05-29 Thread Trent Nelson
Christian, you get this week's Awesome Award. Hah, 'Weekly Awesome Award', we should make that one of our things, like QOTW. Trent. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Committing bsddb 4.6.4, and where can I put testsuite temp files?

2008-05-29 Thread Trent Nelson
Hi Jesus, Regarding where to place test files, you might want to look at how the current bsddb test suite in Lib/bsddb/test handles the need to create temporary files and such. A bit of work has gone into this particular aspect to improve reliability and robustness on buildbots --

[Python-Dev] Importing bsddb 4.6.21; with or without AES encryption?

2008-05-29 Thread Trent Nelson
I was about to commit an initial import of the bsddb 4.6.21 source to the 'external' area in the repo, which I obtained from the following URL: http://www.oracle.com/technology/software/products/berkeley-db/index.html I downloaded the source that includes AES encryption, for no reason

[Python-Dev] Summary of Tracker Issues

2008-05-29 Thread Tracker
ACTIVITY SUMMARY (05/09/08 - 05/16/08) Tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 1874 open (+61) / 12843 closed (+30) / 14717 total (+91) Open issues with patches: 558 Average

Re: [Python-Dev] optimization required: .format() is much slower than %

2008-05-29 Thread Simon Cross
On Tue, May 27, 2008 at 12:43 AM, Christian Heimes [EMAIL PROTECTED] wrote: Ten minutes ago I raised a concern about speed differences between the old style % formatting and the new .format() code. Some quick benchmarking from Benjamin and me showed, that it's even worse than I expected. My

[Python-Dev] Obtaining short file path

2008-05-29 Thread Hartwell Bryan
Hi, Purpose: obtaining the system (short) path from a full path Background: File dialogs (visual studio) return a full path (e.g. f=C:\this path has spaces\thisfilenameislongerthan8char.txt). If this value is provided to Python, it will not recongize this as a file. In fact os.path.isfile(f)

Re: [Python-Dev] [Python-3000] PyString - PyBytes C API renaming

2008-05-29 Thread Marcin ‘Qrczak’ Kowalczyk
2008/5/29 Nick Coghlan [EMAIL PROTECTED]: it would still be nice if the PyBytes_* symbols were visible to the linker as well as the preprocessor. If this is not a strict requirement but a useful extra, then it might be done in an unportable way. GCC has an 'alias' attribute:

Re: [Python-Dev] [Python-3000] Finishing up PEP 3108

2008-05-29 Thread Lars Immisch
snip Issue 2847 - the aifc module still imports the cl module in 3.0. Problem is that the cl module is gone. =) So it seems silly to have the imports lying about. This can probably be changed to critical. It shouldn't be a problem to rip everything cl-related out of

[Python-Dev] FWD: 26 Python-Dev moderator request(s) waiting

2008-05-29 Thread Aahz
I just processed two weeks of backlog on python-dev (I'm only a backup moderator). Would anyone object to changing the list policy so that non-member posts get discarded instead of held? -- Aahz ([EMAIL PROTECTED]) * http://www.pythoncraft.com/ Need a book? Use your library!

Re: [Python-Dev] http://bugs.python.org/issue708007 - telnetpopen

2008-05-29 Thread Benjamin Peterson
On Tue, May 13, 2008 at 1:06 PM, Luke Kenneth Casson Leighton [EMAIL PROTECTED] wrote: my apologies, i found the issue closed after doing a search for my own work, requiring (again) the telnetlib code for yet another project. I have reopened it for you. since 2001, the work done has been

Re: [Python-Dev] FWD: 26 Python-Dev moderator request(s) waiting

2008-05-29 Thread Benjamin Peterson
On Thu, May 29, 2008 at 8:14 PM, Aahz [EMAIL PROTECTED] wrote: I just processed two weeks of backlog on python-dev (I'm only a backup moderator). Would anyone object to changing the list policy so that non-member posts get discarded instead of held? Is any of the mail spam? -- Cheers,

Re: [Python-Dev] FWD: 26 Python-Dev moderator request(s) waiting

2008-05-29 Thread Aahz
On Thu, May 29, 2008, Benjamin Peterson wrote: On Thu, May 29, 2008 at 8:14 PM, Aahz [EMAIL PROTECTED] wrote: I just processed two weeks of backlog on python-dev (I'm only a backup moderator). Would anyone object to changing the list policy so that non-member posts get discarded instead of

Re: [Python-Dev] FWD: 26 Python-Dev moderator request(s) waiting

2008-05-29 Thread Benjamin Peterson
On Thu, May 29, 2008 at 8:28 PM, Aahz [EMAIL PROTECTED] wrote: On Thu, May 29, 2008, Benjamin Peterson wrote: Is any of the mail spam? Very yes -- more than half. (What gets through SpamBayes) In that case, I'm -1. -- Cheers, Benjamin Peterson There's no place like 127.0.0.1.

Re: [Python-Dev] FWD: 26 Python-Dev moderator request(s) waiting

2008-05-29 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On May 29, 2008, at 9:14 PM, Aahz wrote: I just processed two weeks of backlog on python-dev (I'm only a backup moderator). Would anyone object to changing the list policy so that non-member posts get discarded instead of held? How about we

Re: [Python-Dev] FWD: 26 Python-Dev moderator request(s) waiting

2008-05-29 Thread tjreedy
Barry Warsaw [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On May 29, 2008, at 9:14 PM, Aahz wrote: I just processed two weeks of backlog on python-dev (I'm only a backup moderator). Would anyone object to changing the list policy

Re: [Python-Dev] FWD: 26 Python-Dev moderator request(s) waiting

2008-05-29 Thread Tim Peters
[Barry] ... How about we recruit additional moderators? Any volunteers? Sure -- add me as a python-dev admin, send me the password, and go back to eating in peace :-) ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] FWD: 26 Python-Dev moderator request(s) waiting

2008-05-29 Thread Aahz
On Thu, May 29, 2008, tjreedy wrote: On May 29, 2008, at 9:14 PM, Aahz wrote: I just processed two weeks of backlog on python-dev (I'm only a backup moderator). Would anyone object to changing the list policy so that non-member posts get discarded instead of held? By 'non-member' I hope