Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread P.J. Eby

At 11:27 PM 11/4/2009 +, Floris Bruynooghe wrote:

cynical mode

You have time to read this thread but no time to read What's New In
Python 3?

/cynical mode


Given that the average developer using tons of existing libraries on 
2.x is unlikely to see any killer benefits in moving to 3.x, it's a 
natural attitude to have.


I fought this same battle with setuptools for a long time before it 
sank in that people who don't perceive a need aren't going to RTFM, 
no matter how much time said RTFMing would save them in the long run, 
vs. sitting around complaining.


IOW, once someone has become annoyed by the mere appearance of a 
necessity to deal with something that appears to be being foisted on 
them (whether it's setuptools or Python 3), the natural tendency is 
to minimize any actual work that would move in the direction of the 
thing they feel forced to deal with.


For me, the closest thing to a killer feature in 3.x is argument type 
declarations, and it'd be a mild convenience at best.  From a 
distance, many of the other changes appear like anti-features, if 
only because they're changing what I've been used to for twelve-plus 
years.  (A few, like the removal of __metaclass__-in-locals support, 
are an active hindrance to porting.)


So no, I haven't actually tried to port anything, nor have I done 
more than lightly skim the porting docs...  looking for some reason 
why I'd *want* to move to Python 3.  Heck, I have yet to use 2.6 to 
run any production code, and find some of *its* changes a bit 
annoying from a porting perspective.  (E.g. dropping the sets module.)


To make Py3 migration worthwhile to developers with heavy investment 
in the 2.x lines (and especially those supporting all the way back to 
2.3 and 2.4), it'd have to have some *really* killer features.  That 
is, be more like a Python 3000, and less like a Python 2.6 with a few 
bells and whistles, hampered by having to relearn some of the basic 
types and a soon-to-be-rebuilt standard library.


Even if, in truth, the cost-benefit ratio right now *is* good for 
migrating to 3.x, nobody's doing a good job at promoting what those 
benefits are.


(And it being easy to port to is NOT a benefit: nobody cares how easy 
it is to do something they don't see a reason to do in the first place.)


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread Martin v. Löwis
 Mike Krell wrote:
 Well, 3to2 would then be an option for you: use Python 3 as the source
 language.
 
 Making life easier for 3to2 is an *excellent* rationale for backports.
 

I'm skeptical. If new features get added to 2.7: why would that simplify
3to2? It couldn't *use* these features, since it surely would have to
support 2.6 and earlier as well.

Not sure what 3to2 would do about difficult-to-convert 3.x feature (as,
perhaps, the nonlocal keyword). If it currently gives up, it then may
offer you to restrict your target versions to 2.7+. Not sure whether
users would use that option, though - perhaps they rather stop using
nonlocal in 3.x if 3to2 cannot support it for all 2.x versions they are
interested in.

Perhaps 3to2 has a work-around that still provides a good backport in
most cases. Then, the backport would not make the tool any simpler: if
3to2 would start using the backport, it would actually get more
complicated (not easier), as it now needs to support two cases.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread Lennart Regebro
2009/11/4 Martin v. Löwis mar...@v.loewis.de:
 Keep in mind also that the 2.x translation process is extremely slow and
 results in a clunky development process.  There's no '2to3
 --interactive' commandline that lets me type python 2 at a  prompt
 and get python 3 results out so that I can try experiments on the 3.x
 interpreter; I have to actually put my experiments into my unit tests
 and wait 10 minutes to see if it works.  It's like writing C++.

 That's not my experience. I see a change in source (say, on Django)
 available for 3.x within 5 seconds.

True, but you need to set up a process that will convert only the
changed files, and before Distribute came with 3.0 support, that was
tedious. Now it's easy, if you want to use distribute. (Except that
there is some bug I promised to look at this week, but haven't)

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread Michael Foord

Martin v. Löwis wrote:

Mike Krell wrote:


Well, 3to2 would then be an option for you: use Python 3 as the source
language.
  

Making life easier for 3to2 is an *excellent* rationale for backports.




I'm skeptical. If new features get added to 2.7: why would that simplify
3to2? It couldn't *use* these features, since it surely would have to
support 2.6 and earlier as well.

Not sure what 3to2 would do about difficult-to-convert 3.x feature (as,
perhaps, the nonlocal keyword). If it currently gives up, it then may
offer you to restrict your target versions to 2.7+. Not sure whether
users would use that option, though - perhaps they rather stop using
nonlocal in 3.x if 3to2 cannot support it for all 2.x versions they are
interested in.
  


I would have thought you could translate nonlocal with the following:

Python 3:

def scope():
   name = value
   do_something_with(name)
   def inner():
   nonlocal name
   name = new_value
   do_something_else(name)

Python 2

def scope():
   name = [value]
   do_something_with(name[0])
   def inner():
   name[0] = new_value
   do_something_else(name[0])

I would love to see nonlocal backported to 2.7 as it cleans up a simple 
pattern that I use relatively often for testing.



Suppose you have an class and you want to test that method a calls 
method b, in Python 2 you might write something like this:


def test_method_a_calls_method_b():
  instance = SomeClass()
  was_called = []
  def method_b():
 was_called.append(True)

  instance.method_b = method_b
  instance.method_a()

  assert was_called == [True]

in Python 3 you can replace this with the slightly nicer:


def test_method_a_calls_method_b():
  instance = SomeClass()
  was_called = False
  def method_b():
 nonlocal was_called
 was_called = True

  instance.method_b = method_b
  instance.method_a()

  assert was_called

As to the argument that releasing 2.7 is pointless as few people would 
use it for several years, the success of Python 2.6 shows that although 
*many* people don't / can't use new versions of Python for several years 
many other people are able to and do use new versions of Python.


All the best,

Michael Foord


Perhaps 3to2 has a work-around that still provides a good backport in
most cases. Then, the backport would not make the tool any simpler: if
3to2 would start using the backport, it would actually get more
complicated (not easier), as it now needs to support two cases.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
  



--
http://www.ironpythoninaction.com/

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread Eric Smith

Martin v. Löwis wrote:

Mike Krell wrote:

Well, 3to2 would then be an option for you: use Python 3 as the source
language.

Making life easier for 3to2 is an *excellent* rationale for backports.



I'm skeptical. If new features get added to 2.7: why would that simplify
3to2? It couldn't *use* these features, since it surely would have to
support 2.6 and earlier as well.

Not sure what 3to2 would do about difficult-to-convert 3.x feature (as,
perhaps, the nonlocal keyword). If it currently gives up, it then may
offer you to restrict your target versions to 2.7+. Not sure whether
users would use that option, though - perhaps they rather stop using
nonlocal in 3.x if 3to2 cannot support it for all 2.x versions they are
interested in.


But surely someday 2.7 will be the oldest targetted 2.x version of 
Python for 3to2 and other tools (regardless of whether there's a 2.8). 
When that day comes, 3to2 can be made simpler, or can increase the 
amount of Python 3.x it can convert (or both) if we add 3.x features to 2.7.


Of course, planning for a time so far in the future is difficult, and 
possibly pointless.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread Lennart Regebro
2009/11/4 sstein...@gmail.com sstein...@gmail.com:
 Maybe the 3.x line should just be put out of our misery, merged back to 2.7,
 2.8, 2.9, and proceed as Glyph suggested in passing with increasing levels
 of deprecation until it just turns into 3.x on its own by running out of
 numbers.

Yeah, maybe. If people haven't moved over to Python 3 in 2015 I think
we should start considering it. Let's discuss this again then.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread Brett Cannon
On Thu, Nov 5, 2009 at 09:34, Yuvgoog Greenle ubershme...@gmail.com wrote:
 On Thu, Nov 5, 2009 at 2:31 PM, Nick Coghlan ncogh...@gmail.com wrote:

 While it may be hard to tell without knowing who is and isn't a core
 developer

 Maybe there should be badges or something, hmmm, sounds like making an
 svn-commits-hall-of-fame for python could be a nice project.


You might be interested in http://www.ohloh.net/p/python/contributors .

-Brett


 --yuv

 ___
 Python-Dev mailing list
 Python-Dev@python.org
 http://mail.python.org/mailman/listinfo/python-dev
 Unsubscribe:
 http://mail.python.org/mailman/options/python-dev/brett%40python.org


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread Antoine Pitrou
Michael Foord fuzzyman at voidspace.org.uk writes:
 
 I would love to see nonlocal backported to 2.7 as it cleans up a simple 
 pattern that I use relatively often for testing.

Well you know I'm sure that if someone proposes a proper patch it will
eventually get accepted ;)

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-05 Thread Mike Krell
On Thu, Nov 5, 2009 at 1:08 PM, Martin v. Löwis mar...@v.loewis.dewrote:

  Mike Krell wrote:
  Well, 3to2 would then be an option for you: use Python 3 as the
 source
  language.
 
  Making life easier for 3to2 is an *excellent* rationale for backports.


Clarifying a bit of potentially misleading editing:  I wrote neither of the
statements quoted above.  M v L wrote the first and Nick C. wrote the
second.


 I'm skeptical. If new features get added to 2.7: why would that simplify
 3to2? It couldn't *use* these features, since it surely would have to
 support 2.6 and earlier as well.

 Not sure what 3to2 would do about difficult-to-convert 3.x feature (as,
 perhaps, the nonlocal keyword). If it currently gives up, it then may
 offer you to restrict your target versions to 2.7+. Not sure whether
 users would use that option, though - perhaps they rather stop using
 nonlocal in 3.x if 3to2 cannot support it for all 2.x versions they are
 interested in.


 Perhaps 3to2 has a work-around that still provides a good backport in
 most cases. Then, the backport would not make the tool any simpler: if
 3to2 would start using the backport, it would actually get more
 complicated (not easier), as it now needs to support two cases.


I basically agree with you here, except perhaps for the likely definition of
versions they are interested in.  You have suggested on several occasions
that a 2.7 (or 2.8) containing new syntax such as nonlocal would be of
limited value because the vast majority of developers interested in
supporting 2.x would have to support 2.6 as well.  I respectfully suggest
that may not necessarily be the case.  I suspect that there are lots of
small fish out there like me who have the luxury of being able to hop onto
whatever version of the language suits them the best.  Not to mention all of
the new users who will be drawn to Python over the next several years while
the 3.x standard library and third party library situation becomes more
stable and comprehensive.  Why not make the 2.x feature set the best it can
be given the likelihood that 2.x will be the most compelling alternative to
many users until the 3.x libraries mature?

Of course, it's easy for me to ask other people to the hard work.  It might
be fun to take a crack at implementing nonlocal myself, but I know next to
nothing about the implementation of CPython.  By the time I pestered y'all
with enough questions to get up to speed, you'd probably wish you'd just
implemented it yourself -- less work :-)

   Mike
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Paul Moore
2009/11/4 Glyph Lefkowitz gl...@twistedmatrix.com:
 On Nov 3, 2009, at 5:16 PM, Paul Moore wrote:

 2009/11/3 Brett Cannon br...@python.org:

 I'm afraid there is some FUD going around here, which is
 understandable since no one wants to burn a ton of time on something
 that will be difficult or take a lot of time. But I have not heard
 anyone in this email thread (or anywhere for that matter) say that
 they tried a port in earnest and it turned out to be difficult.

 FWIW, I did a quick survey of some packages (a sampling of packages
 I've used or considered using in the past):

 Twisted - no plans yet for Python 3


 Speaking of FUD, we've had a plan for Python 3 support for some time:
[...]

Thanks, and my sincere apologies for spreading FUD - I did try to find
details, and in fact I did spot a couple of the specific python 3
compatibility tickets you mentioned, but missed the link back to the
master plan.

Having said that,

  http://stackoverflow.com/questions/172306/how-are-you-planning-on-handling-the-migration-to-python-3/214601#214601

seems pretty negative in terms of when Twisted will support Python 3.
Based on my reading, the focus is more on when 2.x support will be
dropped than on when there will be a version of Twisted which works
with Python 3 (which I'd expect to be much sooner!)

 If you're interested in helping, our core team has all not had much time for
 Twisted lately and we need volunteers who are interested in doing code
 reviews and becoming a committer to help shepherd these tickets through the
 process.

Personally, I don't *use* twisted. I occasionally play with it, and I
sometimes end up using applications which rely on it, but I don't use
it myself. So I couldn't be much direct help. (And yes, I know that
means I'm not one of your users, so me asking for Python 3 support
isn't an issue. No problem there).

Paul.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Nick Coghlan
Terry Reedy wrote:
 Guido van Rossum wrote:
 On Tue, Nov 3, 2009 at 9:37 AM, Martin v. Löwis mar...@v.loewis.de
 wrote:
 (and no, adding things like nonlocal to 2.7 doesn't making porting of
 a real application or library any easier, since the existing application
 or library simply doesn't use that keyword.

 Agreed.

 In fact, no change to 2.x
 can reasonably simplify porting - only changes to 3.x might - except
 for changes to 2to3, which can simplify porting a lot. But 2to3 should
 be run under 3.x, IMO.)

 Disagreed. Better -3 warnings could make porting easier. (Not just
 more warnings -- better might mean fewer false positives for
 warnings already issued.)
 
 There is also Eric Smith's list to consider: PEP3118 new buffer
 protocol, short float repr, and maybe io.

The pure Python io module was already backported for the 2.6 release
[1], as was the C API aspect of PEP 3118 [2].

Short float repr has since been backported for 2.7, as has the C
accelerated io module implementation and the Python API (memoryview)
aspect of PEP 3118.

I believe those 3 features alone are more than enough justification to
proceed with at least a 2.7 release (that is probably the point Eric was
making in posting that list of features in the first place).

As to how those backports can help with forward ports to Py3k, someone
made the point elsewhere in the thread that testing/experimenting via
2to3 is a very C++ like development cycle - there is a long build time
before you get to see the results of running a test. With features
backported to 2.x, you can instead use more traditional version checks
(or the interactive prompt) and get the usual quick feedback cycle via
the 2.7 version, before submitting your code to the tender mercies of
the 2to3 converter (or possibly avoid 2to3 altogether if the version
checks turn out to suffice for a given use case).

Cheers,
Nick.

[1] http://docs.python.org/whatsnew/2.6.html#pep-3116-new-i-o-library
[2]
http://docs.python.org/whatsnew/2.6.html#pep-3118-revised-buffer-protocol

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Mark Summerfield
Hi,

I wanted to make some brief comments on this thread:

- 2to3 encourages people to see Python 3 as exotic and other---and not
  to actually write in it.

- 3to2 encourages people to use Python 3 and also provides a route to
  Python 2 compatibility.

I hope that a point will be reached where people are encouraged to do a
one off 2to3, hand fix, and once it passes their tests to keep a single
Python 3 source and use 3to2 to support their users of older Pythons.

- Unicode strings is the solution, not the problem, and is one of Python
  3's most important advances.

- Have any big ports been done? Yes, PyQt4.
  PyQt4 supports both Python 2 and Python 3---and the port was done by
  one person in his spare time over a period of months. PyQt4 wraps at
  least 700,000 lines of C++ code---and it isn't just GUI stuff, it has
  networking, threading, etc., and works on Linux, Mac, Windows, etc.

- I do hope NumPy gets ported, since both on and off the lists it seems
  like a show-stopper for many people.

- I hope the ditch 3 calls are ignored. Python 3 is significantly
  better than (an already excellent) Python 2: eventually people will
  port---or those who start out with Python 3 will build their own
  libraries for what's missing, just as people did when Python 2 came
  out.

- I think the developers have done a fantastic job with Python 3.
  I just wish more people realised how good it is!

Regarding the Moratorium:

+inf

since I'd really love to see more time devoted to improving the standard
library.

My 2c:-)

-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++, Python, Qt, PyQt - training and consultancy
Advanced Qt Programming - ISBN 0321635906
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Guido van Rossum
On Tue, Nov 3, 2009 at 9:51 PM, Glyph Lefkowitz
gl...@twistedmatrix.com wrote (amongst way too many words):
 [...] For example, 2.8 could emit a deprecation
 warning for every old-style class that was defined, 2.9 could emit a
 deprecation warning for every string constant declared without a 'b' or 'u'
 prefix unless the module in question were in 3.x mode (i.e. no-prefix ==
 'u').

This proposal is hopelessly naive. It has been considered seriously
from all possible sides before, and there just isn't a way to make
this work. Not even with several releases as stepping points.

-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread P.J. Eby

At 12:51 AM 11/4/2009 -0500, Glyph Lefkowitz wrote:

With the 2.x series, users and operating systems seem to move on
fairly rapidly, because dependencies generally continue to work if you
upgrade just one version.  This isn't quite as formal a requirement as
I would like (warnings get generated, unit tests fail, things do
break) but in practice, users can rely on it for most functionality.
If 3.x could be broken into a series of transitions like that, where
you can upgrade one version, fix some stuff, then upgrade another
version, even if you couldn't actually support more than 2 versions at
once, I think that we could pick up the migration pace to the point
where we might actually be using 3.x syntax in a few years.  Having a
2.x series which goes to 2.9 and then stops isn't *quite* the same
thing as having one that moves over continuously to some 3.x version,
but it does seem to me that by that point the chasm between versions
will have narrowed to a crack, and the migration will be a little hop
over it rather than the currently-required great flying leap.


+1 (I actually thought this was the original plan.)

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread sstein...@gmail.com


On Nov 4, 2009, at 1:06 AM, Lennart Regebro wrote:


2009/11/3 sstein...@gmail.com sstein...@gmail.com:


On Nov 2, 2009, at 7:26 PM, James Y Knight wrote:


It really sounds like you're saying that switching to 3.x isn't  
worth the
cost to you, but you want to force people (including yourself) to  
do so

anyways, because ...?


Because that's the future of Python


Or not. Maybe it's a dead branch of Python?


Maybe the 3.x line should just be put out of our misery, merged back  
to 2.7, 2.8, 2.9, and proceed as Glyph suggested in passing with  
increasing levels of deprecation until it just turns into 3.x on its  
own by running out of numbers.


S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Carl Trachte
On 11/4/09, sstein...@gmail.com sstein...@gmail.com wrote:

 Maybe the 3.x line should just be put out of our misery, merged back
 to 2.7, 2.8, 2.9, and proceed as Glyph suggested in passing with
 increasing levels of deprecation until it just turns into 3.x on its
 own by running out of numbers.

delurk
As a user, I'm horrified.  Granted, I'm not the most high powered
user, but . . .
my employer is already providing me with a 3.0 Python version on one
of my work computers with the expectation that I'll be using it more
and more.

Sorry to butt in, but is this a joke?  I thought all this was hashed
out prior to inventing python 3.0.
/delurk
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Arc Riley
That's not going to happen.  Stop trolling the python-dev list.

On Wed, Nov 4, 2009 at 1:20 PM, sstein...@gmail.com sstein...@gmail.comwrote:

 Maybe the 3.x line should just be put out of our misery, merged back to
 2.7, 2.8, 2.9, and proceed as Glyph suggested in passing with increasing
 levels of deprecation until it just turns into 3.x on its own by running out
 of numbers.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Guido van Rossum
On Wed, Nov 4, 2009 at 10:39 AM, Carl Trachte ctrac...@gmail.com wrote:
 On 11/4/09, sstein...@gmail.com sstein...@gmail.com wrote:

 Maybe the 3.x line should just be put out of our misery, merged back
 to 2.7, 2.8, 2.9, and proceed as Glyph suggested in passing with
 increasing levels of deprecation until it just turns into 3.x on its
 own by running out of numbers.

 delurk
 As a user, I'm horrified.  Granted, I'm not the most high powered
 user, but . . .
 my employer is already providing me with a 3.0 Python version on one
 of my work computers with the expectation that I'll be using it more
 and more.

 Sorry to butt in, but is this a joke?  I thought all this was hashed
 out prior to inventing python 3.0.
 /delurk

I have no idea who ssteinerX is. He certainly doesn't speak for the
core developers.

-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Martin v. Löwis
Antoine Pitrou wrote:
 Paul Moore p.f.moore at gmail.com writes:
 FWIW, I did a quick survey of some packages (a sampling of packages
 I've used or considered using in the past):

 Twisted - no plans yet for Python 3
 
 Well Twisted depends on zope.interface which is not ported yet.

That's not strictly true, see

http://svn.zope.org/zope.interface/branches/regebro-python3/

While this isn't released yet, Lennart and myself have been working
to make it work on 2.x and 3.x. So porting activities *could* start
now (requiring 3.x user to use that branch).

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Martin v. Löwis
 For one thing, we have a very long row to hoe here.  The migration to
 3.0 is a long, tedious process with little tangible benefit.  I hope
 that sometime in the next decade Twisted can accelerate the process of
 dropping old 2.x versions, but I seriously doubt we could do a
 feature-complete 3.1/2.6 version.  I get the general impression that a
 3.2/2.7 port would be more feasible; hopefully a 3.3/2.8 would be even
 moreso.

Please understand that you will not need to drop 2.x versions in order
to support 3.x. Just add 3.x support now and make sure it won't break
2.x support.

 Also, the benefits of migrating to python 3.x are still negligible, as
 far as I can tell.

For Twisted, most definitely - you will need to support 2.x and 3.x
simultaneously, so you can't really benefit from 3.x-only changes
for a long time to come - perhaps until a 3to2 tool has a good quality,
and probably not even then (since it will restrict you what you can
do in 3.x code).

 On the other hand, you've got NumPy, PyGTK, Unladen Swallow,
 PyPy, Jython, IronPython, and so on and so forth.  Since I started using
 it, the strength of Python has been in its ecosystem, and the 3.x
 ecosystem is not yet viable.

Right - the advantages wouldn't be for Twisted itself, but for users
of Twisted, which would see a larger ecosystem if Twisted was available.

 The main reason I want a long 2.x series is that I believe it would more
 easily allow us infrastructure folks to drop support for *older*
 versions.  With this big 2.x-3.x chasm, I can't really see an end in
 sight for Twisted using Python 2.x as its _source_ language, translating
 with 2to3.

Well, 3to2 would then be an option for you: use Python 3 as the source
language.

 Some projects which depend on Twisted and want new versions
 (and security fixes, etc) are going to want Python 2.x for a really long
 time.  Maybe they're just really conservative, maybe they don't have a
 lot of maintenance energy, or maybe they have other dependencies which
 haven't got a port; it doesn't really matter, empirically speaking
 people want older versions of Python.

But wouldn't these applications also break as Twisted drops support
for old 2.x versions, and the applications fail to work on the newer
2.x version (say, 2.34)?

 Keep in mind also that the 2.x translation process is extremely slow and
 results in a clunky development process.  There's no '2to3
 --interactive' commandline that lets me type python 2 at a  prompt
 and get python 3 results out so that I can try experiments on the 3.x
 interpreter; I have to actually put my experiments into my unit tests
 and wait 10 minutes to see if it works.  It's like writing C++.

That's not my experience. I see a change in source (say, on Django)
available for 3.x within 5 seconds.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread sstein...@gmail.com


On Nov 4, 2009, at 1:39 PM, Carl Trachte wrote:


On 11/4/09, sstein...@gmail.com sstein...@gmail.com wrote:


Maybe the 3.x line should just be put out of our misery, merged back
to 2.7, 2.8, 2.9, and proceed as Glyph suggested in passing with
increasing levels of deprecation until it just turns into 3.x on its
own by running out of numbers.


delurk
As a user, I'm horrified.  Granted, I'm not the most high powered
user, but . . .
my employer is already providing me with a 3.0 Python version on one
of my work computers with the expectation that I'll be using it more
and more.

Sorry to butt in, but is this a joke?  I thought all this was hashed
out prior to inventing python 3.0.


Yes, of course it was a joke.

2.7 won't turn into Python 3.x any more that Perl will turn into Ruby.

Oh, wait, maybe that was a bad example.

The point was, that Python 3.x does not seem to be something that can  
be evolved into and, all along, I have been suggesting that, if  
Python 3.x is the future, let's let 2.7 be the last of the 2.x series,  
backport whatever will make it easiest to make 2to3 do as much of the  
work as possible, and just decide that 2.7 is the end of the line.


I shudder to think how much time has been spent hacking things around  
to make them compatible with the 2.x series while trying to move to 3.x.


If 2.x is over, let it be over and let's all focus on moving into  
Python 3.x with no more time doing other than bug-fixes on 2.x  
versions of things.


S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread David Cournapeau
On Thu, Nov 5, 2009 at 4:02 AM, Martin v. Löwis mar...@v.loewis.de wrote:


 That's not my experience. I see a change in source (say, on Django)
 available for 3.x within 5 seconds.

This is for which version of 2to3 ? I got similar experience (several
minutes), but maybe I am using 2to3 the wrong way. On my machine, with
2to3 from 3.1.1, it takes ~ 1s to convert one single file of 200
lines, and converting a tiny subset of numpy takes  one minute.

David
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Mike Krell
On Wed, Nov 4, 2009 at 12:02 PM, Martin v. Löwis mar...@v.loewis.dewrote:


  The main reason I want a long 2.x series is that I believe it would more
  easily allow us infrastructure folks to drop support for *older*
  versions.  With this big 2.x-3.x chasm, I can't really see an end in
  sight for Twisted using Python 2.x as its _source_ language, translating
  with 2to3.

 Well, 3to2 would then be an option for you: use Python 3 as the source
 language.


A migration path which would be made all the more compelling with the
addition of the nonlocal keyword to 2.7 ;-)

Mike
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Martin v. Löwis
 That's not my experience. I see a change in source (say, on Django)
 available for 3.x within 5 seconds.
 
 This is for which version of 2to3 ? I got similar experience (several
 minutes), but maybe I am using 2to3 the wrong way. On my machine, with
 2to3 from 3.1.1, it takes ~ 1s to convert one single file of 200
 lines, and converting a tiny subset of numpy takes  one minute.

The version released with 3.1. The trick is not to recompile all 2to3
code every time you make a source change. Instead, cache the 2to3 output
in the build area, and have setup.py only invoke 2to3 for the files
that got modified.

So whenever I make a change, I do python3 setup.py install. This
checks all timestamps, finds the modified files (which will only be
one), runs 2to3 on it, and then copies it into my 3.1 installation,
where I can test the change. Recompiling a single file typically takes a
few seconds, or less. It would be possible to also run out of the build
area; you still would need to run setup.py build after every change.

There is already support for this in both distutils (as released in
3.1), and distribute.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Brett Cannon
On Wed, Nov 4, 2009 at 10:20, sstein...@gmail.com sstein...@gmail.com wrote:

 On Nov 4, 2009, at 1:06 AM, Lennart Regebro wrote:

 2009/11/3 sstein...@gmail.com sstein...@gmail.com:

 On Nov 2, 2009, at 7:26 PM, James Y Knight wrote:

 It really sounds like you're saying that switching to 3.x isn't worth
 the
 cost to you, but you want to force people (including yourself) to do so
 anyways, because ...?

 Because that's the future of Python

 Or not. Maybe it's a dead branch of Python?

 Maybe the 3.x line should just be put out of our misery, merged back to 2.7,
 2.8, 2.9, and proceed as Glyph suggested in passing with increasing levels
 of deprecation until it just turns into 3.x on its own by running out of
 numbers.


I am going to say this once: we are not killing off Python 3.

First off, Python 3 is not even a year old! Considering people have
not fully migrated to 2.6, should we kill it off as well? There is a
certain lack of perspective on time scale. This is especially true
when Guido himself has said on multiple occasions that moving the
community to 3.x would be a mult-year process, as in 3-5 years
process, not 11 months.

Second, the people calling for us to potentially kill 3.x and just
keep 2.x floating along have yet to say that they have tried porting
their code and that it was difficult. Every person who has stepped
forward stating they have done a port has said it was actually
relatively straight-forward. Not only that, we have anecdotal evidence
from multiple people that you can support code way back to whatever
old version of Python RHEL is running.

Third, the same people calling for the death of 3.x have not suggested
they have used it extensively (if at all). I have yet to hear anyone
say that 3.x is not at least a nice improvement, if not a huge one. I
for one find 3.x more enjoyable to work in than 2.x, and that's saying
a lot since I obviously loved Python 2.x enough to get involved in its
development. I have also never heard anyone ever say, I gave 3.x a
fair shake and honestly, I wish I had not wasted the time. Wait until
3to2 gets to a good state (which will happen; it's my next project --
after I either get us moved to Hg or I simply give up on it -- and I
know I am not the only core developer planning on making it happen).

I realize that there is some fear that it will be time wasted if
people port their code to 3.x if it somehow burns out. But do you
honestly think that python-dev would leave you hanging like that?
Let's take a worst-case scenario here and say that direct pick-up of
3.x after a couple years never happens. Fine, we then begin to
backport features. But if you already ported your code then chances
are you already support the new features. And you know what one of the
first things we would back port would be? Unicode strings and bytes.
And since that is the hardest thing to port to, you will have not
wasted any time.

In other words the calling for the death of 3.x is rather premature
and honestly unfair until people have actually tried to port their
code in earnest and it has been a couple of years for the community to
catch up to what python-dev is pushing out the door (which always
takes a while no matter what minor version has been released).

-Brett
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Zooko O'Whielacronx
Folks:

It occurred to me to wonder why I haven't investigated how hard it
would be to make my Python packages Python-3-compatible.  That's right
-- I haven't even looked closely.  I couldn't even tell you off the
top of my head what is in Python 3 that I would have to think about
except for the new unicode regime.  I think the answer is that the
payoff is just *so* low to me at this point that it doesn't even
justify me taking 15 minutes to read What's New In Python 3 or to
execute 2to3 on my smallest package and see what it does.

On the other hand, I'm totally committed to supporting Python 2.7,
because my customers will demand it and because I expect that it will
be easy.

So, if you guys slip in your favorite new Python 3 feature into 2.7
and add a deprecation warning for your least favorite Python 2
misfeature, then probably within about 24 months I'll have fixed all
code that uses the deprecated feature, and probably within about five
years I'll consider dropping backwards-compatibility with Python 2.6
and starting to use that new feature that you added to Python 2.7.

(I'm currently considering dropping Python 2.4 compatibility for the
next releases of most of my code.)

Regards,

Zooko
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Paul Moore
2009/11/4 Zooko O'Whielacronx zoo...@gmail.com:
 On the other hand, I'm totally committed to supporting Python 2.7,
 because my customers will demand it and because I expect that it will
 be easy.

Why do you think your customers will demand 2.7 support but not 3.1
support? If I were one of your customers, I'd want 3.1 support...

Paul.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Floris Bruynooghe
On Wed, Nov 04, 2009 at 03:54:44PM -0700, Zooko O'Whielacronx wrote:
 It occurred to me to wonder why I haven't investigated how hard it
 would be to make my Python packages Python-3-compatible.  That's right
 -- I haven't even looked closely.  I couldn't even tell you off the
 top of my head what is in Python 3 that I would have to think about
 except for the new unicode regime.  I think the answer is that the
 payoff is just *so* low to me at this point that it doesn't even
 justify me taking 15 minutes to read What's New In Python 3 or to
 execute 2to3 on my smallest package and see what it does.

cynical mode

You have time to read this thread but no time to read What's New In
Python 3?

/cynical mode

Personally I found porting to Python 3 a rather pleasant experience
(include C extension module).  I can't wait until I can drop support
for Python 2.2-2.X.

Regards
Floris

PS: I have to admit that the commerial code base I work on is still at
Python 2.5, but that doesn't make me worry in any way.  It'll get to
Python 3 in time (it's running on 2.6 already in development).

-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Terry Reedy

Glyph Lefkowitz wrote:

For what it's worth, the official position of the Twisted project is not 
that we have no plan to move to Python 3.  It's that our plan is to do 
exactly as Raymond suggests, and give the users a vote - in this case, 
you vote with your patches :).


You probably will not hear from potential users who skip Twisted because 
it is not available for 3.x. I suspect you do not hear much either from 
new users who only installed 2.x to use Twisted, but would prefer 3.x. 
There are regular questions on python-list about 'web programming with 
3.0' or some such.


For one thing, we have a very long row to hoe here.  The migration to 
3.0 is a long, tedious process with little tangible benefit.


One group that benefits is new Python programmers. Python 3 is easier to 
learn, and is being used to teach Python in at least some schools and 
universities, and will be used more as more libraries are available. 
Hardly a week goes by on Python list without someone posting a problem 
using 2.x that has been solved in 3.x.


Another group is existing programmers who were/are sufficiently annoyed 
by some of the things that got cleaned up.


A third group is people who want to use non-ascii in identifiers, and 
who are delighted now that they can.


Since you do not fall in these groups, I understand your impatience and 
reluctance with the change. I can also imagine that Twisted may be more 
affected by some of the changes than most other projects.


[snip more] ...

There have been some other comments in this thread indicating that this 
was not the case because some users indicated that they'd rather deal 
with lots of changes all at once.


I wrote that based on both my reading of clp/pylist posts during the 
discussion of the int/int semantic change and Guido's report of private 
conversations he had had.


 My understanding is that it was
done this way so that the *developers* of Python could make a clean 
break, and design and implement a new version of Python without being 
constrained by compatibility concerns.


I do not believe that was ever intended. It certainly is not what 
happened; many changes were not made *because* of compatibility concerns 
and all went through the filter of 'is the benefit of this change worth 
the pain of breakage'. There is a big difference between not being 
straightjacketed and being unconstrained.


 If you can show me an actual
application or library developer in Python who wanted this one-big-jump 
migration, I will show you a crazy person.


Be careful of labels.

Once the prolonged and intense int/int debate shifted from the ontology 
of ints to the pragmatics of the proposed change, most people agreed 
that int/int 'should' have meant float(int)/float(int) from the 
beginning. But some were still strongly opposed to making the change 
because they (understandably) did not want to have to scan (by eye) 
possibly 1s or even 10s of lines for every a/b to determine 
whether any fix was needed. Some said that that would be such a major 
change that it should not be done until there was a new major release, a 
Python 3 off in the then distant future.  Well, that future is now.


I half-jokingly suggested that the change be made on Guido's original
timetable, but that the '2.5' that completed the change simply be 
relabeled '3.0'. I personally would have preferred that it had been 
completed in 2.5. But that did not happen and more changes were made 
once they were made, and here we are.


Terry Jan Reedy

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-04 Thread Terry Reedy

Zooko O'Whielacronx wrote:

Folks:



So, if you guys slip in your favorite new Python 3 feature into 2.7
and add a deprecation warning for your least favorite Python 2
misfeature, 


Just run with the -3 flag for warnings.

Also see my response to Glyph.

Terry Jan Reedy

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Michael Foord

Sturla Molden wrote:
I'd just like to mention that the scientific community is highly 
dependent on NumPy. As long as NumPy is not ported to Py3k, migration 
is out of the question. Porting NumPy is not a trivial issue. It might 
take a complete rewrite of the whole C base using Cython. NumPy's ABI 
is not even PEP 3118 compliant. Changing the ABI for Py3k might break 
extension code written for NumPy using C. And scientists tend to write 
CPU-bound routines in languages like C and Fortran, not Python, so 
that is a major issue as well. If we port NumPy to Py3k, everyone 
using NumPy will have to port their C code to the new ABI. There are 
lot of people stuck with Python 2.x for this reason. It does not just 
affect individual scientists, but also large projects like IBM and 
CERN's blue brain and NASA's space telecope. So please, do not cancel 
2.x support before we have ported NumPy, Matplotlib and most of their 
dependant extensions to Py3k.


What will it take to *start* the port? (Or is it already underway?) For 
many projects I fear that it is only the impending obsolescence (real 
rather than theoretical) of Python 2 that will convince projects to port.


Python 2.X is not about to 'stop working', but there will come a point 
where it will 'stop being worked on'.


All the best,

Michael
The community of scientists and engineers using Python is growing, but 
shutting down 2.x support might bring an end to that.


Sturla Molden


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk 




--
http://www.ironpythoninaction.com/

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread David Cournapeau
On Tue, Nov 3, 2009 at 6:13 PM, Michael Foord fuzzy...@voidspace.org.uk wrote:
 Sturla Molden wrote:

 I'd just like to mention that the scientific community is highly dependent
 on NumPy. As long as NumPy is not ported to Py3k, migration is out of the
 question. Porting NumPy is not a trivial issue. It might take a complete
 rewrite of the whole C base using Cython. NumPy's ABI is not even PEP 3118
 compliant. Changing the ABI for Py3k might break extension code written for
 NumPy using C. And scientists tend to write CPU-bound routines in languages
 like C and Fortran, not Python, so that is a major issue as well. If we port
 NumPy to Py3k, everyone using NumPy will have to port their C code to the
 new ABI. There are lot of people stuck with Python 2.x for this reason. It
 does not just affect individual scientists, but also large projects like IBM
 and CERN's blue brain and NASA's space telecope. So please, do not cancel
 2.x support before we have ported NumPy, Matplotlib and most of their
 dependant extensions to Py3k.

 What will it take to *start* the port? (Or is it already underway?) For many
 projects I fear that it is only the impending obsolescence (real rather than
 theoretical) of Python 2 that will convince projects to port.

I feel the same way. Given how much resources it will take to port to
py3k, I doubt the port will happen soon. I don't know what other numpy
developers think, but I consider py3k to simply not worth the hassle -
I know we will have to port eventually, though.

To answer your question, the main issues are:
 - are two branches are necessary or not ? If two branches are
necessary, I think we simply do not have the resources at the moment.
 - how to maintain a compatible C API across 2.x and 3.x
 - is it practically possible to support and maintain numpy from 2.4
to 3.x ? For example, I don't think the python 2.6 py3k warnings are
very useful when you need to maintain compatibility with 2.4 and 2.5.

There is also little documentation on how to port a significant C
codebase to py3k.

David
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Raymond Hettinger


[Michael Foord]
What will it take to *start* the port? (Or is it already underway?) For many projects I fear that it is only the impending 
obsolescence (real rather than theoretical) of Python 2 that will convince projects to port.


FWIW, I do not buy into the several premises that have arisen in this thread:

* For 3.x to succeed, something bad has to happen to 2.x.  (which in my book translates to intentionally harming 2.x users, either 
through neglect or force, in order to bait them into switching to 3.x).


* Core developers will are losing time supporting 2.x. (backports take some 
time but it
is small in comparison to getting a patch to work in the first place -- if anyone can comment on this assertion,  it is the people 
who have been doing it already (such as AP, MD, BP, GB, and myself)).


* That 3.x has proven its readiness to supplant 2.x.  (It hasn't been exercised that heavily and there are a lot of things that may 
or may not prove to be successful in the end -- bytes/text issues, tuple comparison challenges, new io, mapping views with set 
operations, etc).


In all these matters, I think the users should get a vote.  And that vote should be cast with their decision to stay with 2.x, or 
switch to 3.x, or try to support both.  We should not muck with their rational decision making by putting carrots in one pile and 
abandoning the other.



Raymond


P.S.  I found it curious that one of the strongest proponents of killing 2.x also mentioned that he has never written a line of 3.x 
code.   Since this discussion is a matter of great consequence, I would hope that advocates will only take informed positions --  
this isn't really time for shooting from the hip and killing 2.x.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Paul Moore
2009/11/3 Raymond Hettinger pyt...@rcn.com:
 In all these matters, I think the users should get a vote.  And that vote
 should be cast with their decision to stay with 2.x, or switch to 3.x, or
 try to support both.  We should not muck with their rational decision making
 by putting carrots in one pile and abandoning the other.

Agreed (up to a point).

The biggest issue to my mind is that adoption by the ultimate end
users is significantly hampered by the fact that big projects like
Twisted, numpy and the like, have no current plans to move to Python
3. Even end users with a reasonable level of coding expertise don't
have the time or resources to offer much in the way of help with a
port, when the project as a whole isn't interested in starting the
process.

At the moment, it seems to me that this is the biggest blocker to
Python 3 adoption. And it's a chicken and egg situation - I don't use
Python 3, so I don't test the new features, so the projects I need see
little take-up, so I can't use them in Python 3, so I don't use Python
3...

And while I know I can run Python 2.x and Python 3.x side by side, at
the end of the day, I want to just be able to type python to get my
interpreter.

I don't know how to solve this (assuming that just wait isn't going
to do it). Maybe the core devs will have to offer resource to some of
the key projects to get things moving (but as this is a volunteer
effort, that isn't something that just happens either...)

Paul.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Antoine Pitrou
Sturla Molden sturla at molden.no writes:
 
 Porting NumPy is not a trivial issue. It might take 
 a complete rewrite of the whole C base using Cython.

I don't see why they would need a rewrite. Little of the C API has changed
between 2.x and 3.x. Cython itself is supposed to support both 2.x and 3.x,
isn't it?

 NumPy's ABI is not even PEP 3118 compliant.

That's interesting, because PEP 3118 was pushed mainly by a prominent member of
the NumPy community and some of its features are almost dedicated to NumPy.

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Antoine Pitrou
David Cournapeau cournape at gmail.com writes:
 
 To answer your question, the main issues are:
  - are two branches are necessary or not ? If two branches are
 necessary, I think we simply do not have the resources at the moment.
  - how to maintain a compatible C API across 2.x and 3.x
  - is it practically possible to support and maintain numpy from 2.4
 to 3.x ? For example, I don't think the python 2.6 py3k warnings are
 very useful when you need to maintain compatibility with 2.4 and 2.5.

You should ask all those questions on the dedicated mailing-list:
http://mail.python.org/mailman/listinfo/python-porting

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread R. David Murray

On Mon, 2 Nov 2009 at 22:06, Guido van Rossum wrote:

On Mon, Nov 2, 2009 at 9:51 PM, sstein...@gmail.com sstein...@gmail.com wrote:

BeautifulSoup, which I use every day, is one such product. ?Since the crappy
old SMGL parser's gone, BeautifulSoup uses the one that's left in Python 3
and it makes BeautifulSoup completely useless for my daily work.


This sounds an area where some help might be useful. Perhaps the
quickest solution would simply be to copy the old crappy sgml based
html parser into a new version of BeautifulSoup. Though I imagine what
it really needs is a quirks mode parser that is compatible with the
HTML dialect accepted by, say, IE6. Maybe a summer of code project?


It's not a matter of quirks.  It's a matter of being able to parse
truly broken html/xml, which browsers unfortunately do too well
for everyone else's sanity.

So, call it a sloppy mode parser, and then yes, that would solve the
problem.

--David (RDM)___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Barry Warsaw

On Nov 3, 2009, at 1:07 AM, Martin v. Löwis wrote:


Barry Warsaw wrote:

On Nov 2, 2009, at 10:48 PM, sstein...@gmail.com wrote:

A better language, i.e. Python 3.x, will become better faster  
without

dragging the 2.x series out any longer.


If Python 2.7 becomes the last of the 2.x series, then I personally
favor back porting as many features from Python 3 as possible.


And if *2.6* becomes the last of the 2.x series?


Then clearly we can't back port features.

I'd like to read some case studies of people who have migrated  
applications from 2.6 to 3.0.  Having just gone through a 2 week  
sprint to migrate Launchpad from 2.4 to 2.6, and only making it to  
2.5, I can say that I was unpleasantly surprised at the amount of work  
it took.  A lot of that was working out the dependency upgrades, with  
some amount of fixing our code (mostly tests) for things that have  
changed (e.g. exception print/str format).  We didn't make it to  
Python 2.6 because dealing with deprecation warnings for sha, md5, and  
sets (a little in our code but tons in our dependencies) consumed most  
of our remaining time.


Given another week or so I think we would have made it to Python 2.6,  
but I'm not at all confident that that would have been a good enough  
platform to attempt an upgrade to Python 3, even if all of our very  
numerous large dependencies were available for Python 3.  Maybe it  
wouldn't be so bad, but my recent experience informs me that I'm  
probably being too optimistic rather than too pessimistic.


-Barry



PGP.sig
Description: This is a digitally signed message part
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Barry Warsaw

On Nov 2, 2009, at 11:51 PM, sstein...@gmail.com wrote:


I agree as long as:
	A 2.7 comes out as soon as possible, even if it's missing helpful  
porting features.
	B 2.7 will get ONLY new features that make it easier to port to  
3.x, not every feature added to 3.x or all you've done is make  
Python 2.7, the Python 3 Version. and core developer time will  
continue to be wasted on Python 2.7 instead of moving forward.


I'm not sure I agree with that core developer time will be wasted on  
Python 2.7 instead of moving forward.  However, I completely  
understand core developers seeing Python 2.x as a dead end and not  
wanting to work on it.  If that's a real issue, we should acknowledge  
that as a factor in the decision.  This is a volunteer organization  
and if the majority of developers are sick and tired of Python 2, then  
it absolutely makes no sense to slog through a Python 2.7 release.   
I'd much rather take all the enthusiastic energy that decision will  
reclaim and focus it on, oh, Python 3's email package instead wink.


I also think Guido's call for feature freeze makes a lot more sense  
when 2.7 is the EOL.  Let's give people migrating to Python 3 a  
nice big stable target to hit.  Improving the stdlib also gives  
people a big carrot to move.


Agreed. And specifically NOT porting every shiny new toy from Python  
3 back to 2.7 makes sure the carrots are only in the 3.x series.


Python 3's got enough carrots and sticks already.  One huge carrot  
that will never make it back into Python 2 is bytes/strings of  
course.  The huge stick is that Python 2 is end-of-lifed, if not now,  
eventually.  It isn't going to get a reprieve.  Everyone knows that  
everyone will have to get to Python 3.  The question is, what can we  
as a community  do to make that inevitability as easy to swallow as  
possible?


I think it's also necessary to give third party library and  
application authors as much help as possible to provide Python 3  
compatible software.  Putting together Python tools involves so  
many dependencies in a fairly deep stack that even one unconverted  
library can cause everything above it to stall on Python 2.


And that's one of the reasons my explorations into Python 3 have  
been limited to pretty much nothing.


I don't have time to do a bunch of work only to find out that the  
tool I absolutely have to have to finish a project doesn't have a  
Python 3 version or has been crippled to make a Python 3 version.


Unfortunately, I think we have to do those explorations, fail, hit  
roadblocks, complain, etc. but most importantly identify the packages  
that need to be ported.  Then work with those package authors to make  
the upgrades happen.  And improve Python and Pythonic tools so that  
migrations can go smoothly.


Speaking as a package author, I know how much work it is just to get a  
bug fix release out.  The three lines of code fix means 50 lines of  
test writing, a half a day of documenting, packaging, uploading, and  
announcing.  Porting even one of my packages to Python 3 is a  
significant undertaking which frankly I don't have the cycles for.   
Anything large and complicated is hopeless.  Witness how long and  
difficult it's been just to get a standard library module updated  
(email) and you get a sense of how much work it will be to get an  
entire stack of code onto Python 3.


BeautifulSoup, which I use every day, is one such product.  Since  
the crappy old SMGL parser's gone, BeautifulSoup uses the one that's  
left in Python 3 and it makes BeautifulSoup completely useless for  
my daily work.


That's not to say I can't fix that one particular project, but  
customers get cranky when their project is taking longer than  
expected and Oh, I'm having to convert a lot of things to use  
Python 3 doesn't seem to improve their mood much.


I completely agree.  What happens when your application depends on a  
half dozen Zope packages, Twisted, and 15 or 20 other established,  
mature packages?  It's a daunting prospect.


-Barry



PGP.sig
Description: This is a digitally signed message part
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread M.-A. Lemburg
Raymond Hettinger wrote:
 In all these matters, I think the users should get a vote.  And that
 vote should be cast with their decision to stay with 2.x, or switch to
 3.x, or try to support both.  We should not muck with their rational
 decision making by putting carrots in one pile and abandoning the other.

I don't think users will really go for carrots. Python 2.x is mature
enough already and at least the users I know are really happy with it
(including myself).

IMHO, the main benefit of backporting features from 3.x to 2.x is
to make the transition from 2.x to 3.x a gradual one based on evolution
rather than revolution.

The other aspect is maintenance. Users do care about bug fixes and
security patches. They also care about fixes needed to make Python
work on new platforms (such as Windows 7) - mainly to keep their
existing code running on these new platforms.

The question is: Who is going to continue working on such 2.x
releases, review patches, etc. ?

If there are no core developers willing to do this, it's likely
not going to happen.

OTOH, I'm sure that companies who have invested in Python 2.x
applications will gladly pay a yearly fee to the PSF to have
this done for them.

It's simply a whole lot cheaper than to port a few 100K lines of
Python/C code, not to mention having to wait for all the used
3rd party libs to get ported as well.

The PSF could then pay a core developer to take care of the
extra Python 2.x releases.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 03 2009)
 Python/Zope Consulting and Support ...http://www.egenix.com/
 mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


::: Try our new mxODBC.Connect Python Database Interface for free ! 


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread David Cournapeau
On Tue, Nov 3, 2009 at 8:40 PM, Antoine Pitrou solip...@pitrou.net wrote:
 Sturla Molden sturla at molden.no writes:

 Porting NumPy is not a trivial issue. It might take
 a complete rewrite of the whole C base using Cython.

 I don't see why they would need a rewrite.

(let me know if those numpy-specific discussions are considered OT0

There is certainly no need for a full rewrite, no. I am still unclear
on the range of things to change for 3.x, but the C changes are not
small, especially since numpy uses dark areas of python C extension.
The long vs int, strings vs bytes will take some time.

AFAIK, the only thing which has been attempted so far is porting our
own distutils extension to python 3.x, but I have not integrated those
changes yet.

 between 2.x and 3.x. Cython itself is supposed to support both 2.x and 3.x,
 isn't it?

Yes - but no numpy code use cython ATM, except for the random
generators, which would almost certainly be trivial to convert.

The idea which has been discussed so far is that for *some* code which
need significant changes or rewrite, using cython instead of C may be
beneficial, as it would give the 3.x code for free. Having more
cython and less C could also bring more contributors - that would
actually be the biggest incentive, as the number of people who know
the core C code of numpy is too small.

 That's interesting, because PEP 3118 was pushed mainly by a prominent member 
 of
 the NumPy community and some of its features are almost dedicated to NumPy.

I have not been involved with PEP 3118 discussion, so cannot comment
on the reason why it is not fully supported yet by numpy.

But I think that's a different issue altogether - PEP 3118 goal is for
interoperation with other packages. We can port to PEP 3118 without
porting to 3.x, and we can port to 3.x without taking care of PEP
3118.

David
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread David Cournapeau
On Tue, Nov 3, 2009 at 9:55 PM, Barry Warsaw ba...@python.org wrote:


 Then clearly we can't back port features.

 I'd like to read some case studies of people who have migrated applications
 from 2.6 to 3.0.

+1, especially for packages which have a lot of C code: the current
documentation is sparse :) The only helpful reference I have found so
far is an email by MvL concerning psycopg2 port.

David
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 12:06 AM, Guido van Rossum wrote:

On Mon, Nov 2, 2009 at 9:51 PM, sstein...@gmail.com sstein...@gmail.com 
 wrote:
BeautifulSoup, which I use every day, is one such product.  Since  
the crappy
old SMGL parser's gone, BeautifulSoup uses the one that's left in  
Python 3

and it makes BeautifulSoup completely useless for my daily work.


This sounds an area where some help might be useful. Perhaps the
quickest solution would simply be to copy the old crappy sgml based
html parser into a new version of BeautifulSoup.


That is what we're discussing doing on the old-soup branch at http://github.com/adevore/old-beautiful-soup 
 .  I'm not exactly sure why the old SGML parser was dropped but it  
seems that porting it to Python 3 would be enough of an effort that it  
caused the Python library to drop it, and the current developer of the  
mainline of Beautiful Soup to decide to just use what was available in  
Python 3 natively.


Though I imagine what it really needs is a quirks mode parser that  
is compatible with the

HTML dialect accepted by, say, IE6. Maybe a summer of code project?


I think it just relies on the old SGML parser's not blowing up on  
completely bogus HTML (like most of the web) and does the best it can  
with the 'chunks' that come back; nothing to do with quirks mode per se.


As for a Summer of Code project, I have no idea what would be  
involved.  I know there are lots of users for Beautiful soup; as far  
as I know it is the best scraper of HTML code, valid or not, that's  
out there and it's been around a long time and I see it in projects in  
the html scraping realm all the time.


At any rate, it's just one example of where the developer has taken  
the easy route out with a 3.0 port and has produced a product that's  
Python 3 but, instead of getting better with Python's new features,  
has actually become useless for the majority of use-cases where  
formerly it shined.


S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 1:07 AM, Martin v. Löwis wrote:


Barry Warsaw wrote:

On Nov 2, 2009, at 10:48 PM, sstein...@gmail.com wrote:

A better language, i.e. Python 3.x, will become better faster  
without

dragging the 2.x series out any longer.


If Python 2.7 becomes the last of the 2.x series, then I personally
favor back porting as many features from Python 3 as possible.


And if *2.6* becomes the last of the 2.x series?


Then I'd guess that that would annoy the crap out of everyone who's  
put so much effort into 2.7 and all of us who have been waiting for  
what I hope will finally be the now ports way more easily to 3.0  
version.


S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 4:55 AM, David Cournapeau wrote:

On Tue, Nov 3, 2009 at 6:13 PM, Michael Foord fuzzy...@voidspace.org.uk 
 wrote:


There is also little documentation on how to port a significant C
codebase to py3k.


Now there's a good Summer of Code project:  to produce a pre-processor  
that will flag all C constructs that need to be modified in some way,  
with direct pointers to the relevant documentation, and code  
suggestions wherever practicable.


S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 4:58 AM, Raymond Hettinger wrote:


P.S.  I found it curious that one of the strongest proponents of  
killing 2.x also mentioned that he has never written a line of 3.x  
code.   Since this discussion is a matter of great consequence, I  
would hope that advocates will only take informed positions --  this  
isn't really time for shooting from the hip and killing 2.x.


Uh, that would be me.

I'm only a proponent of making a decision.

I *want* to have a better development language, library, and add-on  
tools.


If 3.x is where future core development time is going to be focused,  
then I have faith that they will be able to make it the compelling  
path that it will become with Guido having put as much effort into it  
as he has.  Or, maybe he's completely lost his mind as sometimes  
happens with dictators for life benevolent or other-wise. ;-)


