Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread Alex Gaynor
Brett Cannon python.org> writes: > > Time to ask the other VMs what they are currently doing (the ast module came into existence in Python 2.6 so all the VMs should be answer the question since Jython is in alpha for 2.7 compatibility). > As far as I know PyPy supports the ast module, and pr

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread fwierzbi...@gmail.com
Thanks Brett, that cleared everything up for me! And indeed it is what I'm thinking of doing for Jython (Minimal nodes for the compiler and parallel PyObjects for Python). -Frank ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/ma

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread Steven D'Aprano
On 14/08/12 06:46, Guido van Rossum wrote: On Mon, Aug 13, 2012 at 1:05 PM, fwierzbi...@gmail.com wrote: On Mon, Aug 13, 2012 at 12:06 PM, Brett Cannon wrote: I see nothing about ast possibly being CPython only. Should there be? Time to ask the other VMs what they are currently doing (the

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread Brett Cannon
On Mon, Aug 13, 2012 at 6:35 PM, fwierzbi...@gmail.com < fwierzbi...@gmail.com> wrote: > On Mon, Aug 13, 2012 at 3:10 PM, Brett Cannon wrote: > > > Direct. There is an AST grammar file that gets compiled into C and Python > > objects which are used by the compiler (c version) or exposed to users

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread fwierzbi...@gmail.com
On Mon, Aug 13, 2012 at 3:10 PM, Brett Cannon wrote: > Direct. There is an AST grammar file that gets compiled into C and Python > objects which are used by the compiler (c version) or exposed to users > (Python version). At the risk of making you repeat yourself, and just to be sure I understand

Re: [Python-Dev] AST optimizer implemented in Python

2012-08-13 Thread Nick Coghlan
Implementations are currently required to *have* an AST (or else declare non compliance with that particular flag to compile). They're definitely not required to have the *same* AST, thus all AST manipulation, like bytecode manipulation, is necessarily implementation dependent. We don't even guara

Re: [Python-Dev] [Python-checkins] cpython (merge 3.2 -> default): Merge 3.2

2012-08-13 Thread Brian Curtin
On Mon, Aug 13, 2012 at 5:13 PM, brian.curtin wrote: > http://hg.python.org/cpython/rev/256bfee696c5 > changeset: 78552:256bfee696c5 > parent: 78549:edcbf3edf701 > parent: 78551:fcad4566910b > user:Brian Curtin > date:Mon Aug 13 17:12:02 2012 -0500 > summary: > Merge

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread Brett Cannon
On Aug 13, 2012 5:22 PM, "fwierzbi...@gmail.com" wrote: > > On Mon, Aug 13, 2012 at 1:46 PM, Guido van Rossum wrote: > > On Mon, Aug 13, 2012 at 1:05 PM, fwierzbi...@gmail.com > > wrote: > >> On Mon, Aug 13, 2012 at 12:06 PM, Brett Cannon wrote: > I see nothing about ast possibly being CPy

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread Terry Reedy
On 8/13/2012 4:46 PM, Guido van Rossum wrote: On Mon, Aug 13, 2012 at 1:05 PM,fwierzbi...@gmail.com wrote: >On Mon, Aug 13, 2012 at 12:06 PM, Brett Cannon wrote: >>>I see nothing about ast possibly being CPython only. Should there be? >> >> >>Time to ask the other VMs what they are currentl

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread fwierzbi...@gmail.com
On Mon, Aug 13, 2012 at 1:46 PM, Guido van Rossum wrote: > On Mon, Aug 13, 2012 at 1:05 PM, fwierzbi...@gmail.com > wrote: >> On Mon, Aug 13, 2012 at 12:06 PM, Brett Cannon wrote: I see nothing about ast possibly being CPython only. Should there be? >>> >>> >>> Time to ask the other VMs wha

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread Guido van Rossum
On Mon, Aug 13, 2012 at 1:05 PM, fwierzbi...@gmail.com wrote: > On Mon, Aug 13, 2012 at 12:06 PM, Brett Cannon wrote: >>> I see nothing about ast possibly being CPython only. Should there be? >> >> >> Time to ask the other VMs what they are currently doing (the ast module came >> into existence i

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread fwierzbi...@gmail.com
On Mon, Aug 13, 2012 at 1:05 PM, fwierzbi...@gmail.com wrote: > 2.5+ contains I should have said *Jython* 2.5+ -Frank ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.o

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread fwierzbi...@gmail.com
On Mon, Aug 13, 2012 at 12:06 PM, Brett Cannon wrote: >> I see nothing about ast possibly being CPython only. Should there be? > > > Time to ask the other VMs what they are currently doing (the ast module came > into existence in Python 2.6 so all the VMs should be answer the question > since Jyth

Re: [Python-Dev] [Python-checkins] cpython: Push importlib ABC hierarchy chart.

2012-08-13 Thread Brett Cannon
For documentation, this appears to be for http://bugs.python.org/issue15628 . On Mon, Aug 13, 2012 at 3:19 PM, andrew.svetlov wrote: > http://hg.python.org/cpython/rev/1c8a6df94602 > changeset: 78547:1c8a6df94602 > user:Andrew Svetlov > date:Mon Aug 13 22:19:01 2012 +0300 > su

[Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread Brett Cannon
On Mon, Aug 13, 2012 at 3:00 PM, Terry Reedy wrote: > On 8/13/2012 10:45 AM, Guido van Rossum wrote: > >> Not so fast. If you make this a language feature you force all Python >> implementations to support an identical AST API. That's a big step. >> > > I have been wondering about this. One could

Re: [Python-Dev] AST optimizer implemented in Python

2012-08-13 Thread Terry Reedy
On 8/13/2012 10:45 AM, Guido van Rossum wrote: Not so fast. If you make this a language feature you force all Python implementations to support an identical AST API. That's a big step. I have been wondering about this. One could think from the manuals that we are there already. From the beginn

Re: [Python-Dev] AST optimizer implemented in Python

2012-08-13 Thread Guido van Rossum
Not so fast. If you make this a language feature you force all Python implementations to support an identical AST API. That's a big step. Not that AST manipulation isn't cool -- but I'd like to warn against over-enthusiasm that might backfire on the language (or its community) as a whole. --Guido

Re: [Python-Dev] python 2.7 + https + urlopen = ?

2012-08-13 Thread martin
How would you feel, if you issued : import urllib urlopen("""https://server.domain.com""";).read() and the command got you data from some other URL without telling you! You use firefox, and the site is different than the data you got! Same with chrome. Safari. Even IE ! Cheated? (Well I was

Re: [Python-Dev] What's New in Python 3.3

2012-08-13 Thread Matthias Klose
On 09.08.2012 01:04, Victor Stinner wrote: > Does Python 3.3 support cross-compilation? There are two new option > for configure: --host and --build, but it's not mentioned in What's > New in Python 3.3. it does work, but it is only tested for the linux -> linux case. the mingw and macosx cross bu

Re: [Python-Dev] AST optimizer implemented in Python

2012-08-13 Thread Mark Shannon
Brett Cannon wrote: On Sat, Aug 11, 2012 at 8:16 PM, Eric Snow > wrote: On Sat, Aug 11, 2012 at 6:03 PM, Brett Cannon mailto:br...@python.org>> wrote: > It would also be very easy to expand importlib.abc.SourceLoader to add a > method whic