Re: [Python-Dev] [Python-checkins] (2.7): Use simpler assert in basic example.

2011-03-11 Thread Ezio Melotti
On 11/03/2011 4.45, Nick Coghlan wrote: On Thu, Mar 10, 2011 at 4:36 PM, ezio.melotti python-check...@python.org wrote: http://hg.python.org/cpython/rev/9adc4792db9a changeset: 68356:9adc4792db9a branch: 2.7 user:Ezio Melottiezio.melo...@gmail.com date:Thu Mar 10

Re: [Python-Dev] [Python-checkins] (2.6): Issue #11424: Fix bug in determining child loggers.

2011-03-11 Thread Thomas Wouters
On Thu, Mar 10, 2011 at 18:47, Nick Coghlan ncogh...@gmail.com wrote: On Thu, Mar 10, 2011 at 5:41 PM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: - Original Message From: Éric Araujo mer...@netwok.org From what I understand, we're supposed to forward-port in Mercurial,

[Python-Dev] Summary of Python tracker Issues

2011-03-11 Thread Python tracker
ACTIVITY SUMMARY (2011-03-04 - 2011-03-11) 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 counts and deltas: open2709 (+18) closed 20540 (+53) total 23249 (+71) Open issues

[Python-Dev] Callable, non-descriptor class attributes.