In any case, splitting time between 2.x and 3.x, with limited  
developer resources is going to lead to slower progress on both fronts.


And, as you point out, if 3.x doesn't start getting the crap beat out  
of it in the real world sooner rather than later, we may find  
ourselves, collectively with a stale 2.x, an under battle-tested 3.x,  
and nowhere to go.


S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 2:20 AM, Sturla Molden wrote:

I'd just like to mention that the scientific community is highly  
dependent on NumPy. As long as NumPy is not ported to Py3k,  
migration is out of the question. Porting NumPy is not a trivial  
issue. It might take a complete rewrite of the whole C base using  
Cython. NumPy's ABI is not even PEP 3118 compliant. Changing the ABI  
for Py3k might break extension code written for NumPy using C. And  
scientists tend to write CPU-bound routines in languages like C and  
Fortran, not Python, so that is a major issue as well. If we port  
NumPy to Py3k, everyone using NumPy will have to port their C code  
to the new ABI. There are lot of people stuck with Python 2.x for  
this reason.


It does not just affect individual scientists, but also large  
projects like IBM and CERN's blue brain and NASA's space telecope.


Then, perhaps, if 2.7 is known to be the last release of the 2.x line,  
some of those deep pockets can cough up some $$$ or developers to  
actually _do_ the port.


