[Python-Dev] PEP 239 - Rational

2009-03-08 Thread Lie Ryan
PEP 239 says that Rational type was Rejected, but some time ago this decision is reverted, and now python 3.0 and python 2.6 includes a fractions.Fraction type. Shouldn't this PEP be updated? (At least to include a note of its obsoleted status or to point to the reversion)

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

2009-03-08 Thread Raymond Hettinger
This is precisely the reason why I want Python to continue including its batteries. If we give that up, it will not come back, and users get frustrated that they have to collect stuff from many places, and that the stuff doesn't fit together completely. I concur. Raymond _

Re: [Python-Dev] BZR mirror and pushing to Launchpad

2009-03-08 Thread Andrew Bennetts
Ross Light wrote: [...] > However, my understanding is that Launchpad will not automatically > stack if you are using the Python.org branch; you must use the > Launchpad mirror.  If you want to stack off the Python.org branch, > then I think you need to manually stack. It is true that if the sourc

Re: [Python-Dev] BZR mirror and pushing to Launchpad

2009-03-08 Thread Ross Light
On Sun, Mar 8, 2009 at 7:40 PM, Andrew Bennetts wrote: > Actually, the Launchpad code server is configured to make bzr automatically > stack on the appropriate branch.  The docs you point to there are about > manually > specifying the branch to stack on. > > -Andrew. However, my understanding is

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

2009-03-08 Thread Larry Bugbee
In light of this, what I'd love to see (but sadly can't really help with, and am not optimistic about happening) is for: - python to grow a decent, cross platform, package management system - the standard library to actually shrink to a point where only libraries that are not released elsewhere

[Python-Dev] IDLE maintenance

2009-03-08 Thread Mitchell L Model
I've been trying to decipher the various mentions of IDLE maintenance on this list to determine the likely future (not necessarily feature addition, just keeping it working with each new version of Python and, I suppose, Tk) , who is currently responsible for it, and who will be responsible for

Re: [Python-Dev] BZR mirror and pushing to Launchpad

2009-03-08 Thread Andrew Bennetts
Ross Light wrote: > Yes, this is the expected behavior. Bazaar will upload all of the > revisions since it is not stacking off of another branch. You could > try using the Launchpad or Python.org mirrors as a stacking branch, as > described here: > > http://doc.bazaar-vcs.org/bzr.dev/en/user-gui

Re: [Python-Dev] BZR mirror and pushing to Launchpad