2011-03-11 Thread Thomas Wouters
One of the things brought up at the language summit (and I believe at the VM summit, although I wasn't there) was the unpredictable behaviour of callables turning into methods when they're class attributes. Specifically, things that are CFunctions in CPython (builtin functions, which are not

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-11 Thread Antoine Pitrou
On Wed, 09 Mar 2011 07:15:07 +0100 Stefan Behnel stefan...@behnel.de wrote: Actually, why not put up a web page of upcoming changes somewhere, that lists major decisions with user impact that were taken on python-dev? Including a link to the relevant discussion and decision. Often enough,

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-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/11/2011 03:24 PM, Antoine Pitrou wrote: On Wed, 09 Mar 2011 07:15:07 +0100 Stefan Behnel stefan...@behnel.de wrote: Actually, why not put up a web page of upcoming changes somewhere, that lists major decisions with user impact that were

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-11 Thread Guido van Rossum
On Wed, Mar 9, 2011 at 3:40 PM, Doug Hellmann doug.hellm...@gmail.com wrote: On Mar 9, 2011, at 9:50 AM, Tim Lesher wrote: On Wed, Mar 9, 2011 at 01:15, Stefan Behnel stefan...@behnel.de wrote: Actually, why not put up a web page of upcoming changes somewhere, that lists major decisions with

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-11 Thread Antoine Pitrou
On Fri, 11 Mar 2011 15:53:03 -0500 Tres Seaver tsea...@palladion.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/11/2011 03:24 PM, Antoine Pitrou wrote: On Wed, 09 Mar 2011 07:15:07 +0100 Stefan Behnel stefan...@behnel.de wrote: Actually, why not put up a web page of

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-11 Thread Antoine Pitrou
On Wed, 9 Mar 2011 15:40:56 -0500 Doug Hellmann doug.hellm...@gmail.com wrote: The original request from the board was for the communications team to write the messages, but I think it is more appropriate for the people doing the work to talk about it. [...] I asked Michael to add this

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-11 Thread Brian Curtin
On Mar 11, 2011 4:52 PM, Guido van Rossum gu...@python.org wrote: On Wed, Mar 9, 2011 at 3:40 PM, Doug Hellmann doug.hellm...@gmail.com wrote: On Mar 9, 2011, at 9:50 AM, Tim Lesher wrote: On Wed, Mar 9, 2011 at 01:15, Stefan Behnel stefan...@behnel.de wrote: Actually, why not put up a

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-11 Thread Antoine Pitrou
On Fri, 11 Mar 2011 22:56:49 +0100 Antoine Pitrou solip...@pitrou.net wrote: On Fri, 11 Mar 2011 15:53:03 -0500 Tres Seaver tsea...@palladion.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/11/2011 03:24 PM, Antoine Pitrou wrote: On Wed, 09 Mar 2011 07:15:07 +0100

Re: [Python-Dev] [Python-checkins] devguide: Suggest using mpatch in the FAQ

2011-03-11 Thread Eric Smith
On 03/11/2011 06:03 PM, antoine.pitrou wrote: If you want to try out or review a patch generated using Mercurial, do:: - hg import --no-commit somework.patch + patch -p1 somework.patch This will apply the changes in your working copy without committing them. If the patch was not

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-11 Thread Guido van Rossum
On Fri, Mar 11, 2011 at 5:05 PM, Brian Curtin brian.cur...@gmail.com wrote: On Mar 11, 2011 4:52 PM, Guido van Rossum gu...@python.org wrote: On Wed, Mar 9, 2011 at 3:40 PM, Doug Hellmann doug.hellm...@gmail.com wrote: On Mar 9, 2011, at 9:50 AM, Tim Lesher wrote: On Wed, Mar 9, 2011

Re: [Python-Dev] Callable, non-descriptor class attributes.

2011-03-11 Thread Greg Ewing
Thomas Wouters wrote: 2. Make CFunctions turn into methods in CPython (after a period of warning about the impending change, obviously.) The actual *usecase* for this is hard to envision While not necessary for the case being discussed here, this would be a big help for Pyrex and Cython,

Re: [Python-Dev] Callable, non-descriptor class attributes.

2011-03-11 Thread Guido van Rossum
On Fri, Mar 11, 2011 at 6:49 PM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: Thomas Wouters wrote:  2. Make CFunctions turn into methods in CPython (after a period of warning about the impending change, obviously.) The actual *usecase* for this is hard to envision While not necessary for

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-11 Thread Paul Moore
On 11 March 2011 23:24, Guido van Rossum gu...@python.org wrote: I'm interested in the task and I guess I'll follow-up with Doug Hellman. I don't follow -ideas close enough to summarize it, but I'd contribute to a -dev blog. Awesome! (And we don't need to stop at one blogger. Many hands make

[Python-Dev] The purpose of SETUP_LOOP, BREAK_LOOP, CONTINUE_LOOP

2011-03-11 Thread Eugene Toder
Hello, What is the purpose of SETUP_LOOP instruction? From a quick look it seems like it just pushes the size of the loop into blocks stack; that size is only used by BREAK_LOOP instruction. BREAK_LOOP could just contain the target address directly, like CONTINUE_LOOP does. This would avoid

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

2011-03-11 Thread Raymond Hettinger
Today, there was a significant check-in to the peephole optimizer that I think should be reverted: http://hg.python.org/cpython/rev/14205d0fee45/ The peephole optimizer pre-dated the introduction of the abstract syntax tree. Now that we have an AST, the preferred way to

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

2011-03-11 Thread Alexander Belopolsky
On Fri, Mar 11, 2011 at 9:28 PM, Raymond Hettinger raymond.hettin...@gmail.com 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/ +1 I was going to comment on the corresponding

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

2011-03-11 Thread Benjamin Peterson
2011/3/11 Raymond Hettinger raymond.hettin...@gmail.com: Today, there was a significant check-in to the peephole optimizer that I think should be reverted:                http://hg.python.org/cpython/rev/14205d0fee45/ The peephole optimizer pre-dated the introduction of the abstract syntax

Re: [Python-Dev] Callable, non-descriptor class attributes.

2011-03-11 Thread Steven D'Aprano
Thomas Wouters wrote: One of the things brought up at the language summit (and I believe at the VM summit, although I wasn't there) was the unpredictable behaviour of callables turning into methods when they're class attributes. [...] 1. Make staticmethod a callable object directly (it isn't,

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

2011-03-11 Thread Guido van Rossum
I recall several occasions where the peephole optimizer was subtly buggy -- on one occasion the bug remained undetected for at least a whole release cycle. (Sorry, I can't recall the details.) In fact, the bug reported in http://bugs.python.org/issue11244 is another example of how subtle the

Re: [Python-Dev] Callable, non-descriptor class attributes.

2011-03-11 Thread Guido van Rossum
On Fri, Mar 11, 2011 at 10:09 PM, Steven D'Aprano st...@pearwood.info wrote: Thomas Wouters wrote: One of the things brought up at the language summit (and I believe at the VM summit, although I wasn't there) was the unpredictable behaviour of callables turning into methods when they're

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

2011-03-11 Thread Eugene Toder
Experience shows that optimizations are always error prone, no matter what framework or internal representation you use. I don't think we should assume that simply rewriting all optimizations to work on AST will make them bug free once and for all. On the contrary, I think such a rewrite will

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

2011-03-11 Thread Raymond Hettinger
On Mar 11, 2011, at 11:11 PM, Eugene Toder wrote: Experience shows that optimizations are always error prone, no matter what framework or internal representation you use. On that basis, I believe that we ought to declare peephole.c as being somewhat off-limits for further development (except

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

2011-03-11 Thread Eugene Toder
Experience shows that optimizations are always error prone, no matter what framework or internal representation you use. On that basis, I believe that we ought to declare peephole.c as being somewhat off-limits for further development (except for small adaptations if the underlying opcodes

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

2011-03-11 Thread Cesare Di Mauro
2011/3/12 Benjamin Peterson benja...@python.org 2011/3/11 Raymond Hettinger raymond.hettin...@gmail.com: Today, there was a significant check-in to the peephole optimizer that I think should be reverted: http://hg.python.org/cpython/rev/14205d0fee45/ The peephole optimizer

Re: [Python-Dev] Callable, non-descriptor class attributes.

2011-03-11 Thread Nick Coghlan
On Fri, Mar 11, 2011 at 10:48 PM, Guido van Rossum gu...@python.org wrote: +1 on making staticmethods callable. I would have found that useful in the past. IIUC Thomas found that this breaks some current use of staticmethod. From his first post, I understood the compatibility issue to more be

Re: [Python-Dev] Callable, non-descriptor class attributes.

2011-03-11 Thread Steven D'Aprano
Guido van Rossum wrote: +1 on making staticmethods callable. I would have found that useful in the past. IIUC Thomas found that this breaks some current use of staticmethod. As I understand it, Thomas found that having staticmethod callable AND have staticmethod.__get__ return self breaks

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

2011-03-11 Thread Eugene Toder
One note on the patch: it allocates an extra stack which is dynamically grown; but there is no unittest to exercise the stack-growing code. Isn't this doing it? 1.20 +# Long tuples should be folded too. 1.21 +asm = dis_single(repr(tuple(range(1 1.22 +# One

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

2011-03-11 Thread Steven D'Aprano
Cesare Di Mauro wrote: Also, optimizations can be done not only for numbers, but even for tuples, lists, dictionaries, and... slices (pag. 22). See pages 21-24 of thishttp://wpython2.googlecode.com/files/Beyond%20Bytecode%20-%20A%20Wordcode-based%20Python.pdf For the record, constant-folding,

[Python-Dev] forward-porting from 3.1 to 3.2 to 3.3

2011-03-11 Thread Eli Bendersky
The devguide's recommendation is to forward-port changes withing a major release line, i.e. if I need something in all 3.[123], then start with 3.1 and forward-port (by hg merge branch) to 3.2 and then 3.3 Just to clarify - does this mean that all changesets that are applied to 3.2 eventually get