A Python 3 version of NumPy might be enough of an improvement to bring  
*more* scientists and engineers onboard if the Python 3.x version  
shows what great productivity gains are to be had with Python 3.x over  
2.x.


S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Antoine Pitrou
David Cournapeau cournape at gmail.com writes:
 
 We can port to PEP 3118 without
 porting to 3.x, and we can port to 3.x without taking care of PEP
 3118.

I'm not sure you can do the latter. The old buffer API (the one PEP 3118
replaces) doesn't exist in py3k.


Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Daniel Stutzbach
On Tue, Nov 3, 2009 at 3:55 AM, David Cournapeau courn...@gmail.com wrote:

  - are two branches are necessary or not ? If two branches are
 necessary, I think we simply do not have the resources at the moment.
  - how to maintain a compatible C API across 2.x and 3.x
  - is it practically possible to support and maintain numpy from 2.4
 to 3.x ? For example, I don't think the python 2.6 py3k warnings are
 very useful when you need to maintain compatibility with 2.4 and 2.5.


I've already ported some of my Python extension modules to Python 3.  Here's
how I would answer your questions based on my experience.

Writing C code that compiles with Python 2.4 through 3.1 is pretty easy.
Python's C API hasn't changed much and you can use #ifdef and #define for
any bits that must be version-specific.