2009-03-08 Thread Andrew Bennetts
R. David Murray wrote: > I just posted a (tiny) patch to the tracker, and for the > exercise of it I thought I would push the branch out to Launchpad > as suggested in the wiki (http://wiki.python.org/moin/Bazaar). > It looks like it is uploading every file in the branch instead > of the delta from

Re: [Python-Dev] BZR mirror and pushing to Launchpad

2009-03-08 Thread Ross Light
Yes, this is the expected behavior. Bazaar will upload all of the revisions since it is not stacking off of another branch. You could try using the Launchpad or Python.org mirrors as a stacking branch, as described here: http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html#using-stacked-br

[Python-Dev] BZR mirror and pushing to Launchpad

2009-03-08 Thread R. David Murray
I just posted a (tiny) patch to the tracker, and for the exercise of it I thought I would push the branch out to Launchpad as suggested in the wiki (http://wiki.python.org/moin/Bazaar). It looks like it is uploading every file in the branch instead of the delta from the trunk. Did I do something

Re: [Python-Dev] Python 3.0 grammar ambiguous?

2009-03-08 Thread Fabio Zadrozny
> To be honest I wasn't aware of this ambiguity. It seems that whoever > wrote the patch for argument unpacking (a, b, *c = ...) got "lucky" > with an ambiguous grammar. This surprises me, because IIRC usually > pgen doesn't like ambiguities. Other parser generators usually have > some way to deal

Re: [Python-Dev] Python 3.0 grammar ambiguous?

2009-03-08 Thread Guido van Rossum
On Sun, Mar 8, 2009 at 3:28 PM, "Martin v. Löwis" wrote: >> To be honest I wasn't aware of this ambiguity. It seems that whoever >> wrote the patch for argument unpacking (a, b, *c = ...) got "lucky" >> with an ambiguous grammar. This surprises me, because IIRC usually >> pgen doesn't like ambigui

Re: [Python-Dev] Python 3.0 grammar ambiguous?

2009-03-08 Thread Martin v. Löwis
> To be honest I wasn't aware of this ambiguity. It seems that whoever > wrote the patch for argument unpacking (a, b, *c = ...) got "lucky" > with an ambiguous grammar. This surprises me, because IIRC usually > pgen doesn't like ambiguities. So how does it resolve the ambiguity? Regards, Martin

Re: [Python-Dev] Python 3.0 grammar ambiguous?

2009-03-08 Thread Guido van Rossum
On Sun, Mar 8, 2009 at 2:18 PM, Nick Coghlan wrote: > Fabio Zadrozny wrote: >> Because it is able to handle the constructs removing the ambiguity, >> and make things right semantically later on, but I don't like the idea >> of being so different from the official grammar (although I'm running >> o

Re: [Python-Dev] Python 3.0 grammar ambiguous?

2009-03-08 Thread Nick Coghlan
Fabio Zadrozny wrote: > Because it is able to handle the constructs removing the ambiguity, > and make things right semantically later on, but I don't like the idea > of being so different from the official grammar (although I'm running > out of choices). I'm not sure it is the same (or at least r

Re: [Python-Dev] Python 3.0 grammar ambiguous?

2009-03-08 Thread Fabio Zadrozny
>> I was wondering how does Python >> disambiguate that... anyone has any pointers on it? > > That is easy to answer: > > py> parser.expr("f(*x)").totuple() > (258, (326, (303, (304, (305, (306, (307, (309, (310, (311, (312, (313, > (314, (315, (316, (317, (1, 'f')), (321, (7, '('), (329, (16, '*')

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

2009-03-08 Thread Nick Coghlan
Jim Jewett wrote: > That said, it may make sense to just give greater prominence to > existing repackagers, such as ActiveState or Enthought. Perhaps we should think about linking to the relevant ActiveState/Enthought distributions from the pydotorg download pages? Cheers, Nick. -- Nick Coghlan

Re: [Python-Dev] Python 3.0 grammar ambiguous?

2009-03-08 Thread Martin v. Löwis
Fabio Zadrozny wrote: > I was wondering how does Python > disambiguate that... anyone has any pointers on it? That is easy to answer: py> parser.expr("f(*x)").totuple() (258, (326, (303, (304, (305, (306, (307, (309, (310, (311, (312, (313, (314, (315, (316, (317, (1, 'f')), (321, (7, '('), (329,

[Python-Dev] Python 3.0 grammar ambiguous?

2009-03-08 Thread Fabio Zadrozny
Hi All, I'm trying to parse Python 3.0 following the Python 3.0 grammar from: http://svn.python.org/projects/python/branches/py3k/Grammar/Grammar Now, when getting to the arglist, it seems that the grammar is ambiguous, and I was wondering how does Python disambiguate that (I'll not put the whole

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

2009-03-08 Thread Jim Jewett
Michael Foord wrote: > Chris Withers wrote: >> ... love to see ... but ... not optimistic >> - python to grow a decent, cross platform, package management system As stated, this may be impossible, because of the difference in what a package should mean on Windows vs Unix. If you just mean a way

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

2009-03-08 Thread Bill Janssen
Martin v. Löwis wrote: > then there are the two (?) free-commercial > distributions (ActivePython, and EPD). Apple's system Python seems to qualify; it comes with a huge additional library, including numpy and Twisted. Bill ___ Python-Dev mailing list

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

2009-03-08 Thread Bill Janssen
Martin v. Löwis wrote: > > If a library is well maintained then there seems to be little point in > > moving it into the standard library as it may actually be harder to > > maintain > > It depends. For quickly evolving libraries, it might be harder to > maintain them in the core, as you can't r

Re: [Python-Dev] Ruby-style Blocks in Python

2009-03-08 Thread Henning von Bargen
I totally agree with Matthew. I don't understand the code at first sight. The "with ... do ..." syntax breaks the "Python is executable pseudo-code" pattern. And according the example given at Tav's web site: with employees.select do (emp): if emp.salary > developer.salary: return fire

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

2009-03-08 Thread Martin v. Löwis
> Perhaps we could encourage more "jumbo" distributions, like Enthought's > and ActiveState's. I suspect many people would rather be able to > maintain their Python functionality as a single product. I think the concept of "jumbo distribution" has been lost. I mentioned it to one of the Enthought

Re: [Python-Dev] RELEASED Python 3.1 alpha 1

2009-03-08 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mar 8, 2009, at 11:18 AM, Steve Holden wrote: Aahz wrote: On Sat, Mar 07, 2009, Benjamin Peterson wrote: On behalf of the Python development team and the Python community, I'm happy to announce the first alpha release of Python 3.1. Congrat

Re: [Python-Dev] Ruby-style Blocks in Python [Pseudo-PEP]

2009-03-08 Thread Guido van Rossum
On Sun, Mar 8, 2009 at 8:13 AM, tav wrote: > Apologies for bringing up an old issue, but I think I've worked out a > Pythonic syntax for doing Ruby-style blocks. As a point of order, please move this discussion to python-ideas, where it belongs roughly until the time a PEP might be ready for appr

Re: [Python-Dev] 3.1 performance

2009-03-08 Thread Guido van Rossum
On Sun, Mar 8, 2009 at 4:05 AM, Victor Stinner wrote: > I just downloaded Python 2.6.1, 3.0.1 and 3.1alpha1, compiled them on 32 and > 64 bits CPU, and ran pybench 2.1(*). > > Summary (minimum total) on 32 bits CPU: >  * Python 2.6.1: 8762 ms >  * Python 3.0.1: 8977 ms >  * Python 3.1a1: 9228 ms (

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

2009-03-08 Thread glyph
On 02:46 pm, dan...@stutzbachenterprises.com wrote: On Sat, Mar 7, 2009 at 8:28 PM, wrote: Anybody interested in working on this at a PyCon Sprint? I won't be attending the conference proper, but plan to spend a couple days sprinting, I'll be there and interested. :) Great! I plan to ho

Re: [Python-Dev] Ruby-style Blocks in Python [Pseudo-PEP]

2009-03-08 Thread Matthew Wilkes
On 8 Mar 2009, at 15:13, tav wrote: Apologies for bringing up an old issue, but I think I've worked out a Pythonic syntax for doing Ruby-style blocks. The short of it is: with employees.select do (emp): if emp.salary > developer.salary: return fireEmployee(emp) else

Re: [Python-Dev] Ruby-style Blocks in Python [Pseudo-PEP]

2009-03-08 Thread Antoine Pitrou
tav espians.com> writes: > > Apologies for bringing up an old issue, but I think I've worked out a > Pythonic syntax for doing Ruby-style blocks. The short of it is: > [...] This thread should probably be redirected to python-ideas. Regards Antoine. __

Re: [Python-Dev] Ruby-style Blocks in Python [Pseudo-PEP]

2009-03-08 Thread Duncan Booth
tav wrote: > I explain in detail in this blog article: > > http://tav.espians.com/ruby-style-blocks-in-python.html > "This is also possible in Python but at the needless cost of naming and defining a function first" The cost of defining the function first is probably much less than the cos

Re: [Python-Dev] 3.1 performance

2009-03-08 Thread Victor Stinner
Le Sunday 08 March 2009 13:20:34 Antoine Pitrou, vous avez écrit : > Hi, > > Victor Stinner haypocalc.com> writes: > > Summary (minimum total) on 32 bits CPU: > > * Python 2.6.1: 8762 ms > > * Python 3.0.1: 8977 ms > > * Python 3.1a1: 9228 ms (slower than 3.0) > > Have you compiled with or with

Re: [Python-Dev] RELEASED Python 3.1 alpha 1

2009-03-08 Thread Steve Holden
Aahz wrote: > On Sat, Mar 07, 2009, Benjamin Peterson wrote: >> On behalf of the Python development team and the Python community, I'm >> happy to announce the first alpha release of Python 3.1. > > Congratulations on your first baby! Here's to hoping you release many > more of these! Yes, well

Re: [Python-Dev] 3.1 performance

2009-03-08 Thread Collin Winter
On Sun, Mar 8, 2009 at 7:30 AM, Christian Heimes wrote: > Antoine Pitrou wrote: >> Hi, >> >> Victor Stinner haypocalc.com> writes: >>> Summary (minimum total) on 32 bits CPU: >>>  * Python 2.6.1: 8762 ms >>>  * Python 3.0.1: 8977 ms >>>  * Python 3.1a1: 9228 ms (slower than 3.0) >> >> Have you co

[Python-Dev] Ruby-style Blocks in Python [Pseudo-PEP]

2009-03-08 Thread tav
Hey all, Apologies for bringing up an old issue, but I think I've worked out a Pythonic syntax for doing Ruby-style blocks. The short of it is: with employees.select do (emp): if emp.salary > developer.salary: return fireEmployee(emp) else: return exten

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

2009-03-08 Thread Steve Holden
Martin v. Löwis wrote: >> In light of this, what I'd love to see (but sadly can't really help >> with, and am not optimistic about happening) is for: >> >> - python to grow a decent, cross platform, package management system >> >> - the standard library to actually shrink to a point where only >> l

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

2009-03-08 Thread Daniel Stutzbach
On Sat, Mar 7, 2009 at 8:28 PM, wrote: > Anybody interested in working on this at a PyCon Sprint? I won't be > attending the conference proper, but plan to spend a couple days sprinting, > I'll be there and interested. :) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC

Re: [Python-Dev] 3.1 performance

2009-03-08 Thread Antoine Pitrou
Christian Heimes cheimes.de> writes: > > Why is the feature still disabled by default? Marc-André expressed concerns that it might trigger compiler issues. > PS: Holy moly! Computed gotos totally put my Python on fire! The feature > increases the minimum run-time by approx. 25% and the average

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

2009-03-08 Thread Martin v. Löwis
> I have mixed feelings. It is great that the batteries are included, but > some batteries are showing their age or not maintained (who maintains > IDLE? - does the calendar module really warrant being in the standard > library? - imaplib is really not useful and IMAPClient which isn't in > the sta

Re: [Python-Dev] 3.1 performance

2009-03-08 Thread Christian Heimes
Antoine Pitrou wrote: > Hi, > > Victor Stinner haypocalc.com> writes: >> Summary (minimum total) on 32 bits CPU: >> * Python 2.6.1: 8762 ms >> * Python 3.0.1: 8977 ms >> * Python 3.1a1: 9228 ms (slower than 3.0) > > Have you compiled with or without "--with-computed-gotos"? Why is the featur

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

2009-03-08 Thread Michael Foord
Martin v. Löwis wrote: In light of this, what I'd love to see (but sadly can't really help with, and am not optimistic about happening) is for: - python to grow a decent, cross platform, package management system - the standard library to actually shrink to a point where only libraries that are

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

2009-03-08 Thread Martin v. Löwis
> In light of this, what I'd love to see (but sadly can't really help > with, and am not optimistic about happening) is for: > > - python to grow a decent, cross platform, package management system > > - the standard library to actually shrink to a point where only > libraries that are not releas

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

2009-03-08 Thread skip
Glyph> I'll try to make sure we get those notes to you in advance of the Glyph> sprints :). I should be at the Twisted sprint the whole time - Glyph> will you be at the physical sprint, or following along at home? Thanks. I will be at the physical sprints. (I live in the Chicago ar

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

2009-03-08 Thread glyph
On 01:50 am, n...@arctrix.com wrote: gl...@divmod.com wrote: we're not even talking about actually putting any Twisted code into the standard library, just standardizing the "protocol" API, which basically boils down to: [...] This sounds great. I'm interested on working on this since i

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

2009-03-08 Thread glyph
On 02:28 am, s...@pobox.com wrote: Glyph> ... which is exactly why I have volunteered to explain to someone Glyph> how to separate the core event-loop bits Neil> This sounds great. Anybody interested in working on this at a PyCon Sprint? I won't be attending the conference prope

Re: [Python-Dev] 3.1 performance

2009-03-08 Thread Antoine Pitrou
Hi, Victor Stinner haypocalc.com> writes: > > Summary (minimum total) on 32 bits CPU: > * Python 2.6.1: 8762 ms > * Python 3.0.1: 8977 ms > * Python 3.1a1: 9228 ms (slower than 3.0) Have you compiled with or without "--with-computed-gotos"? Regards Antoine. _

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

2009-03-08 Thread Chris Withers
Tres Seaver wrote: If it is possible for a hostile outsider to trigger the DOS by sending mail to be processed by an application using the library, and the application can't avoid the DOS without ditching / forking / monkeypatching the library, then I would call the bug a "security bug", period.

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

2009-03-08 Thread Chris Withers
Barry Warsaw 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 is a Python-wide policy. ...and, now that Martin has explained it, it makes p

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

2009-03-08 Thread Chris Withers
Guido van Rossum wrote: Based on the sad example of BerkeleyDB, which was initially welcomed into the stdlib but more recently booted out for reasons having to do with the release cycle of the external dependency and other issues typical for large external dependencies, I think we should be very

Re: [Python-Dev] 3.1 performance

2009-03-08 Thread Victor Stinner
Hi, > So, 3.1 is 30% faster in user CPU time, even though it probably has more > tests (...) Wow! I just downloaded Python 2.6.1, 3.0.1 and 3.1alpha1, compiled them on 32 and 64 bits CPU, and ran pybench 2.1(*). Summary (minimum total) on 32 bits CPU: * Python 2.6.1: 8762 ms * Python 3.0.1: