Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Greg Ewing
Antoine Pitrou wrote: For starters, since py3k is supposed to support non-blocking IO, why not write a portable API to make a raw file or socket IO object non-blocking? I think we need to be clearer what we mean when we talk about non-blocking in this context. Normally when you're using select

Re: [Python-Dev] Pickler/Unpickler API clarification

2009-03-05 Thread Greg Ewing
Guido van Rossum wrote: Then it'd be better to have a method clear_memo() on pickle objects. You should have that anyway. I was just suggesting a way of preserving compatibility with old code without exposing all the details of the memo. -- Greg ___

Re: [Python-Dev] patch commit policies (was [issue4308] repr of httplib.IncompleteRead is stupid)

2009-03-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Withers wrote: > Martin v. Löwis wrote: >> Martin v. Löwis added the comment: >> >>> So all Chris has to do to get this applied to 2.5 is craft an exploit based >>> on the current behavior, right? ;-) >> Right :-) Of course, security patches sho

[Python-Dev] html5lib/BeautifulSoup (was: Integrate lxml into the stdlib? (was: Integrate BeautifulSoup into stdlib?))

2009-03-05 Thread Jim Jewett
Stefan Behnel wrote: > I would have a hard time feeling happy > if a real-world HTML parser was added to the stdlib that provides a totally > different interface than the best (and fastest) XML library that the stdlib > currently has. I doubt there would be any objection to someone contributing w

Re: [Python-Dev] patch commit policies (was [issue4308] repr of httplib.IncompleteRead is stupid)

2009-03-05 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mar 5, 2009, at 6:18 PM, Martin v. Löwis wrote: That aside, is it actually a python-wide policy to *forbid* patching older releases where the patch isn't security-related? I set this policy for the releases I manage, namely 2.4 and 2.5. This

Re: [Python-Dev] Integrate lxml into the stdlib?

2009-03-05 Thread Martin v. Löwis
> I do see the point you are making here. Even if lxml gets mature and > static, that doesn't necessarily apply to the external libraries it uses. > However, I should note that exactly the same argument also applies to > sqlite3 and gdbm, which, again, are in the stdlib today, with sqlite3 being >

Re: [Python-Dev] patch commit policies (was [issue4308] repr of httplib.IncompleteRead is stupid)

2009-03-05 Thread Martin v. Löwis
> That aside, is it actually a python-wide policy to *forbid* patching > older releases where the patch isn't security-related? I set this policy for the releases I manage, namely 2.4 and 2.5. I still plan to write a PEP on security releases, and how they relate to maintenance releases. > I can

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Josiah Carlson
On Thu, Mar 5, 2009 at 3:11 PM, wrote: > > On 07:30 pm, n...@arctrix.com wrote: >> >> Chris McDonough wrote: >>> >>> As far as I can tell, asyncore/asynchat is all "undocumented >>> internals".  Any use of asyncore in anger will use internals; >>> there never was any well-understood API to these

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread glyph
On 07:30 pm, n...@arctrix.com wrote: Chris McDonough wrote: As far as I can tell, asyncore/asynchat is all "undocumented internals". Any use of asyncore in anger will use internals; there never was any well-understood API to these modules. The implementation requires some intricate and pla

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Antoine Pitrou
Greg Ewing canterbury.ac.nz> writes: > > Neil Schemenauer wrote: > > > What I would like to see is a module that provides a low-level API > > for doing cross-platform asynchronous IO. The two necessary parts > > are: > > > > * a wrapper that allows non-blocking reads and writes on > >

Re: [Python-Dev] Pickler/Unpickler API clarification

2009-03-05 Thread Guido van Rossum
On Thu, Mar 5, 2009 at 1:36 PM, Greg Ewing wrote: > Guido van Rossum wrote: > >> This was a bad idea (*), and I'd be happy to ban it -- but we'd >> probably have to bump the pickle protocol version in order to maintain >> backwards compatibility. > > If you're talking about multiple calls to dump(

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Josiah Carlson
On Thu, Mar 5, 2009 at 1:09 PM, Bill Janssen wrote: > Josiah Carlson wrote: > >> On Thu, Mar 5, 2009 at 12:46 PM, Greg Ewing >> wrote: >> > Daniel Stutzbach wrote: >> > >> >> If you have a working select(), it will tell you the sockets on which >> >> read() and write() won't block, so non-block

Re: [Python-Dev] draft 3.1 release schedule