It's pretty easy to make Python source that works under 2.6 and 3.x.  It's
basically impossible to make Python source that works under 2.4/2.5 and
3.x.  You may be able to write code that works under 2.4/2.5 and works
cleanly with 2to3 to produce 3.x code.  I haven't tried that route, though
in theory it should work.  All you really need is syntax compatibility.  For
the rest, you can check sys.version_info.

In a nutshell, I don't think you need two branches to support an extension
module on Python 2 and Python 3.

YMMV.

--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread skip

Martin And if *2.6* becomes the last of the 2.x series?

With all due respect, I don't think you can make that decision now.  The
time to have stated 2.6 would be the end of the 2.x line was when 2.6 was
released.  At that point instead of opening up the trunk for changes you
would have closed it off or merged the py3k branch to trunk.  2.6.0 was
released over a year ago and there has been no effort to suppress bug fix or
feature additions to trunk since then.  If you call 2.6 the end of 2.x
you'll have wasted a year of work on 2.7 with about a month to go before the
first 2.7 alpha release.

If you want to accelerate release of 2.7 (fewer alphas, compressed schedule,
etc) that's fine, but I don't think you can turn back the clock at this
point and decree that 2.7 is dead.

Skip
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread skip

mal I don't think users will really go for carrots. Python 2.x is
mal mature enough already and at least the users I know are really
mal happy with it (including myself).

