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

2012-08-12 Thread MRAB
On 13/08/2012 02:39, Python Urlopen wrote: [snip] After a lot of pain, I got myself out of this trouble, and my code now works correctly on 2.7.x (thanks to Jean-Paul Calderone's pyopenssl). But do "you" think this is a "feature" and not a "bug"? -- And do you think debating on this, killing

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

2012-08-12 Thread Nick Coghlan
On Mon, Aug 13, 2012 at 11:28 AM, Python Urlopen wrote: > which shows you that 2.6 has a patch. Then you wonder, why wasn't it included > in 2.7 -- and you read -- AP : "No, Python 2 only receives bug fixes.". You > instantly hate the guy. Sorry AP, nothing personal, but please do not reply > t

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

2012-08-12 Thread Python Urlopen
I am a python 2.7.x user and am hoping to reach with this email some python developers who would be sympathetic to this scenario (And I understand that you might not, which is perfectly fine -- I've already requested one developer not to reply ) : How would you feel, if you issued : import

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

2012-08-12 Thread Python Urlopen
I am a python 2.7.x user and am hoping to reach with this email some python developers who would be sympathetic to this scenario (And I understand that you might not, which is perfectly fine -- I've already requested one developer not to reply ) : How would you feel, if you issued : import

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

2012-08-12 Thread Nick Coghlan
On Mon, Aug 13, 2012 at 7:05 AM, Meador Inge wrote: > This is an interesting project and I would happily volunteer to help flesh > out the details of a prototype and working on a PEP. Also, if there are possible AST improvements that would help in 3.4+, that option *is* on the table (this was an

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

2012-08-12 Thread Brett Cannon
On Sun, Aug 12, 2012 at 6:07 PM, Eric Snow wrote: > On Aug 12, 2012 12:56 PM, "PJ Eby" wrote: > > I'm not sure if this is directly related or not, but making this > > mechanism support custom compilation for new filename suffixes would > > be nice, especially for various e.g. HTML/XML templating

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

2012-08-12 Thread Eric Snow
On Aug 12, 2012 12:56 PM, "PJ Eby" wrote: > I'm not sure if this is directly related or not, but making this > mechanism support custom compilation for new filename suffixes would > be nice, especially for various e.g. HTML/XML templating systems that > compile to Python or bytecode. > > Specifica

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

2012-08-12 Thread Meador Inge
On Sat, Aug 11, 2012 at 1:30 PM, Victor Stinner wrote: > Hi, > > I started to implement an AST optimizer in Python. It's easy to create > a new AST tree, so I'm surprised that I didn't find any existing > project. > > https://bitbucket.org/haypo/misc/src/tip/python/ast_optimizer.py Very cool. >

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

2012-08-12 Thread Victor Stinner
> I started to implement an AST optimizer in Python. It's easy to create > a new AST tree, so I'm surprised that I didn't find any existing > project. I done more research. I found the AST optimizer of PyPy, which implements basic optimizations: https://bitbucket.org/pypy/pypy/src/default/pypy/int

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

2012-08-12 Thread martin
I'm not sure if this is directly related or not, but making this mechanism support custom compilation for new filename suffixes would be nice, especially for various e.g. HTML/XML templating systems that compile to Python or bytecode. Specifically, having a way to add a new source suffix (e.g. ".

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

2012-08-12 Thread PJ Eby
On Sat, Aug 11, 2012 at 8:03 PM, Brett Cannon wrote: > > It would also be very easy to expand importlib.abc.SourceLoader to add a > method which is called with source and returns the bytecode to be written > out which people could override with AST optimizations before sending the > bytecode back.

[Python-Dev] [RELEASED] Python 3.3.0 beta 2

2012-08-12 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the second beta release of Python 3.3.0 -- a little later than originally scheduled, but much better for it. This is a preview release, and its use is not recommended in production settin

Re: [Python-Dev] [Python-checkins] cpython (3.2): zip() returns an iterator, make a list() of it; thanks to Martin from docs@

2012-08-12 Thread Chris Jerdonek
On Sun, Aug 12, 2012 at 6:37 AM, Nick Coghlan wrote: > On Sun, Aug 12, 2012 at 11:00 PM, Andrew Svetlov > wrote: >> I doubt if we will convert all docs to pass doctests, at least quickly. >> Also making docs doctest-safe sometimes requires less clean and worse >> readable notation. > > About the

Re: [Python-Dev] [Python-checkins] cpython (3.2): zip() returns an iterator, make a list() of it; thanks to Martin from docs@

2012-08-12 Thread Andrew Svetlov
Sounds good. On Sun, Aug 12, 2012 at 4:37 PM, Nick Coghlan wrote: > On Sun, Aug 12, 2012 at 11:00 PM, Andrew Svetlov > wrote: >> I doubt if we will convert all docs to pass doctests, at least quickly. >> Also making docs doctest-safe sometimes requires less clean and worse >> readable notation.

Re: [Python-Dev] [Python-checkins] cpython (3.2): zip() returns an iterator, make a list() of it; thanks to Martin from docs@

2012-08-12 Thread Nick Coghlan
On Sun, Aug 12, 2012 at 11:00 PM, Andrew Svetlov wrote: > I doubt if we will convert all docs to pass doctests, at least quickly. > Also making docs doctest-safe sometimes requires less clean and worse > readable notation. About the only thing that could work in a reasonable way is a doctest mode

Re: [Python-Dev] [Python-checkins] cpython (3.2): zip() returns an iterator, make a list() of it; thanks to Martin from docs@

2012-08-12 Thread Andrew Svetlov
Just now doctest-like code blocks in Doc/* are used for two different targets: 1. regular doctests 2. notation for documentation While former can be tested the later will definitely fail (missing variables, functions, files etc.) Also docs contains mixed notation, when, say, function declared as r

Re: [Python-Dev] [Python-checkins] cpython (3.2): zip() returns an iterator, make a list() of it; thanks to Martin from docs@

2012-08-12 Thread Chris Jerdonek
On Sun, Aug 12, 2012 at 1:25 AM, sandro.tosi wrote: > http://hg.python.org/cpython/rev/233673503217 > changeset: 78512:233673503217 > user:Sandro Tosi > date:Sun Aug 12 10:24:50 2012 +0200 > summary: > zip() returns an iterator, make a list() of it; thanks to Martin from docs@

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

2012-08-12 Thread Stefan Behnel
Stefan Behnel, 12.08.2012 08:00: > Victor Stinner, 11.08.2012 20:30: >> I started to implement an AST optimizer in Python. It's easy to create >> a new AST tree, so I'm surprised that I didn't find any existing >> project. >> >> https://bitbucket.org/haypo/misc/src/tip/python/ast_optimizer.py > >