2009-03-05 Thread Martin v. Löwis
> So what is the solution? In the specific case, I don't know. I recall that somebody offered to pick up the change. I really didn't mean to suggest that the patch will remain unnoticed - it was just a warning that it *might* remain unnoticed. The more general issue is that of patches being unrev

Re: [Python-Dev] Pickler/Unpickler API clarification

2009-03-05 Thread Greg Ewing
Guido van Rossum wrote: This was a bad idea (*), and I'd be happy to ban it -- but we'd probably have to bump the pickle protocol version in order to maintain backwards compatibility. If you're talking about multiple calls to dump() on the same pickler, it might be a bad idea for a network con

Re: [Python-Dev] Integrate lxml into the stdlib?

2009-03-05 Thread Stefan Behnel
Hi, Brett Cannon wrote: > On Thu, Mar 5, 2009 at 12:52, Stefan Behnel wrote: >> Benjamin Peterson wrote: >>> it depends on Cython, which is wonderful normally, but maybe >>> difficult to deal with in language evolution since we wouldn't have >>> direct control over the C sources. >> I see the poin

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Greg Ewing
Josiah Carlson wrote: A read callback, a write callback. What about close, error, connect, and accept callbacks? Yep, all those as well. I hate to say it (not really), but that's pretty much the handle_*() methods of asyncore :/ . Well, then, what's the problem? Is there anything else pe

Re: [Python-Dev] Integrate lxml into the stdlib?

2009-03-05 Thread Guido van Rossum
Stefan, I recommend that you give up pushing for lxml in the stdlib. There are many complex factors to be weighed but in the balance I am not comfortable with it, and continued argumentation is not going to change that. Sorry, -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___

Re: [Python-Dev] Pickler/Unpickler API clarification

2009-03-05 Thread Greg Ewing
Collin Winter wrote: Reusing the Pickler without clearing the memo will produce pickles that are, as best I can see, invalid I'm not sure what you mean by "reusing the pickler" here, and how it can produce an invalid pickle. I think what the docs mean by it is continuing to pickle objects to

Re: [Python-Dev] Pickler/Unpickler API clarification

2009-03-05 Thread Guido van Rossum
On Thu, Mar 5, 2009 at 12:07 PM, Collin Winter wrote: > I'm working on some performance patches for cPickle, and one of the > bigger wins so far has been replacing the Pickler's memo dict with a > custom hashtable (and hence removing memo's getters and setters). In > looking over this, Jeffrey Yas

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Bill Janssen
Josiah Carlson wrote: > On Thu, Mar 5, 2009 at 12:46 PM, Greg Ewing > wrote: > > Daniel Stutzbach wrote: > > > >> If you have a working select(), it will tell you the sockets on which > >> read() and write() won't block, so non-blocking reads and writes are not > >> necessary. > > > > No, but t

Re: [Python-Dev] Integrate lxml into the stdlib?

2009-03-05 Thread Brett Cannon
On Thu, Mar 5, 2009 at 12:52, Stefan Behnel wrote: > Benjamin Peterson wrote: > > 2009/3/5 Guido van Rossum : > >> On Thu, Mar 5, 2009 at 2:39 AM, Stefan Behnel > wrote: > >>> And, BTW, I wouldn't mind getting lxml into the stdlib either. > >> No matter how beautiful and fast lxml is, it has one

Re: [Python-Dev] running the tests...

2009-03-05 Thread Nick Coghlan
Chris Withers wrote: > Nick Coghlan wrote: >> My personal preferences: >> >> Thorough: ./python -m test.regrtest -uall >> Typical: ./python -m test.regrtest >> Specific: ./python -m test.regrtest test_mod1 test_mod2 > > This looks good, I assume this would work on Windows too? Yep - and of course

Re: [Python-Dev] Tracker cleanup - Roundup hacking report :)

2009-03-05 Thread Daniel (ajax) Diniz
Jesse Noller wrote: > Slightly off topic Daniel, but if you see any multiprocessing bugs > lurking out there, can you make me (jnoller) the assignee? Sure! FWIW, I've just submitted a patch[1] that will make working with arbitrary issue sets much saner and should have a 'mass-add user X as nosy

Re: [Python-Dev] Integrate lxml into the stdlib?

2009-03-05 Thread Stefan Behnel
Benjamin Peterson wrote: > 2009/3/5 Guido van Rossum : >> On Thu, Mar 5, 2009 at 2:39 AM, Stefan Behnel wrote: >>> And, BTW, I wouldn't mind getting lxml into the stdlib either. >> No matter how beautiful and fast lxml is, it has one downside where it >> comes to installing it into the stdlib: it

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Josiah Carlson
On Thu, Mar 5, 2009 at 12:46 PM, Greg Ewing wrote: > Daniel Stutzbach wrote: > >> If you have a working select(), it will tell you the sockets on which >> read() and write() won't block, so non-blocking reads and writes are not >> necessary. > > No, but there should be an interface that lets you s

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Greg Ewing
Daniel Stutzbach wrote: If you have a working select(), it will tell you the sockets on which read() and write() won't block, so non-blocking reads and writes are not necessary. No, but there should be an interface that lets you say "when something comes in on this fd, call this function for

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Greg Ewing
Neil Schemenauer wrote: What I would like to see is a module that provides a low-level API for doing cross-platform asynchronous IO. The two necessary parts are: * a wrapper that allows non-blocking reads and writes on channels (sockets, file descriptors, serial ports, etc) *

Re: [Python-Dev] Integrate lxml into the stdlib?

2009-03-05 Thread Stefan Behnel
Guido van Rossum wrote: > On Thu, Mar 5, 2009 at 11:22 AM, Stefan Behnel wrote: >> I'm happy to see you jump onto this. > > I'm not sure why you say that -- all I am doing is advising *against* > inclusion. I understand that. What worth is a discussion where everyone just nods for good? :) >>

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-05 Thread Benjamin Peterson
2009/3/5 Guido van Rossum : > On Thu, Mar 5, 2009 at 2:39 AM, Stefan Behnel wrote: >> And, BTW, I wouldn't mind getting lxml into the stdlib either. > > No matter how beautiful and fast lxml is, it has one downside where it > comes to installing it into the stdlib: it is based on large, complex >

[Python-Dev] Pickler/Unpickler API clarification

2009-03-05 Thread Collin Winter
I'm working on some performance patches for cPickle, and one of the bigger wins so far has been replacing the Pickler's memo dict with a custom hashtable (and hence removing memo's getters and setters). In looking over this, Jeffrey Yasskin commented that this would break anyone who was accessing t

Re: [Python-Dev] Forgotten Py3.0 change to remove Queue.empty() and Queue.full()

2009-03-05 Thread Jesse Noller
On Thu, Mar 5, 2009 at 2:27 PM, Steve Holden wrote: > Jesse Noller wrote: > [...]I'll take it from anyone. >> > And we can *quote* you on that? > > regards >  Steve As long as it's not on a t-shirt, I should be OK. ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Daniel Stutzbach
On Thu, Mar 5, 2009 at 1:30 PM, Neil Schemenauer wrote: > What I would like to see is a module that provides a low-level API > for doing cross-platform asynchronous IO. The two necessary parts > are: > >* a wrapper that allows non-blocking reads and writes on > channels (sockets, file d

Re: [Python-Dev] Integrate lxml into the stdlib? (was: Integrate BeautifulSoup into stdlib?)

2009-03-05 Thread Guido van Rossum
On Thu, Mar 5, 2009 at 11:22 AM, Stefan Behnel wrote: > I'm happy to see you jump onto this. I'm not sure why you say that -- all I am doing is advising *against* inclusion. > Guido van Rossum wrote: >> No matter how beautiful and fast lxml is, it has one downside where it >> comes to installing

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Neil Schemenauer
Chris McDonough wrote: > As far as I can tell, asyncore/asynchat is all "undocumented > internals". Any use of asyncore in anger will use internals; > there never was any well-understood API to these modules. What I would like to see is a module that provides a low-level API for doing cross-plat

Re: [Python-Dev] Forgotten Py3.0 change to remove Queue.empty() and Queue.full()

2009-03-05 Thread Steve Holden
Jesse Noller wrote: [...]I'll take it from anyone. > And we can *quote* you on that? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Want to know? Come to PyCon - soon! http://us.pycon.org/ _

Re: [Python-Dev] Integrate lxml into the stdlib? (was: Integrate BeautifulSoup into stdlib?)

2009-03-05 Thread Stefan Behnel
Hi Guido, I'm happy to see you jump onto this. Guido van Rossum wrote: > No matter how beautiful and fast lxml is, it has one downside where it > comes to installing it into the stdlib: it is based on large, complex > 3rd party libraries, libxml2 and libxslt. I actually had a recent discussion w

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-05 Thread Forest
On Wed, Wed, 4 Mar 2009 13:52:59 -0800, Guido van Rossum wrote: > On Wed, Mar 4, 2009 at 1:44 PM, Greg Ewing > wrote: >> rdmur...@bitdance.com wrote: >> >>> I actually like StableDict best. ?When I hear that I think, "ah, the >>> key order is stable in the face of insertions, unlike a regular dict

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-05 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mar 5, 2009, at 12:32 PM, Guido van Rossum wrote: Instead, let's hope Linux distros pick it up (and if anyone knows how to encourage that, let us know). Gentoo: emerge lxml Ubuntu (and probably Debian): apt-get install python-lxml Guido, do y

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-05 Thread Guido van Rossum
On Thu, Mar 5, 2009 at 2:39 AM, Stefan Behnel wrote: > Ivan Krstić wrote: >> On Mar 4, 2009, at 12:32 PM, James Y Knight wrote: >>> I think html5lib would be a better candidate for an imrpoved HTML >>> parser in the stdlib than BeautifulSoup. >> >> While we're talking about alternatives, Ian Bicki

Re: [Python-Dev] Forgotten Py3.0 change to remove Queue.empty() and Queue.full()

2009-03-05 Thread Jesse Noller
On Thu, Mar 5, 2009 at 1:43 AM, Tennessee Leeuwenburg wrote: > Hi Jesse, > > I'm not sure what the most appropriate thing to do is. I could: >   (a) leave any multiprocessing changes to you, >   (b) alter the functioning of the method queue_empty inside > test_multiprocessing to test for emptiness

Re: [Python-Dev] Tracker cleanup - Roundup hacking report :)

2009-03-05 Thread jnoller
On Mar 5, 2009 12:17pm, "Daniel (ajax) Diniz" wrote: Hi, Here's a progress report on the "let's make the tracker a bit better" tasks. ...snip Slightly off topic Daniel, but if you see any multiprocessing bugs lurking out there, can you make me (jnoller) the assignee? jesse ___

[Python-Dev] Tracker cleanup - Roundup hacking report :)