Taking that thought further back one step (or three), from

http://effbot.org/tkinterbook/listbox.htm

I pull this quote:

In versions before Python 1.5, use string.atoi instead of int.

:-)

Skip
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Guido van Rossum
On Tue, Nov 3, 2009 at 4:55 AM, Barry Warsaw ba...@python.org wrote:
 I'd like to read some case studies of people who have migrated applications
 from 2.6 to 3.0.  Having just gone through a 2 week sprint to migrate
 Launchpad from 2.4 to 2.6, and only making it to 2.5, I can say that I was
 unpleasantly surprised at the amount of work it took.  A lot of that was
 working out the dependency upgrades, with some amount of fixing our code
 (mostly tests) for things that have changed (e.g. exception print/str
 format).  We didn't make it to Python 2.6 because dealing with deprecation
 warnings for sha, md5, and sets (a little in our code but tons in our
 dependencies) consumed most of our remaining time.

Ouch. sets. I'm guessing you are referring to code that was still
using the pre-2.4 sets.py module? Yes, that must have been painful.

 Given another week or so I think we would have made it to Python 2.6, but
 I'm not at all confident that that would have been a good enough platform to
 attempt an upgrade to Python 3, even if all of our very numerous large
 dependencies were available for Python 3.  Maybe it wouldn't be so bad, but
 my recent experience informs me that I'm probably being too optimistic
 rather than too pessimistic.

There are two stages of porting to 2.6 you have to go through. The
first one, which you would probably have reached in that week, is
running on 2.6 period. You can then release your code for the benefit
of others wanting to use it on 2.6.

But the second stage, which can take much more time (depending on the
state of your code base) is to run on 2.6 *free of warnings with the
-3 flag on*. You pretty much have to consider this a separate port,
and it is here where you do much of the prep work for 3.x (at least
for Python code -- for C extensions it's not so clear). The good news
is that you can claim 2.6 support before you've even started this
stage; the other good news is that doing this right will really help
you prepare for 3.x. And in most cases you can even (with some effort)
maintain compatibility with 2.5 or even 2.4 -- though you may have to
work around some things like the md5 and sha warnings.

The bad news is that this stage may well take more time than porting
from 2.4 to 2.6.

-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Eric Smith

s...@pobox.com wrote:

mal I don't think users will really go for carrots. Python 2.x is
mal mature enough already and at least the users I know are really
mal happy with it (including myself).

Taking that thought further back one step (or three), from

http://effbot.org/tkinterbook/listbox.htm

I pull this quote:

In versions before Python 1.5, use string.atoi instead of int.


Which reminds me: I've been meaning to add -3 warnings for these string 
module functions!


Eric.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread James Y Knight

On Nov 3, 2009, at 8:55 AM, sstein...@gmail.com wrote:
And, as you point out, if 3.x doesn't start getting the crap beat  
out of it in the real world sooner rather than later, we may find  
ourselves, collectively with a stale 2.x, an under battle-tested  
3.x, and nowhere to go.


If that happens, it's not true that there's *nowhere* to go. A  
solution would be to discard 3.x as a failed experiment, take  
everything that is useful from it and port it to 2.x, and simply  
continue development from the last 2.x release. And from there,  
features can be deprecated and then removed a few releases later, as  
is the usual policy.


Been there, done that, on a couple other projects. It's unfortunate  
when you have to throw out work you've done because it failed to gain  
traction over the thing you tried to replace, but sometimes that's life.


James
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread geremy condra
On Tue, Nov 3, 2009 at 8:47 AM, sstein...@gmail.com sstein...@gmail.com wrote:

 On Nov 3, 2009, at 4:55 AM, David Cournapeau wrote:

 On Tue, Nov 3, 2009 at 6:13 PM, Michael Foord fuzzy...@voidspace.org.uk
 wrote:

 There is also little documentation on how to port a significant C
 codebase to py3k.

 Now there's a good Summer of Code project:  to produce a pre-processor that
 will flag all C constructs that need to be modified in some way, with direct
 pointers to the relevant documentation, and code suggestions wherever
 practicable.

 S

How much interest is there in this?

Geremy Condra
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Guido van Rossum
On Tue, Nov 3, 2009 at 9:04 AM, James Y Knight f...@fuhm.net wrote:
 If that happens, it's not true that there's *nowhere* to go. A solution
 would be to discard 3.x as a failed experiment, take everything that is
 useful from it and port it to 2.x, and simply continue development from the
 last 2.x release. And from there, features can be deprecated and then
 removed a few releases later, as is the usual policy.

 Been there, done that, on a couple other projects. It's unfortunate when you
 have to throw out work you've done because it failed to gain traction over
 the thing you tried to replace, but sometimes that's life.

I'm not ready for that yet. I think there's plenty of time before we
have to agree to such a bleak view. In the mean time let's do
something practical like help NumPy port to Py3k.

-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Antoine Pitrou
Paul Moore p.f.moore at gmail.com writes:
 
 FWIW, I did a quick survey of some packages (a sampling of packages
 I've used or considered using in the past):
 
 Twisted - no plans yet for Python 3

Well Twisted depends on zope.interface which is not ported yet.
Twisted apparently has plans to reduce or remove the warnings generated with the
-3 option, we'll see if the patches get committed:
http://twistedmatrix.com/trac/ticket/2484
http://twistedmatrix.com/trac/ticket/4053
http://twistedmatrix.com/trac/ticket/4065

 TurboGears - Python 3 currently unsupported, no timescale given

TurboGears is Pylons-based, so I suppose the actual question is when Pylons gets
ported.

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Antoine Pitrou
Arc Riley arcriley at gmail.com writes:
 
 +1 on ending with 2.6.I'm the maintainer of 3rd party Python 3-only packages
 and have ported a few modules that we needed with some help from the 2to3 
 tool.  It's really not a big deal - and Py3 really is a massive improvement.
 The main thing holding back the community are lazy and/or obstinate package 
 maintainers.  If they spent half the time they've put into complaining about 
 Py3 into actually working to upgrade their code they'd be done now.

One thing you could do is explain (do you have a blog?) how Py3 is a massive
improvement for you as a developer and package maintainer.
We core developers obviously agree that py3k is better than 2.x, but the same
opinion coming from a third-party developer would carry a different weight.

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Charles Cazabon
Arc Riley arcri...@gmail.com wrote:
 +1 on ending with 2.6.

That seems precipitous.

 I'm the maintainer of 3rd party Python 3-only packages and have ported a few
 modules that we needed with some help from the 2to3 tool.  It's really not a
 big deal - and Py3 really is a massive improvement.
 
 The main thing holding back the community are lazy and/or obstinate package
 maintainers.

I wouldn't say that.  For instance, I'm just starting a refactoring that will
result in getmail v.5, but I need to target Python 2.5 and up, so there's
essentially no way the code will run in Python 3.x (as another list member
posted).

Why do I need to target Python 2.5?  Because that's the most current default
version of Python shipped in Debian stable and various other distributions
that don't stay on the bleeding edge.  getmail v.4 targeted Python 2.3 and up,
getmail v.3 targeted Python 1.5.2 and up.  I may be able to target Python 2.6
in a year or two, at which point Python 3 compatibility becomes a reasonable
goal.

Saying 2.6 is the last Python 2.x seems to me to be a death sentence for
Python 3.  People will stay with 2.x much longer than you seem to want them
to, and making it harder for them to upgrade will only hurt Python 3.

Charles
-- 
---
Charles Cazabon
GPL'ed software available at:   http://pyropus.ca/software/
---
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 12:38 PM, Guido van Rossum wrote:

On Tue, Nov 3, 2009 at 9:35 AM, sstein...@gmail.com sstein...@gmail.com 
 wrote:


On Nov 3, 2009, at 12:23 PM, Guido van Rossum wrote:

On Tue, Nov 3, 2009 at 9:04 AM, James Y Knight f...@fuhm.net  
wrote:


If that happens, it's not true that there's *nowhere* to go. A  
solution
would be to discard 3.x as a failed experiment, take everything  
that is
useful from it and port it to 2.x, and simply continue  
development from

the
last 2.x release. And from there, features can be deprecated and  
then

removed a few releases later, as is the usual policy.

Been there, done that, on a couple other projects. It's  
unfortunate when

you
have to throw out work you've done because it failed to gain  
traction

over
the thing you tried to replace, but sometimes that's life.


I'm not ready for that yet. I think there's plenty of time before we
have to agree to such a bleak view. In the mean time let's do
something practical like help NumPy port to Py3k.


Or, for example, Django...


Wasn't Django ported to Py3k by MvL as a demo? The problem seems to be
more to port the Django *community* to Py3k...


I do remember seeing something about that somewhere but it sure isn't  
jumping into my workflow at the moment.


If I can get a Python 3 version of Django, that's keeping up with  
trunk, I hereby declare that I will start using it on my current  
project as soon as the client takes the blowtorch off my toes for the  
current deliverable.


And...I'll help keep it up to date with trunk as best I can and also  
help pull along all the modules I need (incidentally, including  
Beautiful Soup).


I really _want_ Python 3 to be better, I hope actual use convinces me  
that it is...


There, now I'm committed (or, maybe I should _be_ committed).

Thanks,

S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 12:43 PM, Martin v. Löwis wrote:


I'm not ready for that yet. I think there's plenty of time before we
have to agree to such a bleak view. In the mean time let's do
something practical like help NumPy port to Py3k.


Or, for example, Django...


See

http://wiki.python.org/moin/PortingDjangoTo3k


Well, that's certainly a  start.

I guess the logical question is: Now what?

S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 A Python 3 version of NumPy might be enough of an improvement to bring
 *more* scientists and engineers onboard if the Python 3.x version shows
 what great productivity gains are to be had with Python 3.x over 2.x.

I would be really surprised if 2.7 would simplify porting to 3.x. How
could that possibly work?

(and no, adding things like nonlocal to 2.7 doesn't making porting of
a real application or library any easier, since the existing application
or library simply doesn't use that keyword. In fact, no change to 2.x
can reasonably simplify porting - only changes to 3.x might - except
for changes to 2to3, which can simplify porting a lot. But 2to3 should
be run under 3.x, IMO.)

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Zooko O'Whielacronx
Folks:

I really don't want to make anyone feel bad or to criticize, but I
should mention that I have no plans to use Python 3 or to support
Python 3.  My best guess at this time is that the current projects
that I'm involved in will still require Python 2 for the forseeable
future (let's say 5 years.  I can see 5 years into the future.), and
that as I start new projects I will probably try out interesting
alternative programming languages like Haskell, Newspeak [1],
Jacaranda [2], and other new things that appear in the coming years.

Of course, I reserve the right to change my mind and start using and
supporting Python 3.  That might happen if there is some combination
of: 1. my users start asking for it (no-one has yet), 2. my
dependencies start providing it (I use Python because it has Twisted.
Twisted requires Python 2.), 3. it becomes more possible for me to
write code which is still Python-2-compatible and also is more and
more close to being Python-3-compatible.

By the way, one significant detail which makes Python 3 less
interesting to me is [3].  Those two languages that I mentioned --
Newspeak and Jacaranda -- both have object-capability nature.  If that
issue in [3] were fixed then Python 3 would join Python 2 as a
language that can (with the CapPython extension) have
object-capability nature.

Regards,

Zooko

[1] http://bracha.org/Site/Newspeak.html
[2] http://jacaranda.org
[3] 
http://lackingrhoticity.blogspot.com/2008/09/cappython-unbound-methods-and-python-30.html
---
Your cloud storage provider does not need access to your data.
Tahoe-LAFS -- http://allmydata.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Farshid Lashkari
On Tue, Nov 3, 2009 at 9:37 AM, Martin v. Löwis mar...@v.loewis.dewrote:

 (and no, adding things like nonlocal to 2.7 doesn't making porting of
 a real application or library any easier, since the existing application
 or library simply doesn't use that keyword. In fact, no change to 2.x
 can reasonably simplify porting - only changes to 3.x might - except
 for changes to 2to3, which can simplify porting a lot. But 2to3 should
 be run under 3.x, IMO.)


I agree that adding these features doesn't really help much for people that
are porting from 2.x to 3.x. However, I can see it being useful for package
developers who want to support both 3.x and 2.x. The more these two versions
have in common the easier it will be to support them both. Obviously, this
means the package might not work with 2.6 and earlier. But some users out
there might be in some situation where they cannot upgrade to 3.x but can
jump from 2.4/5/6 to 2.7.

-Farshid
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Georg Brandl
Martin v. Löwis schrieb:
 It's pretty easy to make Python source that works under 2.6 and 3.x. 
 It's basically impossible to make Python source that works under 2.4/2.5
 and 3.x.  You may be able to write code that works under 2.4/2.5 and
 works cleanly with 2to3 to produce 3.x code.  I haven't tried that
 route, though in theory it should work.  All you really need is syntax
 compatibility.
 
 I have tried that route for a number of projects, and I think it works
 really well. It is also supported by distribute.

I've ported both Docutils and Pygments using that strategy, and I'll gladly
agree to that.

Georg

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Antoine Pitrou
Georg Brandl g.brandl at gmx.net writes:
 
 skip at pobox.com schrieb:
  Martin And if *2.6* becomes the last of the 2.x series?
  
  With all due respect, I don't think you can make that decision now.  The
  time to have stated 2.6 would be the end of the 2.x line was when 2.6 was
  released.  At that point instead of opening up the trunk for changes you
  would have closed it off or merged the py3k branch to trunk.  2.6.0 was
  released over a year ago and there has been no effort to suppress bug fix or
  feature additions to trunk since then.  If you call 2.6 the end of 2.x
  you'll have wasted a year of work on 2.7 with about a month to go before the
  first 2.7 alpha release.
 
 +1.

+1 as well. Besides, it is much better communication to release 2.7 and say up
front that it will be the last major release in the 2.x line. Announcing that
there won't be a 2.7, however, would give the impression of poor planning.

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 I'd like to read some case studies of people who have migrated applications
 from 2.6 to 3.0.
 
 +1, especially for packages which have a lot of C code: the current
 documentation is sparse :) The only helpful reference I have found so
 far is an email by MvL concerning psycopg2 port.

You may also want to take a look at my ZODB port:

https://www.dcl.hpi.uni-potsdam.de/home/loewis/zodb/

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 I'm not ready for that yet. I think there's plenty of time before we
 have to agree to such a bleak view. In the mean time let's do
 something practical like help NumPy port to Py3k.
 
 Or, for example, Django...

See

http://wiki.python.org/moin/PortingDjangoTo3k

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 12:23 PM, Guido van Rossum wrote:


On Tue, Nov 3, 2009 at 9:04 AM, James Y Knight f...@fuhm.net wrote:
If that happens, it's not true that there's *nowhere* to go. A  
solution
would be to discard 3.x as a failed experiment, take everything  
that is
useful from it and port it to 2.x, and simply continue development  
from the

last 2.x release. And from there, features can be deprecated and then
removed a few releases later, as is the usual policy.

Been there, done that, on a couple other projects. It's unfortunate  
when you
have to throw out work you've done because it failed to gain  
traction over

the thing you tried to replace, but sometimes that's life.


I'm not ready for that yet. I think there's plenty of time before we
have to agree to such a bleak view. In the mean time let's do
something practical like help NumPy port to Py3k.


Or, for example, Django...

S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 It's pretty easy to make Python source that works under 2.6 and 3.x. 
 It's basically impossible to make Python source that works under 2.4/2.5
 and 3.x.  You may be able to write code that works under 2.4/2.5 and
 works cleanly with 2to3 to produce 3.x code.  I haven't tried that
 route, though in theory it should work.  All you really need is syntax
 compatibility.

I have tried that route for a number of projects, and I think it works
really well. It is also supported by distribute.

 In a nutshell, I don't think you need two branches to support an
 extension module on Python 2 and Python 3.
 
 YMMV.

Exactly my experience as well.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Georg Brandl
Raymond Hettinger schrieb:
 [Michael Foord]
 What will it take to *start* the port? (Or is it already underway?) For
 many projects I fear that it is only the impending obsolescence (real
 rather than theoretical) of Python 2 that will convince projects to port.
 
 FWIW, I do not buy into the several premises that have arisen in this thread:
 
 
 * For 3.x to succeed, something bad has to happen to 2.x.  (which in my book
 translates to intentionally harming 2.x users, either through neglect or
 force, in order to bait them into switching to 3.x).
 
 * Core developers will are losing time supporting 2.x. (backports take some
 time but it is small in comparison to getting a patch to work in the first
 place -- if anyone can comment on this assertion,  it is the people who have
 been doing it already (such as AP, MD, BP, GB, and myself)).

I agree.  However I wouldn't want to lose the amount of work I've put into 2.7.

While reviewing the 2.6 svnmerge avail output, I also got the impression that
a *significant* number of fixes were not backported to 2.6.  I don't have the
time to go through a 300+ kb change log and find out what to backport, just
based on commit messages that are not always clear on whether a fix or feature
was added.

So if we kill 2.7, we at least need to make sure no real improvements that
should have been in 2.x are lost.

Georg

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Eric Smith

Martin v. Löwis wrote:

A Python 3 version of NumPy might be enough of an improvement to bring
*more* scientists and engineers onboard if the Python 3.x version shows
what great productivity gains are to be had with Python 3.x over 2.x.


I would be really surprised if 2.7 would simplify porting to 3.x. How
could that possibly work?


The only things I can think of that would go into this category are 
features like:

- PEP 3118, revised buffer protocol. If the buffer API that numpy
  uses is not present in py3k (I'm no expert on the subject, but
  it seems this way from a recent thread on python-dev), then if
  they could move to PEP 3118 in 2.7 their migration to 3.x would
  be easier
- short float repr. This would remove a class of hard-to-find
  problems from a migration from 2.7 to 3.x.
- Maybe io, but I don't know enough about it to say.

But I definitely agree that backporting language features new to 3.x 
don't make it easier. Examples are nonlocal and required keyword args.


Eric.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 To answer your question, the main issues are:
  - are two branches are necessary or not ? If two branches are
 necessary, I think we simply do not have the resources at the moment.

No, it should be well possible to have the same source being used in
both 2.x and 3.x. I've ported ZODB to Python 3 (which includes both
C and Python code), and it works quite well.

  - how to maintain a compatible C API across 2.x and 3.x

Not sure what the C API is: if it is the actual implementation of
the C modules, then I recommend to use preprocessor macros a lot.
If you need specific solutions, you'll have to ask specific questions.

  - is it practically possible to support and maintain numpy from 2.4
 to 3.x ? 

Absolutely, yes.

 For example, I don't think the python 2.6 py3k warnings are
 very useful when you need to maintain compatibility with 2.4 and 2.5.

These I don't know. I found that I had little use for the 3k warnings
in porting to 3k; I usually rely on tests to find out whether the code
still works correctly.

 There is also little documentation on how to port a significant C
 codebase to py3k.

Please do ask specific questions.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Paul Moore
2009/11/3 Martin v. Löwis mar...@v.loewis.de:
 I'd like to read some case studies of people who have migrated applications
 from 2.6 to 3.0.

 +1, especially for packages which have a lot of C code: the current
 documentation is sparse :) The only helpful reference I have found so
 far is an email by MvL concerning psycopg2 port.

 You may also want to take a look at my ZODB port:

 https://www.dcl.hpi.uni-potsdam.de/home/loewis/zodb/

