Re: [Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

2011-03-14 Thread Eugene Toder
To give this a positive spin, here's a patch that implements constant folding on AST (it does few other optimizations on compiler data structures, so it replaces "peephole over bytecode" completely). http://bugs.python.org/issue11549 It passes make test, but of course more testing is needed. Comm

Re: [Python-Dev] PEP 382 Master

2011-03-14 Thread Guido van Rossum
On Mon, Mar 14, 2011 at 1:10 PM, "Martin v. Löwis" wrote: > I'd like to appoint Eric Smith as the PEP master for PEP 382 > (Namespace Packages). Eric has ample experience with PEPs and strikes me as pretty even-keeled (hi Eric! :-) so +1 from me. > I hope to complete the implementation shortly,

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread James Mills
On Tue, Mar 15, 2011 at 11:50 AM, Terry Reedy wrote: >> How would that work if you had a field named "replace"? I think >> Raymond's current design is as good as it's going to get. > > 'as_dict' is an unlikely fieldname. 're_place' is too, but that just shift > the '_' from '_replace'. No gain. I

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Terry Reedy
On 3/14/2011 9:23 PM, Eric Smith wrote: On 3/14/2011 8:44 PM, James Mills wrote: On Tue, Mar 15, 2011 at 9:48 AM, R. David Murray wrote: But directly calling a __xxx__ method in Python is a very unusual thing to do. It would be extremely odd to have that be the expected way to call a method on

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Eric Smith
On 3/14/2011 8:44 PM, James Mills wrote: On Tue, Mar 15, 2011 at 9:48 AM, R. David Murray wrote: But directly calling a __xxx__ method in Python is a very unusual thing to do. It would be extremely odd to have that be the expected way to call a method on a class. Can't namedtuple be improved

[Python-Dev] NetBSD and curses

2011-03-14 Thread Bill Green
Hi all, I ran across this issue several months ago and filed a bug report (#9667). It just came up again, and it doesn't look like anything's been done with the bug report, so I thought I'd post here. In _cursesmodule.c there are a lot of preprocesser conditionals that test if the system is

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread James Mills
On Tue, Mar 15, 2011 at 9:48 AM, R. David Murray wrote: > But directly calling a __xxx__ method in Python is a very > unusual thing to do.  It would be extremely odd to have that > be the expected way to call a method on a class. Can't namedtuple be improved to support the named fields _and_ have

Re: [Python-Dev] packaging

2011-03-14 Thread Greg Ewing
Antoine Pitrou wrote: But doesn't it also mean many setup.py scripts will have very tedious import sequences, such as: try: from packaging.compiler import FooCompiler from packaging.commands import BarCommand except ImportError: try: from distutils2.compiler import FooCompil

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread R. David Murray
On Tue, 15 Mar 2011 09:54:23 +1300, Greg Ewing wrote: > Nick Coghlan wrote: > > > True, but all those underscores are a PITA to type and read for > > methods that are meant to be called directly. > > Matter of taste, I suppose. I don't find them all that > bothersome, and a double underscore na

[Python-Dev] Copyright notices

2011-03-14 Thread Nadeem Vawda
I was wondering what the policy is regarding copyright notices and license boilerplate text at the top of source files. I am currently rewriting the bz2 module (see http://bugs.python.org/issue5863), splitting the existing Modules/bz2module.c into Modules/_bz2module.c and Lib/bz2.py. Are new file

Re: [Python-Dev] public visibility of python-dev decisions "before it's too late" (was: PyCObject_AsVoidPtr removed from python 3.2 - is this documented?)

2011-03-14 Thread Reid Kleckner
On Mon, Mar 14, 2011 at 6:30 PM, Lennart Regebro wrote: > On Wed, Mar 9, 2011 at 01:15, Stefan Behnel wrote: >> I can confirm that the Cython project was as surprised of the PyCapsule >> change in Python 3.2 as (I guess) most other users, and I would claim that >> we are a project with one of the

[Python-Dev] Fwd: Re: packaging

2011-03-14 Thread Tarek Ziadé
Sorry i am not used to my new phone .. fwding to python-dev -- Message transféré -- De : "Tarek Ziadé" Date : 14 mars 2011 19:12 Objet : Re: [Python-Dev] packaging À : "Paul Moore" That document is from the latest release at pypi. You can find a fresher doc in docs in the hg rep

Re: [Python-Dev] packaging

2011-03-14 Thread Paul Moore
On 14 March 2011 22:34, Tarek Ziadé wrote: > Setup.py is gone in distutils2 and therefore in packaging Where can I find the documentation? The distutils2 docs ("A simple example") still use setup.py. See http://packages.python.org/Distutils2/distutils/introduction.html#a-simple-example Paul

Re: [Python-Dev] packaging

2011-03-14 Thread Tarek Ziadé
Setup.py is gone in distutils2 and therefore in packaging Le 14 mars 2011 18:27, "Antoine Pitrou" a écrit : > On Mon, 14 Mar 2011 18:00:50 -0400 > Tarek Ziadé wrote: >> >> And it's also a good way to prevent any conflict with 3.3 : the >> standalone version for 2.4 to 3.2 is "distutils2", and peo

Re: [Python-Dev] public visibility of python-dev decisions "before it's too late" (was: PyCObject_AsVoidPtr removed from python 3.2 - is this documented?)

2011-03-14 Thread Lennart Regebro
On Wed, Mar 9, 2011 at 01:15, Stefan Behnel wrote: > I can confirm that the Cython project was as surprised of the PyCapsule > change in Python 3.2 as (I guess) most other users, and I would claim that > we are a project with one of the highest probabilities of being impacted by > C-API changes.

Re: [Python-Dev] packaging

2011-03-14 Thread Antoine Pitrou
On Mon, 14 Mar 2011 18:00:50 -0400 Tarek Ziadé wrote: > > And it's also a good way to prevent any conflict with 3.3 : the > standalone version for 2.4 to 3.2 is "distutils2", and people won't > have to deal with the same package being in the stdlib and at PyPI. > (like json vs simplejson, unittes

Re: [Python-Dev] packaging

2011-03-14 Thread Tarek Ziadé
On Mon, Mar 14, 2011 at 4:46 PM, Antoine Pitrou wrote: > On Mon, 14 Mar 2011 15:39:55 -0400 > Tarek Ziadé wrote: >> Hey, >> >> I just wanted to summarize what we've started at the sprint (and >> hopefully finish 1 to 7 this week): >> >> 1/ distutils2 is merged as the "packaging" Python package in

Re: [Python-Dev] packaging

2011-03-14 Thread Barry Warsaw
On Mar 14, 2011, at 09:46 PM, Antoine Pitrou wrote: >Why does it get yet another name? >We already have distutils, setuptools, distribute, distutils2... now >"packaging"? We need a unique name for Python 3.3, otherwise third party modules can't be written to conditionally depend on the batteries-

Re: [Python-Dev] [PEPs] Support the /usr/bin/python2 symlink upstream

2011-03-14 Thread Michael Foord
On 07/03/2011 21:33, Glenn Linderman wrote: On 3/7/2011 4:00 PM, Michael Foord wrote: On 07/03/2011 23:52, Greg Ewing wrote: Michael Foord wrote: - I doubt calling it python.exe will fly, but I'm not sure. If so what will you call what is currently 'python.exe'? - if not then "python foo

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Greg Ewing
Nick Coghlan wrote: True, but all those underscores are a PITA to type and read for methods that are meant to be called directly. Matter of taste, I suppose. I don't find them all that bothersome, and a double underscore name stands out very clearly as being part of the infrastructure rather t

Re: [Python-Dev] packaging

2011-03-14 Thread Antoine Pitrou
On Mon, 14 Mar 2011 15:39:55 -0400 Tarek Ziadé wrote: > Hey, > > I just wanted to summarize what we've started at the sprint (and > hopefully finish 1 to 7 this week): > > 1/ distutils2 is merged as the "packaging" Python package in the > standard library Why does it get yet another name? We al

Re: [Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

2011-03-14 Thread Cesare Di Mauro
2011/3/14 Alexander Belopolsky > On Sat, Mar 12, 2011 at 1:08 PM, Raymond Hettinger > wrote: > > I would like to withdraw my suggestion for the recursive constant folding > patch to be reverted. > > So what is the status of peephole optimization now? Is it back under > active development? Let

[Python-Dev] PEP 382 Master

2011-03-14 Thread Martin v. Löwis
I'd like to appoint Eric Smith as the PEP master for PEP 382 (Namespace Packages). I hope to complete the implementation shortly, at which point there will be a final call for comments. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org h

[Python-Dev] New committers coming online

2011-03-14 Thread Jesse Noller
As agreed to at the language summit, I have pinged the IronPython, Jython and PyPy teams for committers on their respective teams who (do/did not) have commit rights prior to PyCon. These people are: Jeff Hardy (IronPython) Alex Gaynor (PyPy) Carl Friedrich Bolz (PyPy) Maciej Fijalkowski (PyPy) An

[Python-Dev] packaging

2011-03-14 Thread Tarek Ziadé
Hey, I just wanted to summarize what we've started at the sprint (and hopefully finish 1 to 7 this week): 1/ distutils2 is merged as the "packaging" Python package in the standard library 2/ distutils2 will provide a "pysetup" script in Python to run all packaging tools (pysetup is a wrapper that

Re: [Python-Dev] PEP 395: Module Aliasing

2011-03-14 Thread Michael Foord
On 09/03/2011 16:30, P.J. Eby wrote: At 05:35 PM 3/4/2011 +, Michael Foord wrote: That (below) is not distutils it is setuptools. distutils just uses `scripts=[...]`, which annoyingly *doesn't* work with setuptools. Er, what? That's news to me. Could you file a bug report about what doe

Re: [Python-Dev] Have we lost changeset info in the buildbots

2011-03-14 Thread David Bolen
Antoine Pitrou writes: > I suggest you try http://code.google.com/p/bbreport/, which provides a > very nice command-line interface. Speaking of bbreport, I sometimes use the published page on that site (http://code.google.com/p/bbreport/wiki/PythonBuildbotReport) to check over things, but lookin

[Python-Dev] imaplib: Time2Internaldate() returns localized strings

2011-03-14 Thread Sebastian Spaeth
Hi there, imaplib has an issue (well, more than one :-)), but in this specific case there is even a patch that I want to lobby. http://bugs.python.org/issue11024 imaplib: Time2Internaldate() returns localized strings while the IMAP RFC requires English month names. As that function is used for ev

Re: [Python-Dev] Have we lost changeset info in the buildbots

2011-03-14 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/03/11 18:07, Antoine Pitrou wrote: > On Mon, 14 Mar 2011 17:59:27 +0100 > Jesus Cea wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Traditionally I could see who was the committer who push change to the >> buildbots. This inf

Re: [Python-Dev] cpython: Add a 'timeout' argument to subprocess.Popen.

2011-03-14 Thread Reid Kleckner
On Mon, Mar 14, 2011 at 12:36 PM, Antoine Pitrou wrote: > On Mon, 14 Mar 2011 17:16:11 +0100 > reid.kleckner wrote: >> @@ -265,34 +271,43 @@ >>        generates enough output to a pipe such that it blocks waiting >>        for the OS pipe buffer to accept more data. >> >> +   .. versionchanged::

Re: [Python-Dev] PEPs migrated to mercurial?

2011-03-14 Thread Georg Brandl
Am 14.03.2011 17:48, schrieb Jesus Cea: > I see , but last change was a year ago. > > I changes PEP 11 time ago, and I can't see the changes there. So the > repository seems a bit outdated. Or, maybe, are we still using SVN for > PEPs?. Yes. Not for much longer though

Re: [Python-Dev] Have we lost changeset info in the buildbots

2011-03-14 Thread Antoine Pitrou
On Mon, 14 Mar 2011 17:59:27 +0100 Jesus Cea wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Traditionally I could see who was the committer who push change to the > buildbots. This info seems not to be (easily) available. That info was lost quite before the hg migration, when the

[Python-Dev] Have we lost changeset info in the buildbots

2011-03-14 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Traditionally I could see who was the committer who push change to the buildbots. This info seems not to be (easily) available. For instance, I see . I just pushed a changeset. I ca

[Python-Dev] PEPs migrated to mercurial?

2011-03-14 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I see , but last change was a year ago. I changes PEP 11 time ago, and I can't see the changes there. So the repository seems a bit outdated. Or, maybe, are we still using SVN for PEPs?. - -- Jesus Cea Avion

Re: [Python-Dev] Python 3.4 version in the tracker

2011-03-14 Thread Georg Brandl
Am 13.03.2011 14:47, schrieb Eric Smith: > On 03/13/2011 06:49 AM, Georg Brandl wrote: >> On 12.03.2011 17:09, Eric Smith wrote: >>> On 03/12/2011 10:55 AM, Éric Araujo wrote: > I have a deprecation warning that I need to make an error in 3.4. A neat trick to remember to do those chan

Re: [Python-Dev] cpython: Add a 'timeout' argument to subprocess.Popen.

2011-03-14 Thread Antoine Pitrou
On Mon, 14 Mar 2011 17:16:11 +0100 reid.kleckner wrote: > @@ -265,34 +271,43 @@ >generates enough output to a pipe such that it blocks waiting >for the OS pipe buffer to accept more data. > > + .. versionchanged:: 3.2 > + *timeout* was added. Unless you plan to borrow som

Re: [Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

2011-03-14 Thread Ned Batchelder
On 3/12/2011 12:39 AM, Eugene Toder wrote: > You've got wishful thinking if you think a handful of tests can catch > errors in code that sophisticated. Why limit yourself with a handful of tests? Python is widespread, there's*a lot* of code in Python. Unlike with libraries, any code you run t

Re: [Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

2011-03-14 Thread Alexander Belopolsky
On Sat, Mar 12, 2011 at 1:08 PM, Raymond Hettinger wrote: > I would like to withdraw my suggestion for the recursive constant folding > patch to be reverted. So what is the status of peephole optimization now? Is it back under active development? Let me quote a tracker comment that I posted t

Re: [Python-Dev] Suggest reverting today's checkin (recursive constant folding in the peephole optimizer)

2011-03-14 Thread Alexander Belopolsky
On Fri, Mar 11, 2011 at 9:53 PM, Alexander Belopolsky wrote: > On Fri, Mar 11, 2011 at 9:28 PM, Raymond Hettinger > wrote: >> Today, there was a significant check-in to the peephole optimizer that I >> think should be reverted: >>                http://hg.python.org/cpython/rev/14205d0fee45/ > >

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Tim Lesher
On Mon, Mar 14, 2011 at 05:45, Nick Coghlan wrote: > There are two relatively simple ways forward I can see: > > A. Add a __public__ attribute that pydoc (and import *) understand. > This would overrride the default "this is private" detection and add > affected names to the public list (without n

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Eric Smith
On 03/14/2011 07:46 AM, Antoine Pitrou wrote: On Mon, 14 Mar 2011 06:29:09 -0400 Eric Smith wrote: On 03/14/2011 02:33 AM, Greg Ewing wrote: Tim Lesher wrote: Because named tuple prefixes a single underscore to its added method names (_asdict, _replace, and _make), those methods' docstrings

Re: [Python-Dev] cpython (3.2): Issue #11329: PyEval_InitThreads() cannot be called before Py_Initialize()

2011-03-14 Thread Antoine Pitrou
On Mon, 14 Mar 2011 06:01:17 -0400 Nick Coghlan wrote: > On Sun, Mar 13, 2011 at 6:29 PM, antoine.pitrou > wrote: > >    .. index:: single: Py_Initialize() > > > > -   This is a no-op when called for a second time.  It is safe to call this > > function > > -   before calling :c:func:`Py_Initial

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Antoine Pitrou
On Mon, 14 Mar 2011 06:29:09 -0400 Eric Smith wrote: > On 03/14/2011 02:33 AM, Greg Ewing wrote: > > Tim Lesher wrote: > > > >> Because named tuple prefixes a single underscore to its added method > >> names (_asdict, _replace, and _make), those methods' docstrings are > >> omitted from pydoc: > >

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Nick Coghlan
On Mon, Mar 14, 2011 at 6:43 AM, Éric Araujo wrote: >> No, probably we should add some sort of __yes_i_am_public__ override >> attribute that pydoc looks for. It's such a pity that those methods >> have to have underscores... > > My opinion is that pydoc should use __dir__ (namedtuple does not > c

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Éric Araujo
> No, probably we should add some sort of __yes_i_am_public__ override > attribute that pydoc looks for. It's such a pity that those methods > have to have underscores... My opinion is that pydoc should use __dir__ (namedtuple does not currently use it but could). Regards

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Eric Smith
On 03/14/2011 02:33 AM, Greg Ewing wrote: Tim Lesher wrote: Because named tuple prefixes a single underscore to its added method names (_asdict, _replace, and _make), those methods' docstrings are omitted from pydoc: IMO these should be called __asdict__, __replace__ and __make__. Users are p

Re: [Python-Dev] [Python-checkins] cpython (3.2): Issue #11329: PyEval_InitThreads() cannot be called before Py_Initialize()

2011-03-14 Thread Nick Coghlan
On Sun, Mar 13, 2011 at 6:29 PM, antoine.pitrou wrote: >    .. index:: single: Py_Initialize() > > -   This is a no-op when called for a second time.  It is safe to call this > function > -   before calling :c:func:`Py_Initialize`. > +   This is a no-op when called for a second time. This change

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Nick Coghlan
On Mon, Mar 14, 2011 at 2:33 AM, Greg Ewing wrote: > Tim Lesher wrote: > >> Because named tuple prefixes a single underscore to its added method >> names (_asdict, _replace, and _make), those methods' docstrings are >> omitted from pydoc: > > IMO these should be called __asdict__, __replace__ and

Re: [Python-Dev] pydoc for named tuples is missing methods

2011-03-14 Thread Raymond Hettinger
On Mar 13, 2011, at 7:41 PM, Tim Lesher wrote: > [I mentioned this to Raymond Hettinger after his PyCon talk, and I > promised a bug and hopefully a patch. I don't see an obvious solution, > though, so I'll ask here first.] Just make a tracker entry and assign it to me. I'll take a look and see