2009-03-05 Thread Daniel (ajax) Diniz
Hi, Here's a progress report on the "let's make the tracker a bit better" tasks. Note: if you make use of saved queries, I recommend reading the 'anyone can remove any queries' issue: http://psf.upfronthosting.co.za/roundup/meta/issue244 Feedback on meta-tracker open issues, as well as new RFEs a

Re: [Python-Dev] How do I get commit access?

2009-03-05 Thread Brett Cannon
On Thu, Mar 5, 2009 at 01:08, Chris Withers wrote: > Guido van Rossum wrote: > >> I'd like to jump in and vouch for Chris. I've known him for many years >> and while we haven't worked closely I expect he'd be a valuable >> contributor. So +1 from me for giving Chris commit privileges for core >>

Re: [Python-Dev] Forgotten Py3.0 change to remove Queue.empty() and Queue.full()

2009-03-05 Thread Brett Cannon
On Wed, Mar 4, 2009 at 17:30, Raymond Hettinger wrote: > Just noticed that the empty() and full() methods were still there. >>> IIRC, we agreed to take them out (but leaving qsize() exposed). >>> The docs entries and test cases were taken out, but the actual >>> methods were accidentally left in.

Re: [Python-Dev] running the tests...

2009-03-05 Thread Chris Withers
s...@pobox.com wrote: >> My personal preferences: >> >> Thorough: ./python -m test.regrtest -uall >> Typical: ./python -m test.regrtest >> Specific: ./python -m test.regrtest test_mod1 test_mod2 Chris> This looks good, I assume this would work on Windows too? I believe

Re: [Python-Dev] draft 3.1 release schedule

2009-03-05 Thread Guilherme Polo
On Thu, Mar 5, 2009 at 10:53 AM, Brad Miller wrote: > > > On Mon, Mar 2, 2009 at 4:22 PM, "Martin v. Löwis" > wrote: >> >> > Would whoever is responsible for IDLE please take a look at the patches >> > I submitted for Python 2 & 3 [tracker IDs 5233 and 5234 respectively]. >> > These change the be

Re: [Python-Dev] running the tests...

2009-03-05 Thread skip
>> My personal preferences: >> >> Thorough: ./python -m test.regrtest -uall >> Typical: ./python -m test.regrtest >> Specific: ./python -m test.regrtest test_mod1 test_mod2 Chris> This looks good, I assume this would work on Windows too? I believe so, but you should stil

Re: [Python-Dev] draft 3.1 release schedule

2009-03-05 Thread Brad Miller
On Mon, Mar 2, 2009 at 4:22 PM, "Martin v. Löwis" wrote: > > Would whoever is responsible for IDLE please take a look at the patches > > I submitted for Python 2 & 3 [tracker IDs 5233 and 5234 respectively]. > > These change the behavior of IDLE so that IDLESTARTUP or PYTHONSTARTUP > > files are e

Re: [Python-Dev] running the tests...

2009-03-05 Thread Chris Withers
Nick Coghlan wrote: My personal preferences: Thorough: ./python -m test.regrtest -uall Typical: ./python -m test.regrtest Specific: ./python -m test.regrtest test_mod1 test_mod2 This looks good, I assume this would work on Windows too? cheers, Chris -- Simplistix - Content Management, Zope

Re: [Python-Dev] running the tests...

2009-03-05 Thread Nick Coghlan
Georg Brandl wrote: > Chris Withers schrieb: >> Hi All, >> >> I found the very brief snippet on test-running at: >> >> http://python.org/dev/faq/#how-to-test-a-patch >> >> so thought I'd ask here: >> >> - what's the canonical way to run "all the tests"? > > Assuming UNIXy OSes: make test, or i

Re: [Python-Dev] patch commit policies (was [issue4308] repr of httplib.IncompleteRead is stupid)

2009-03-05 Thread Nick Coghlan
Chris Withers wrote: > That aside, is it actually a python-wide policy to *forbid* patching > older releases where the patch isn't security-related? > > I can understand the "no more releases unless there are security > problems", but what's the harm in applying a patch to an old version > branch

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-05 Thread Stefan Behnel
Ivan Krstić wrote: > On Mar 4, 2009, at 12:32 PM, James Y Knight wrote: >> I think html5lib would be a better candidate for an imrpoved HTML >> parser in the stdlib than BeautifulSoup. > > While we're talking about alternatives, Ian Bicking appears to swear by > lxml: > >

Re: [Python-Dev] running the tests...

2009-03-05 Thread Georg Brandl
Chris Withers schrieb: > Hi All, > > I found the very brief snippet on test-running at: > > http://python.org/dev/faq/#how-to-test-a-patch > > so thought I'd ask here: > > - what's the canonical way to run "all the tests"? Assuming UNIXy OSes: make test, or if you want to save a bit of tim

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread glyph
On 4 Mar, 09:36 pm, dan...@stutzbachenterprises.com wrote: Will any or all of you be at PyCon? I'd be willing to put in the extra work to turn your notes into a PEP. I definitely will be. I'll see you there! ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread glyph
On 4 Mar, 08:28 pm, ba...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mar 4, 2009, at 2:44 PM, gl...@divmod.com wrote: Maintaining compatibility with the 2.6.x version of asyncore presupposes that *someone* has written some software against that version of asyncore and

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread glyph
On 4 Mar, 09:14 pm, krs...@solarsail.hcs.harvard.edu wrote: I spent about a half hour sometime in the last month talking this through with Itamar, though not in great detail. I'd be interested in sitting down with both of you and trying to establish more precisely how much work is necessary to

[Python-Dev] running the tests...

2009-03-05 Thread Chris Withers
Hi All, I found the very brief snippet on test-running at: http://python.org/dev/faq/#how-to-test-a-patch ...so thought I'd ask here: - what's the canonical way to run "all the tests"? - what's the canonical way to run the tests for just the package being patched? (I'm assuming it's a standa

[Python-Dev] patch commit policies (was [issue4308] repr of httplib.IncompleteRead is stupid)

2009-03-05 Thread Chris Withers
Martin v. Löwis wrote: Martin v. Löwis added the comment: So all Chris has to do to get this applied to 2.5 is craft an exploit based on the current behavior, right? ;-) Right :-) Of course, security patches should see a much more careful review than regular bug fixes. Well, it's funny you

Re: [Python-Dev] How do I get commit access?

2009-03-05 Thread Chris Withers
Guido van Rossum wrote: I'd like to jump in and vouch for Chris. I've known him for many years and while we haven't worked closely I expect he'd be a valuable contributor. So +1 from me for giving Chris commit privileges for core Python. Thanks :-) I can't promise how *much* time I'll be able

Re: [Python-Dev] What type of object mmap.read_byte should return on py3k?

2009-03-05 Thread Josiah Carlson
On Sun, Mar 1, 2009 at 10:45 AM, Hirokazu Yamamoto wrote: > I uploaded the patch with choice (a) > http://bugs.python.org/file13215/py3k_mmap_and_bytes.patch > If (b) is suitable, I'll rewrite the patch. > ___ > Python-Dev mailing list > Python-Dev@pytho