Has that port been integrated back into the zodb project? If not, it
would be interesting to know the reasons (zodb project maintainers not
interested, barriers to contribution are too high, port is not 100%
complete and no-one willing to take it over and complete it...?)

Paul.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Guido van Rossum
On Tue, Nov 3, 2009 at 9:35 AM, sstein...@gmail.com sstein...@gmail.com wrote:

 On Nov 3, 2009, at 12:23 PM, Guido van Rossum wrote:

 On Tue, Nov 3, 2009 at 9:04 AM, James Y Knight f...@fuhm.net wrote:

 If that happens, it's not true that there's *nowhere* to go. A solution
 would be to discard 3.x as a failed experiment, take everything that is
 useful from it and port it to 2.x, and simply continue development from
 the
 last 2.x release. And from there, features can be deprecated and then
 removed a few releases later, as is the usual policy.

 Been there, done that, on a couple other projects. It's unfortunate when
 you
 have to throw out work you've done because it failed to gain traction
 over
 the thing you tried to replace, but sometimes that's life.

 I'm not ready for that yet. I think there's plenty of time before we
 have to agree to such a bleak view. In the mean time let's do
 something practical like help NumPy port to Py3k.

 Or, for example, Django...

Wasn't Django ported to Py3k by MvL as a demo? The problem seems to be
more to port the Django *community* to Py3k...

-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Barry Warsaw

On Nov 3, 2009, at 10:54 AM, Guido van Rossum wrote:


Ouch. sets. I'm guessing you are referring to code that was still
using the pre-2.4 sets.py module? Yes, that must have been painful.


Indeed. :)  What's nice though is that these changes could be made for  
the Python 2.5 branch and didn't have to wait until 2.6 (e.g. sha/md5 - 
 hashlib, sets - builtin-set).


What was actually most painful about this were all the tests that were  
checking stdout/stderr for clean subprocess runs.  The  
DeprecationWarnings that were produced killed us for a long while  
because so many of those tests failed.


It's actually quite difficult to suppress DeprecationWarnings across  
the board, especially when you have lots of subprocess that call third  
party code (where most of the deprecated code lived in, and which we  
couldn't change).  We added filterwarnings where we could, and called  
subprocesses with -W every place we thought we needed to but we never  
did kill them all off.  I think a $PYTHONWARNING environment variable  
might have helped here.


Given another week or so I think we would have made it to Python  
2.6, but
I'm not at all confident that that would have been a good enough  
platform to
attempt an upgrade to Python 3, even if all of our very numerous  
large
dependencies were available for Python 3.  Maybe it wouldn't be so  
bad, but
my recent experience informs me that I'm probably being too  
optimistic

rather than too pessimistic.


There are two stages of porting to 2.6 you have to go through. The
first one, which you would probably have reached in that week, is
running on 2.6 period. You can then release your code for the benefit
of others wanting to use it on 2.6.


Yep.


But the second stage, which can take much more time (depending on the
state of your code base) is to run on 2.6 *free of warnings with the
-3 flag on*. You pretty much have to consider this a separate port,
and it is here where you do much of the prep work for 3.x (at least
for Python code -- for C extensions it's not so clear). The good news
is that you can claim 2.6 support before you've even started this
stage; the other good news is that doing this right will really help
you prepare for 3.x. And in most cases you can even (with some effort)
maintain compatibility with 2.5 or even 2.4 -- though you may have to
work around some things like the md5 and sha warnings.

The bad news is that this stage may well take more time than porting
from 2.4 to 2.6.


We have another window for this (since it's all open source I don't  
mind talking about it) when the next version of Ubuntu comes out.   
Running with the -3 is a great idea, and something I will definitely  
try after finishing the straight 2.6 port.


-Barry



PGP.sig
Description: This is a digitally signed message part
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 Wasn't Django ported to Py3k by MvL as a demo? The problem seems to be
 more to port the Django *community* to Py3k...

Exactly so. At the last Pycon, we then agreed that I would get a branch
in the Django code repository, but then progress stalled due to
inactivity on boths sides.

Regards,
Martin

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Charles Cazabon
Martin v. Löwis mar...@v.loewis.de wrote:
  I wouldn't say that.  For instance, I'm just starting a refactoring that 
  will
  result in getmail v.5, but I need to target Python 2.5 and up, so there's
  essentially no way the code will run in Python 3.x (as another list member
  posted).
 
 That's a common myth. It is very well possible, using 2to3. You don't
 have to wait until you can drop 2.5 to start supporting 3.x, out of a
 single code base.

I haven't tried this, but I was relying on Daniel Stutzbach's opinion posted
here earlier:
http://mail.python.org/pipermail/python-dev/2009-November/093608.html

  It's pretty easy to make Python source that works under 2.6 and 3.x.  It's
  basically impossible to make Python source that works under 2.4/2.5 and
  3.x. 

  Why do I need to target Python 2.5?  Because that's the most current
  default version of Python shipped in Debian stable and various other
  distributions that don't stay on the bleeding edge.
 
 Are you saying that it doesn't *run* on 2.6?

No.  getmail v.4 runs fine on Python 2.3.4 through 2.6.x; getmail's code has
always been pretty forward-compatible.

 Why?  (not sure what you mean by targetting)

By target, I mean backwards compatibility -- the minimum version of Python
which is required to run getmail.  getmail v.4 came out of beta about five
years ago targetting Python 2.3 and higher, and 2.3 was too bleeding-edge for
many users -- it wasn't shipped by many Linux distributions for a long time
after getmail v.4 was released.  Debian *still* shipps getmail v3 (which
supports back to Python 1.5.2) today, although they also ship v4.

getmail v.5 will be released in a month or three.  And many of its users will
still have Python 2.5, so that's what getmail has to run on.  Perhaps Daniel's
comment is incorrect (I have no evidence either way), but if it is true that
having a single getmail codebase run on Python 2.5 and Python 3.x is
basically impossible, then I won't be too concerned about 3.x for a while
yet.

I've been an avid Python user and promoter since 1.2, but saying drop Python
2.x and switch to 3 now is simply not realistic in any of the environments in
which I use Python daily.  My $0.02.

Charles
-- 
---
Charles Cazabon
GPL'ed software available at:   http://pyropus.ca/software/
---
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 12:28 PM, Arc Riley wrote:


The main thing holding back the community are lazy and/or obstinate  
package maintainers.  If they spent half the time they've put into  
complaining about Py3 into actually working to upgrade their code  
they'd be done now.


That's an inflammatory, defamatory, unsubstantiated, hyperbolic,  
sweeping overgeneralization.


S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 12:35 PM, Antoine Pitrou wrote:


Arc Riley arcriley at gmail.com writes:


+1 on ending with 2.6.I'm the maintainer of 3rd party Python 3-only  
packages
and have ported a few modules that we needed with some help from  
the 2to3
tool.  It's really not a big deal - and Py3 really is a massive  
improvement.
The main thing holding back the community are lazy and/or obstinate  
package
maintainers.  If they spent half the time they've put into  
complaining about

Py3 into actually working to upgrade their code they'd be done now.


One thing you could do is explain (do you have a blog?) how Py3 is a  
massive

improvement for you as a developer and package maintainer.
We core developers obviously agree that py3k is better than 2.x, but  
the same
opinion coming from a third-party developer would carry a different  
weight.


Maybe I haven't been looking, but has anyone collected the Here's why  
3.x is better and here's how it saved my bacon on project XYZ stories?


S


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 I would be really surprised if 2.7 would simplify porting to 3.x. How
 could that possibly work?
 
 The only things I can think of that would go into this category are
 features like:
 - PEP 3118, revised buffer protocol. If the buffer API that numpy
   uses is not present in py3k (I'm no expert on the subject, but
   it seems this way from a recent thread on python-dev), then if
   they could move to PEP 3118 in 2.7 their migration to 3.x would
   be easier

But only if NumPy would drop support for 2.x, for x  7, right?
That would probably be many years in the future.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 I'm not ready for that yet. I think there's plenty of time before we
 have to agree to such a bleak view. In the mean time let's do
 something practical like help NumPy port to Py3k.

 Or, for example, Django...

 See

 http://wiki.python.org/moin/PortingDjangoTo3k
 
 Well, that's certainly a  start.
 
 I guess the logical question is: Now what?

Use it, and report bugs.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Eric Smith

Martin v. Löwis wrote:

I would be really surprised if 2.7 would simplify porting to 3.x. How
could that possibly work?

The only things I can think of that would go into this category are
features like:
- PEP 3118, revised buffer protocol. If the buffer API that numpy
  uses is not present in py3k (I'm no expert on the subject, but
  it seems this way from a recent thread on python-dev), then if
  they could move to PEP 3118 in 2.7 their migration to 3.x would
  be easier


But only if NumPy would drop support for 2.x, for x  7, right?
That would probably be many years in the future.


Right. But that might be their best migration strategy: wait for 2.7 to 
be available everywhere, port to 2.7, then port to 3.4 (or whatever the 
current version of 3.x would be, then).

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Georg Brandl
sstein...@gmail.com schrieb:
 
 On Nov 3, 2009, at 12:28 PM, Arc Riley wrote:

 The main thing holding back the community are lazy and/or obstinate
 package maintainers.  If they spent half the time they've put into
 complaining about Py3 into actually working to upgrade their code
 they'd be done now.
 
 That's an inflammatory, defamatory, unsubstantiated, hyperbolic,
 sweeping overgeneralization.

I know a few maintainers, and I have no problem seeing how Arc came
to that conclusion.

Georg

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Mike Klaas
On Tue, Nov 3, 2009 at 10:42 AM, Georg Brandl g.bra...@gmx.net wrote:

 sstein...@gmail.com schrieb:
 
  On Nov 3, 2009, at 12:28 PM, Arc Riley wrote:
 
  The main thing holding back the community are lazy and/or obstinate
  package maintainers.  If they spent half the time they've put into
  complaining about Py3 into actually working to upgrade their code
  they'd be done now.
 
  That's an inflammatory, defamatory, unsubstantiated, hyperbolic,
  sweeping overgeneralization.

 I know a few maintainers, and I have no problem seeing how Arc came
 to that conclusion.


Be that as it may, the only way python 3 will be widely adopted if people
have motivation to (need to be compatible with other libs, pressure from
users, their own interest in fostering python 3.0, etc.).  Deriding them as
lazy accomplishes nothing and obscures the fact that it is the python
maintainers responsibility to bring about this motivation if they want
python 3.0 to be adopted.  No-one is going to convert to python 3.0 because
you called them lazy.

-Mike


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Georg Brandl
Antoine Pitrou schrieb:
 Georg Brandl g.brandl at gmx.net writes:
 
 skip at pobox.com schrieb:
  Martin And if *2.6* becomes the last of the 2.x series?
  
  With all due respect, I don't think you can make that decision now.  The
  time to have stated 2.6 would be the end of the 2.x line was when 2.6 was
  released.  At that point instead of opening up the trunk for changes you
  would have closed it off or merged the py3k branch to trunk.  2.6.0 was
  released over a year ago and there has been no effort to suppress bug fix 
  or
  feature additions to trunk since then.  If you call 2.6 the end of 2.x
  you'll have wasted a year of work on 2.7 with about a month to go before 
  the
  first 2.7 alpha release.
 
 +1.
 
 +1 as well. Besides, it is much better communication to release 2.7 and say up
 front that it will be the last major release in the 2.x line. Announcing that
 there won't be a 2.7, however, would give the impression of poor planning.

And of a rush to get rid of 2.x.

Georg

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread David Cournapeau
On Wed, Nov 4, 2009 at 3:25 AM, Martin v. Löwis mar...@v.loewis.de wrote:

 But only if NumPy would drop support for 2.x, for x  7, right?
 That would probably be many years in the future.

Yes. Today, given the choice of supporting py 3.x and dropping python
 2.7 and continue support for 2.4, the latter is by far my preferred
choice today (RHEL still require 2.4, for example).

cheers,

David
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Larry Bugbee
This is my problem to solve...  I work with a lot of [non-production]  
crypto where byte strings are a normal way of manipulating and storing  
keys and other artifacts.  Under Python2 I have few/no Unicode  
issues.  With Python3's default string type being Unicode, there are a  
lot of subtle ways where my codes go south.  Like I say, it is my  
problem.


I will convert to Py3, but not likely before summer.  Besides 2to3,  
any other tools/suggestions would be welcome.  (Perhaps there is a  
Master switch to disable Unicode? ;-)


Changing the subject...  I say -1 on backporting more 3.x features to  
2.6/2.7.  As previously mentioned, leave the carrot.  And best  
intentions aside, backports can introduce problems of their own.




___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Ben Finney
Antoine Pitrou solip...@pitrou.net writes:

 Paul Moore p.f.moore at gmail.com writes:
  TurboGears - Python 3 currently unsupported, no timescale given

 TurboGears is Pylons-based, so I suppose the actual question is when
 Pylons gets ported.

And there's the rub. I expect this general problem of “project FOO
depends on library BAR, so there's no point thinking about migration of
FOO until BAR is ready for Python 3” will prove to be quite common in
widespread projects.

-- 
 \   “If you do not trust the source do not use this program.” |
  `\—Microsoft Vista security dialogue |
_o__)  |
Ben Finney

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Terry Reedy

Guido van Rossum wrote:

On Tue, Nov 3, 2009 at 9:37 AM, Martin v. Löwis mar...@v.loewis.de wrote:

(and no, adding things like nonlocal to 2.7 doesn't making porting of
a real application or library any easier, since the existing application
or library simply doesn't use that keyword.


Agreed.


In fact, no change to 2.x
can reasonably simplify porting - only changes to 3.x might - except
for changes to 2to3, which can simplify porting a lot. But 2to3 should
be run under 3.x, IMO.)


Disagreed. Better -3 warnings could make porting easier. (Not just
more warnings -- better might mean fewer false positives for
warnings already issued.)


There is also Eric Smith's list to consider: PEP3118 new buffer 
protocol, short float repr, and maybe io.



FWIW, it doesn't sound like killing 2.7 is a productive thing to do.
However making 2.7 the end of the line (though with indefinite bugfix
releases) might be. (Indefinite != infinite.)


I think you should decide and announce something like the following:
'''
Python 2.7 will be the final, stable release in the Python 2 line.
It will be released in mid-2010 with the first alpha scheduled for 
December 2009.
It will not intentionally break valid older 2.x code; this means no 
removals. (Valid == not exploiting a bug.)
Being the last of its line, there will be no deprecation warnings unless 
explicitly requested with the -3 flag to warn about incompatibilities 
with 3.x.

There will be lots of bug fixes since 2.6.
There will be only a few new features, with those aimed at easing 
eventual transition of libraries to 3.x.
The period of 2.7.z bugfix releases should be longer than for previous 
x.y releases (as long as there are volunteers to write and review 
patches and prepare distributions).


The developers urge people with 2.x code, especially library 
maintainers, to test it with preliminary alpha or beta releases so 2.7 
can be as good as possible.


The developers hope OS distributions can move to including 2.7 as soon 
as feasible, even if it means 'skipping' 2.6 as a default version.

'''
[My intention with the last is to promote 2.7 as the definitive version 
of 2.x, though there might be better wording.]


Terry Jan Reedy


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Steven Bethard
On Tue, Nov 3, 2009 at 4:55 AM, Barry Warsaw ba...@python.org wrote:
 I'd like to read some case studies of people who have migrated applications
 from 2.6 to 3.0.

For what it's worth, it was pretty easy to migrate argparse:

  http://code.google.com/p/argparse/source/detail?r=12

It was mostly just adding a few aliases, and doing a little
sys.exc_info() dance in a couple places because argparse supports
Python 2.3 - 3.1 all in the same code base.

Steve
-- 
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 I wouldn't say that.  For instance, I'm just starting a refactoring that will
 result in getmail v.5, but I need to target Python 2.5 and up, so there's
 essentially no way the code will run in Python 3.x (as another list member
 posted).

That's a common myth. It is very well possible, using 2to3. You don't
have to wait until you can drop 2.5 to start supporting 3.x, out of a
single code base.

 Why do I need to target Python 2.5?  Because that's the most current default
 version of Python shipped in Debian stable and various other distributions
 that don't stay on the bleeding edge.  getmail v.4 targeted Python 2.3 and up,
 getmail v.3 targeted Python 1.5.2 and up.  I may be able to target Python 2.6
 in a year or two, at which point Python 3 compatibility becomes a reasonable
 goal.

Are you saying that it doesn't *run* on 2.6? Why?
(not sure what you mean by targetting)

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Georg Brandl
Terry Reedy schrieb:
 James Y Knight wrote:
 
 If that happens, it's not true that there's *nowhere* to go. A solution 
 would be to discard 3.x as a failed experiment, take everything that is 
 useful from it and port it to 2.x, and simply continue development from 
 the last 2.x release. And from there, features can be deprecated and 
 then removed a few releases later, as is the usual policy.
 
 The once 'usual policy' of removal was changed several years ago to 
 'defer removals until 3.0' because people wanted a more stable language 
 and claimed that they would prefer to deal with several removals all at 
 once. So old-style classes were kept around long past when they would 
 have been removed under the old 'usual policy'. Ditto for old-style int 
 / int and some others.  Or one can simply recognize that 3.0 was the 
 'few releases later' release of that policy.
 
 The other big change was switching to unicode strings from ascii strings 
 with optional unicode string add-on. That was/is/will-be a hassle 
 regardless of when and what name, but necessary for Python to be a 
 modern world language.

From my experience, string to unicode migration really is the biggest
pain when porting anything that handles real-world data.

An interesting experiment would have been to split the big changes in two
parts, e.g., a 2.95 that only has the string to unicode changes, and
a 3.0 that has all the rest.  Of course, people would have complained
about having to port twice :)

Georg

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Guido van Rossum
On Tue, Nov 3, 2009 at 1:00 PM, Georg Brandl g.bra...@gmx.net wrote:
 From my experience, string to unicode migration really is the biggest
 pain when porting anything that handles real-world data.

Of course, handling Unicode right is also the biggest pain when
writing code for 2.x in the first place -- writing greenfield code
targeted at 3.x that does Unicode right is a lot easier. Alas, this
does nothing for those folks who already have working Unicode handling
code for 2.x...

-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Guido van Rossum
On Tue, Nov 3, 2009 at 3:27 PM, Larry Bugbee bug...@seanet.com wrote:
 This is my problem to solve...  I work with a lot of [non-production] crypto
 where byte strings are a normal way of manipulating and storing keys and
 other artifacts.  Under Python2 I have few/no Unicode issues.  With
 Python3's default string type being Unicode, there are a lot of subtle ways
 where my codes go south.  Like I say, it is my problem.

It may be interesting for others if you posted some examples of what
you are used to doing in 2.x. Maybe somebody will suggest a better way
of doing it in 3.x than you have thought of. :-)

 I will convert to Py3, but not likely before summer.  Besides 2to3, any
 other tools/suggestions would be welcome.  (Perhaps there is a Master switch
 to disable Unicode? ;-)

Yes, go back to 1.5.2. :-)

-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Martin v. Löwis
 You may also want to take a look at my ZODB port:

 https://www.dcl.hpi.uni-potsdam.de/home/loewis/zodb/
 
 Has that port been integrated back into the zodb project?

Only partially so.

 If not, it
 would be interesting to know the reasons (zodb project maintainers not
 interested, barriers to contribution are too high, port is not 100%
 complete and no-one willing to take it over and complete it...?)

ZODB is a lot of layers, really (zope.interfaces, zope.lockfile,
zope.proxy, ZConfig, etc..., finally ZODB).

I failed to port buildout and zope.testing. With zope.testing not
ported, it is not easy to actually run the test suites for all of
these; this is where the integration stalled.

In any case, I only did the port in September; at the DZUG sprint,
people from gocept then started looking into integrating it.
We didn't get through at the sprint, and I think there has been
little progress since.

One specific issue was about specifying the root of the zope.interfaces
hierarchy. In current zope.interfaces, None could be used (implicitly)
instead of Interface, to indicate the root interface type. In 3.x, this
would break tests, because you can't sort a list of interfaces anymore
if that list also contains None. So people decided that zope.interfaces
needs to be changed to disallow None, and that was a significant change
that has not yet been fully understood.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 7:42 PM, Ben Finney wrote:


Antoine Pitrou solip...@pitrou.net writes:


Paul Moore p.f.moore at gmail.com writes:

TurboGears - Python 3 currently unsupported, no timescale given


TurboGears is Pylons-based, so I suppose the actual question is when
Pylons gets ported.


And there's the rub. I expect this general problem of “project FOO
depends on library BAR, so there's no point thinking about migration  
of

FOO until BAR is ready for Python 3” will prove to be quite common in
widespread projects.


There's no will prove, it is.

S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Brett Cannon
On Tue, Nov 3, 2009 at 05:40, David Cournapeau courn...@gmail.com wrote:
 On Tue, Nov 3, 2009 at 9:55 PM, Barry Warsaw ba...@python.org wrote:


 Then clearly we can't back port features.

 I'd like to read some case studies of people who have migrated applications
 from 2.6 to 3.0.

 +1, especially for packages which have a lot of C code: the current
 documentation is sparse :) The only helpful reference I have found so
 far is an email by MvL concerning psycopg2 port.

There used to be a page on the wiki of case studies, but I couldn't
find it. But one C-specific case study is the port of Wing's extension
modules to support from Python 2.0 to 3.0:
http://pythonology.blogspot.com/2009/02/making-code-run-on-python-20-through-30.html
. There is also a wiki pages explicitly about porting C code:
http://wiki.python.org/moin/cporting and
http://wiki.python.org/moin/Py3kExtensionModules . Those latter pages
include links to the official porting docs:
http://docs.python.org/3.1/howto/cporting.html .

And as Georg pointed out there is always the python-porting mailing
list: http://mail.python.org/mailman/listinfo/python-porting .

I'm afraid there is some FUD going around here, which is
understandable since no one wants to burn a ton of time on something
that will be difficult or take a lot of time. But I have not heard
anyone in this email thread (or anywhere for that matter) say that
they tried a port in earnest and it turned out to be difficult.

-Brett
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Guido van Rossum
On Tue, Nov 3, 2009 at 9:37 AM, Martin v. Löwis mar...@v.loewis.de wrote:
 (and no, adding things like nonlocal to 2.7 doesn't making porting of
 a real application or library any easier, since the existing application
 or library simply doesn't use that keyword.

Agreed.

 In fact, no change to 2.x
 can reasonably simplify porting - only changes to 3.x might - except
 for changes to 2to3, which can simplify porting a lot. But 2to3 should
 be run under 3.x, IMO.)

Disagreed. Better -3 warnings could make porting easier. (Not just
more warnings -- better might mean fewer false positives for
warnings already issued.)

FWIW, it doesn't sound like killing 2.7 is a productive thing to do.
However making 2.7 the end of the line (though with indefinite bugfix
releases) might be. (Indefinite != infinite.)

-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread sstein...@gmail.com


On Nov 3, 2009, at 1:42 PM, Georg Brandl wrote:


sstein...@gmail.com schrieb:


On Nov 3, 2009, at 12:28 PM, Arc Riley wrote:


The main thing holding back the community are lazy and/or obstinate
package maintainers.  If they spent half the time they've put into
complaining about Py3 into actually working to upgrade their code
they'd be done now.


That's an inflammatory, defamatory, unsubstantiated, hyperbolic,
sweeping overgeneralization.


I know a few maintainers, and I have no problem seeing how Arc came
to that conclusion.


Yah, me neither, but the other two are still cool in my book ;-)

S

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


  1   2   >