From cool-rr at cool-rr.com Tue Jun 1 13:13:00 2010 From: cool-rr at cool-rr.com (cool-RR) Date: Tue, 1 Jun 2010 13:13:00 +0200 Subject: [Python-porting] Pickling unbound methods on Python 3 In-Reply-To: <4C042969.8070707@v.loewis.de> References: <20100529154605.746C31FCB16@kimball.webabinitio.net> <4C01473A.6010903@egenix.com> <4C01606B.9080504@v.loewis.de> <4C021190.9020008@v.loewis.de> <4C02D9D0.3040303@v.loewis.de> <4C02DD38.4000703@v.loewis.de> <4C0365CA.7070108@egenix.com> <4C04170E.10904@v.loewis.de> <4C0419E5.9050808@v.loewis.de> <4C042969.8070707@v.loewis.de> Message-ID: On Mon, May 31, 2010 at 11:26 PM, "Martin v. L?wis" wrote: > Am 31.05.2010 22:25, schrieb cool-RR: > >> On Mon, May 31, 2010 at 10:19 PM, "Martin v. L?wis" > > wrote: >> >> Great! I prefer adding an attribute to the unbound methods as well. >> Would you like to raise this on python-dev or would you like me to? >> >> >> I'm very skeptical that "raising" it will have any effect. Submit a >> patch instead. >> >> >> I don't understand Martin. Unbound methods had an `.im_class` attribute >> in Python 2.x, which is what we're talking about, and for Python 3.x >> that attribute was purposefully removed. I am assuming it was a >> deliberate decision by the python-dev community and that they had good >> reasons for it. Am I not supposed to ask them about this before I put it >> back? >> > > Sure, you can ask. However, instead of asking, please study the code: the > subversion log is available to the general public. Find out (for yourself) > what specific revision made the change, and you can save other contributors > the time of doing the research for you. > > You are mistaken that the the attribute was removed. It was not removed. > Instead, the object returned from the attribute lookup was changed, and the > "new" type just happened to have no im_class attribute. > It didn't have that attribute in 2.x, either. > > Regards, > Martin > Thanks for the clarifications, Martin and Brett. At this time I'm both under-qualified and don't have time to work on a patch. (I'm under-qualified because I don't code C and I'm not familiar with Python's innards.) Thanks for your help. Ram. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcea at jcea.es Wed Jun 2 14:39:42 2010 From: jcea at jcea.es (Jesus Cea) Date: Wed, 02 Jun 2010 14:39:42 +0200 Subject: [Python-porting] Pickling unbound methods on Python 3 In-Reply-To: References: <4C01473A.6010903@egenix.com> <4C01606B.9080504@v.loewis.de> <4C021190.9020008@v.loewis.de> <4C02D9D0.3040303@v.loewis.de> <4C02DD38.4000703@v.loewis.de> <4C0365CA.7070108@egenix.com> <4C04170E.10904@v.loewis.de> <4C0419E5.9050808@v.loewis.de> <4C042969.8070707@v.loewis.de> Message-ID: <4C06510E.70908@jcea.es> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/06/10 13:13, cool-RR wrote: > Thanks for the clarifications, Martin and Brett. > > At this time I'm both under-qualified and don't have time to work on a > patch. (I'm under-qualified because I don't code C and I'm not familiar > with Python's innards.) Although having a patch is important, I think that first we need a discussion about this subject in python-dev. Then opening an issue in the bugtracker. The patch doesn't need to be written by you, and python-dev must decide first it is a good idea (for somebody other to develop! :) to avoid wasting the developer time. - -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/ . _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQCVAwUBTAZRDJlgi5GaxT1NAQIn8gP+Pl0se6YfrOSfgC2FZMh4Ia+o9Kn45mT+ +7xskm4eDtT+whaaL1laDZiNhe77vooueoB7SbTTb1frNfxOwjwtNMizXp+4dIfU +Oh8C5LscmuZcvIVjZ09H2NHi7lEU5Zqb2S9ZZU6Al4uRuKJZHj+wED6sqQSK1iF VcVYlEhzaZo= =QBiM -----END PGP SIGNATURE----- From shane at isc.org Tue Jun 15 13:59:15 2010 From: shane at isc.org (Shane Kerr) Date: Tue, 15 Jun 2010 13:59:15 +0200 Subject: [Python-porting] Recommended Python version? Message-ID: <1276603155.24369.38.camel@shane-asus-laptop> Hello, Apologies if this is not the right list for this question, but there are many Python lists and I wasn't sure which to approach. We started the BIND 10 project a year ago, and picked Python 3 because we don't expect the software to be production-ready until after 3 years of work. However, we have concerns because very few systems ship with Python 3 "out of the box" still. We think that early adopters - and later all adopters - may be put off by this requirement. We're considering back-porting the project from 3.1 to 2.7, and then maintaining a version of the software that works with both the older 2.x and the newer 3.x series. Does this make any sense? Do you have any other recommendations regarding Python 2 vs. Python 3? Thanks, -- Shane From mal at egenix.com Tue Jun 15 14:49:38 2010 From: mal at egenix.com (M.-A. Lemburg) Date: Tue, 15 Jun 2010 14:49:38 +0200 Subject: [Python-porting] Recommended Python version? In-Reply-To: <1276603155.24369.38.camel@shane-asus-laptop> References: <1276603155.24369.38.camel@shane-asus-laptop> Message-ID: <4C1776E2.1090504@egenix.com> Shane Kerr wrote: > Hello, > > Apologies if this is not the right list for this question, but there are > many Python lists and I wasn't sure which to approach. > > We started the BIND 10 project a year ago, and picked Python 3 because > we don't expect the software to be production-ready until after 3 years > of work. > > However, we have concerns because very few systems ship with Python 3 > "out of the box" still. We think that early adopters - and later all > adopters - may be put off by this requirement. > > We're considering back-porting the project from 3.1 to 2.7, and then > maintaining a version of the software that works with both the older 2.x > and the newer 3.x series. Does this make any sense? > > Do you have any other recommendations regarding Python 2 vs. Python 3? Depending on what you want to do with Python, it's probably best to try to write software that works with both Python 2 and 3 - especially if you are targeting a very diverse set of systems. For backporting from 3 to 2, there's a helper available which may be useful: http://www.startcodon.com/wordpress/?cat=8 Note that most recent Linux distributions do ship with Python3. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 15 2010) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2010-07-19: EuroPython 2010, Birmingham, UK 33 days to go ::: 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/ From rdmurray at bitdance.com Tue Jun 15 16:53:00 2010 From: rdmurray at bitdance.com (R. David Murray) Date: Tue, 15 Jun 2010 10:53:00 -0400 Subject: [Python-porting] Recommended Python version? In-Reply-To: <4C1776E2.1090504@egenix.com> References: <1276603155.24369.38.camel@shane-asus-laptop> <4C1776E2.1090504@egenix.com> Message-ID: <20100615145300.C755B2074D4@kimball.webabinitio.net> On Tue, 15 Jun 2010 14:49:38 +0200, "M.-A. Lemburg" wrote: > Shane Kerr wrote: > > Hello, > > > > Apologies if this is not the right list for this question, but there are > > many Python lists and I wasn't sure which to approach. > > > > We started the BIND 10 project a year ago, and picked Python 3 because > > we don't expect the software to be production-ready until after 3 years > > of work. > > > > However, we have concerns because very few systems ship with Python 3 > > "out of the box" still. We think that early adopters - and later all > > adopters - may be put off by this requirement. I think that we are right in the middle of this changing. Python 3.1 just landed in Gentoo stable, for example, and I've heard that Ubuntu is planning to ship it in the next version. Note that Python3 will not initially ship as the *system* Python, but that Python2 and Python3 will happily coexist on systems that ship both. Because Python2 and Python3 can coexist, I would also think that early adopters would be more willing to install Python3 if their systems don't already have it, since they are, after all, early adopters :) By the time you get to the "all adopters" stage I'm guessing Python3 will be available on most systems; but that is, of course, a guess. > > We're considering back-porting the project from 3.1 to 2.7, and then > > maintaining a version of the software that works with both the older 2.x > > and the newer 3.x series. Does this make any sense? > > > > Do you have any other recommendations regarding Python 2 vs. Python 3? > > Depending on what you want to do with Python, it's probably best > to try to write software that works with both Python 2 and 3 - > especially if you are targeting a very diverse set of systems. The question, I think, is how much you will be trying to displace BIND 9. If you want to push BIND 10 out into all the corners currently occupied by BIND 9, you may need to support systems that won't, in fact, ship Python3 in the next couple years. On the other hand, how likely are such platforms to switch to BIND 10? Ultimately you are going to have to make the judgement call, since you know your market and your development resources. But note that it is easier to support both Python2 and Python3 than most people think, and this is especially true if you don't have to worry about backward compatibility (that is, you only target 2.7), which presumably you don't. > For backporting from 3 to 2, there's a helper available > which may be useful: http://www.startcodon.com/wordpress/?cat=8 If you do choose to make it run under Python2, note that the 3to2 project is being actively worked on this summer, and I'm pretty sure that the maintainer would love feedback from your project. -- R. David Murray www.bitdance.com From jhamel at cyrus-computer.de Tue Jun 15 16:57:57 2010 From: jhamel at cyrus-computer.de (=?UTF-8?B?SsO8cmdlbg==?= Hamel) Date: Tue, 15 Jun 2010 16:57:57 +0200 Subject: [Python-porting] Recommended Python version? In-Reply-To: <4C1776E2.1090504@egenix.com> References: <1276603155.24369.38.camel@shane-asus-laptop> <4C1776E2.1090504@egenix.com> Message-ID: <20100615165757.654a3eee@station2.localdomain> On Tue, 15 Jun 2010 14:49:38 +0200 "M.-A. Lemburg" wrote: > Shane Kerr wrote: > > We started the BIND 10 project a year ago, and picked Python 3 because > > we don't expect the software to be production-ready until after 3 years > > of work. > > > > However, we have concerns because very few systems ship with Python 3 > > "out of the box" still. We think that early adopters - and later all > > adopters - may be put off by this requirement. > > > > We're considering back-porting the project from 3.1 to 2.7, and then > > maintaining a version of the software that works with both the older 2.x > > and the newer 3.x series. Does this make any sense? > > FULL ACK, but I do with my project ( http://www.cuon.org ) for the next years only support python 2.x. look above for my arguments. > Depending on what you want to do with Python, it's probably best > to try to write software that works with both Python 2 and 3 - > especially if you are targeting a very diverse set of systems. > > For backporting from 3 to 2, there's a helper available > which may be useful: http://www.startcodon.com/wordpress/?cat=8 > > Note that most recent Linux distributions do ship with Python3. NO ! Ubuntu Lucid Lynx - preinstalled python 2.6.5 - and Lucid Lynx is a LTS version Gentoo - preinstalled python 2.6.5 Debian Lenny - python 2.5.2 Fedora 13 - python 2.6.4 For all normal user of this systems is python 2.x installed, and not all user are Systemadmins. A lot of user of my program for example are really normal linux user, use it for business ! I try since over 2 and a half years to find a solution for my project, but there is no way to convert it. A lot of libs are 2.x and no normal PC with Linux has an installed python 3.x !! At Windows it looks not better !! I hope really, that in some year a python version 3.x exists, that can execute both, 2.x and 3.x scripts. The current situation is a mess, to much python 2.x scripts are in the world, and the only solution is a python version, that allow to execute both !! I know all arguments, but there is a big diff between the wish to use python 3.x and the reality. bye J?rgen -- Cyrus-Computer GmbH Linux Server Support J?rgen Hamel Cuon - Warenwirtschaft mit Linux http://www.cuon.org Twitter: cuonOne Jabber: jhamel at cuonsim2.de -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From nico at tekNico.net Tue Jun 15 17:46:06 2010 From: nico at tekNico.net (Nicola Larosa) Date: Tue, 15 Jun 2010 17:46:06 +0200 Subject: [Python-porting] Recommended Python version? In-Reply-To: <20100615145300.C755B2074D4@kimball.webabinitio.net> References: <1276603155.24369.38.camel@shane-asus-laptop> <4C1776E2.1090504@egenix.com> <20100615145300.C755B2074D4@kimball.webabinitio.net> Message-ID: <4C17A03E.4070108@tekNico.net> R. David Murray wrote: > I've heard that Ubuntu is planning to ship it in the next version. > Note that Python3 will not initially ship as the *system* Python, > but that Python2 and Python3 will happily coexist on systems that > ship both. No future tense needed, it's been in the universe repo for three releases already, and now it's in the main one: Package python3 * intrepid (python): An interactive high-level object-oriented language (default python3 version) [universe] 3.0~b3-0ubuntu2: all * jaunty (python): An interactive high-level object-oriented language (default python3 version) [universe] 3.0.1-0ubuntu4: all * karmic (python): An interactive high-level object-oriented language (default python3 version) [universe] 3.1-1ubuntu1: all * lucid (python): An interactive high-level object-oriented language (default python3 version) 3.1.2-0ubuntu1: all http://packages.ubuntu.com/search?keywords=python3 There's going to be lots of Python code out there for quite a while, so it does not seem a good idea to wait until Python3 becomes the system Python version. It's not necessary either: just include python3 as a dependency in your package, and it will get installed with your program. -- Nicola Larosa - http://www.tekNico.net/ The movie entertainment industry has a problem: people don't go to theat- ers anymore, because they can watch movies from home, maybe gotten on piratebay. So the industry needs a new type of movies. Movies with lame story, lame script, lame everything, but top CGI, 3D, IMAX, ultra-mega- realistic screening, so the movie downloaded from the internet is, in fact, useless. - Habus on IMDB about Avatar, December 2009 From rdmurray at bitdance.com Tue Jun 15 19:13:58 2010 From: rdmurray at bitdance.com (R. David Murray) Date: Tue, 15 Jun 2010 13:13:58 -0400 Subject: [Python-porting] Recommended Python version? In-Reply-To: <4C17A03E.4070108@tekNico.net> References: <1276603155.24369.38.camel@shane-asus-laptop> <4C1776E2.1090504@egenix.com> <20100615145300.C755B2074D4@kimball.webabinitio.net> <4C17A03E.4070108@tekNico.net> Message-ID: <20100615171358.DD94C2188B3@kimball.webabinitio.net> On Tue, 15 Jun 2010 17:46:06 +0200, Nicola Larosa wrote: > R. David Murray wrote: > > I've heard that Ubuntu is planning to ship it in the next version. > > Note that Python3 will not initially ship as the *system* Python, > > but that Python2 and Python3 will happily coexist on systems that > > ship both. > > No future tense needed, it's been in the universe repo for three releases > already, and now it's in the main one: The future tense was for Python3 being 'shipped' with Ubuntu. If I understood what I heard correctly (which I might not have!), the next version of Ubuntu will come with Python3 pre-installed. Not as the system Python, as I said; but as you said, that doesn't matter. -- R. David Murray www.bitdance.com From rdmurray at bitdance.com Tue Jun 15 19:32:53 2010 From: rdmurray at bitdance.com (R. David Murray) Date: Tue, 15 Jun 2010 13:32:53 -0400 Subject: [Python-porting] Recommended Python version? In-Reply-To: <20100615165757.654a3eee@station2.localdomain> References: <1276603155.24369.38.camel@shane-asus-laptop> <4C1776E2.1090504@egenix.com> <20100615165757.654a3eee@station2.localdomain> Message-ID: <20100615173253.5E69E1FFBFA@kimball.webabinitio.net> On Tue, 15 Jun 2010 16:57:57 +0200, wrote: >On Tue, 15 Jun 2010 14:49:38 +0200 "M.-A. Lemburg" wrote: > > Depending on what you want to do with Python, it's probably best > > to try to write software that works with both Python 2 and 3 - > > especially if you are targeting a very diverse set of systems. > > > > For backporting from 3 to 2, there's a helper available > > which may be useful: http://www.startcodon.com/wordpress/?cat=3D8 > > > > Note that most recent Linux distributions do ship with Python3. > > NO ! > Ubuntu Lucid Lynx - preinstalled python 2.6.5 - and Lucid Lynx is a > LTS version > Gentoo - preinstalled python 2.6.5 > Debian Lenny - python 2.5.2 > Fedora 13 - python 2.6.4 Python2 and Python3 can coexist. Python3 is available *now* for almost all Linux platforms, and is no harder to install on Windows than Python2 is. (And since most significant Windows aps that use Python bundle it, they don't have any install issue with using Python3 at all.) > For all normal user of this systems is python 2.x installed, and not > all user are Systemadmins. A lot of user of my program for example > are really normal linux user, use it for business ! More and more linux systems will start having Python3 installed out of the box. This is already happening, and that was Marc's point. All Linux users can install software through their system's package manager, and the package managers of all Linux systems are (or will be soon) capable of installing a Python3 as a dependency. > I try since over 2 and a half years to find a solution for my project, > but there is no way to convert it. Have you asked for help here? (I'm new here, I really don't know) > A lot of libs are 2.x and no normal PC with Linux has an installed > python 3.x !! At Windows it looks not better !! Well, if you have dependencies that have not ported yet, then that's a different problem. (BIND 10 doesn't have that problem.) See above for the rest. > I hope really, that in some year a python version 3.x exists, that can > execute both, 2.x and 3.x scripts. This will not happen, but *you* can write your scripts so that they can execute on either. > The current situation is a mess, to much python 2.x scripts are in the > world, and the only solution is a python version, that allow to > execute both !! I know all arguments, but there is a big diff between > the wish to use python 3.x and the reality. What are the issues that are blocking you from using Python3, other than dependencies on libraries that haven't themselves been ported yet? -- R. David Murray www.bitdance.com From jcea at jcea.es Tue Jun 15 19:36:10 2010 From: jcea at jcea.es (Jesus Cea) Date: Tue, 15 Jun 2010 19:36:10 +0200 Subject: [Python-porting] Recommended Python version? In-Reply-To: <1276603155.24369.38.camel@shane-asus-laptop> References: <1276603155.24369.38.camel@shane-asus-laptop> Message-ID: <4C17BA0A.4000705@jcea.es> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 15/06/10 13:59, Shane Kerr wrote: > However, we have concerns because very few systems ship with Python 3 > "out of the box" still. We think that early adopters - and later all > adopters - may be put off by this requirement. > > We're considering back-porting the project from 3.1 to 2.7, and then > maintaining a version of the software that works with both the older 2.x > and the newer 3.x series. Does this make any sense? > > Do you have any other recommendations regarding Python 2 vs. Python 3? I don't write python 3 code yet, myself. So far, I use "2to3" to support 3.x. That said, in your case I would say: 1. People living in the edge can compile Python 3.x themselves. In fact they were compiling new BIND releases by hand until now. I do!. Compiling python 3 is not mre complex than compiling current BIND 9.x. 2. People that don't want to mess with low level stuff is going to use (talking about linux) a distribution. Any modern linux distribution supports dependencies, so python 3 would be a dependency. The package manager would download BIND 10 *AND* python 3.x, automatically. For instance, in Ubuntu 10.04: """ jcea at ubuntu:~$ python3 The program 'python3' is currently not installed. You can install it by typing: sudo apt-get install python3-minimal """ So, under Ubuntu it would be pain-free. 3. For "old" systems with no dependency management, the sysadmin is not going to install BIND 10 anyway. Not for a long time. If you don't need any "unported" python library, I would recommend you to stick to Python 3. PS: Having a high profile project as BIND using Python 3 would be a great push to python 3 mindshare. - -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/ . _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQCVAwUBTBe6Cplgi5GaxT1NAQIKGQQAhLB3UcQ7mcFupeGRDNRD9qa/OkAQxnkE cBQivem5HSd5gRbndAz21NWWlXcxT51Q58AZZeDGqBkDSz5J/f7MCogpo5FjLxi6 T1JTW//vxf8xGPee+NgpHukaysXGkn+BkZVL3FZ7eOjh+1QPsoNj08TDHwKezli4 uwyQyyUdyDk= =lvih -----END PGP SIGNATURE----- From regebro at gmail.com Tue Jun 15 19:49:14 2010 From: regebro at gmail.com (Lennart Regebro) Date: Tue, 15 Jun 2010 19:49:14 +0200 Subject: [Python-porting] Recommended Python version? In-Reply-To: <20100615165757.654a3eee@station2.localdomain> References: <1276603155.24369.38.camel@shane-asus-laptop> <4C1776E2.1090504@egenix.com> <20100615165757.654a3eee@station2.localdomain> Message-ID: On Tue, Jun 15, 2010 at 16:57, J?rgen Hamel wrote: > I try since over 2 and a half years to find a solution for my project, but there is no way to convert it. Well, what's the problem? > A lot of libs are 2.x This is true, and here you can only wait, or and no normal PC with Linux has an installed python 3.x !! At Windows it looks not better !! > > I hope really, that in some year a python version 3.x exists, that can execute both, 2.x and 3.x scripts. > The current situation is a mess, to much python 2.x scripts are in the world, and the only solution is a > python version, that allow ?to execute both !! I know all arguments, but there is a big diff between the > wish to use python 3.x and the reality. > > > bye > J?rgen > -- > Cyrus-Computer GmbH Linux Server Support J?rgen Hamel > Cuon - Warenwirtschaft mit Linux ?http://www.cuon.org > Twitter: cuonOne ? ?Jabber: jhamel at cuonsim2.de > > _______________________________________________ > Python-porting mailing list > Python-porting at python.org > http://mail.python.org/mailman/listinfo/python-porting > > From martin at v.loewis.de Tue Jun 15 21:15:59 2010 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Tue, 15 Jun 2010 21:15:59 +0200 Subject: [Python-porting] Recommended Python version? In-Reply-To: <1276603155.24369.38.camel@shane-asus-laptop> References: <1276603155.24369.38.camel@shane-asus-laptop> Message-ID: <4C17D16F.1030109@v.loewis.de> > Do you have any other recommendations regarding Python 2 vs. Python 3? Let me stress what others may have implied: when bind 10 will ship (i.e. three years from now), every system that comes with Python will also have python3 available for installation readily, perhaps (but not necessarily) with the exception of OSX (as Apple doesn't really have lots of optional packages on the installation media). Of course, OSX binaries will be available from python.org. Notice that three years from now, Python 2.6 will not receive any security updates anymore (at least not from python.org), and 2.7 will be the only (and last) 2.x release. Of course, system vendors will continue to ship older Python releases, and manage security fixes themselves. Also, in three years, Python 3.2 will have seen its last bug fix release, and be in security-fix-only mode (along with 3.1); the current release will be Python 3.3. So I'd claim that an effort to continue supporting 2.7 for a new product is likely a waste of time, and would lead to code clutter. Regards, Martin From jhamel at cyrus-computer.de Tue Jun 15 20:10:43 2010 From: jhamel at cyrus-computer.de (=?UTF-8?B?SsO8cmdlbg==?= Hamel) Date: Tue, 15 Jun 2010 20:10:43 +0200 Subject: [Python-porting] Recommended Python version? In-Reply-To: <20100615173253.5E69E1FFBFA@kimball.webabinitio.net> References: <1276603155.24369.38.camel@shane-asus-laptop> <4C1776E2.1090504@egenix.com> <20100615165757.654a3eee@station2.localdomain> <20100615173253.5E69E1FFBFA@kimball.webabinitio.net> Message-ID: <20100615201043.293f4b08@station2.localdomain> On Tue, 15 Jun 2010 13:32:53 -0400 "R. David Murray" wrote: > Python2 and Python3 can coexist. Python3 is available *now* for almost > all Linux platforms, and is no harder to install on Windows than Python2 > is. (And since most significant Windows aps that use Python bundle it, > they don't have any install issue with using Python3 at all.) > oh yes, but we have luck and it is NOT the standard Installation > > For all normal user of this systems is python 2.x installed, and not > > all user are Systemadmins. A lot of user of my program for example > > are really normal linux user, use it for business ! > > More and more linux systems will start having Python3 installed out > of the box. This is already happening, and that was Marc's point. > All Linux users can install software through their system's package > manager, and the package managers of all Linux systems are (or will > be soon) capable of installing a Python3 as a dependency. > Sorry, perhaps my bad English, mostly all users of my program didn`t know how to install a program. They didn`t know what a paket manager is. And just this last week I have the first time of my project-life setup a deb-Installer. > > I try since over 2 and a half years to find a solution for my project, > > but there is no way to convert it. > > Have you asked for help here? (I'm new here, I really don't know) I need no help for porting, I will simple not do this work until it is really needet ! And I think, the next 10 years it is not needet ! > > A lot of libs are 2.x and no normal PC with Linux has an installed > > python 3.x !! At Windows it looks not better !! > > Well, if you have dependencies that have not ported yet, then that's > a different problem. (BIND 10 doesn't have that problem.) See above > for the rest. > > > I hope really, that in some year a python version 3.x exists, that can > > execute both, 2.x and 3.x scripts. > > This will not happen, but *you* can write your scripts so that they > can execute on either. > I do that perhaps in some years, perhaps not . > > The current situation is a mess, to much python 2.x scripts are in the > > world, and the only solution is a python version, that allow to > > execute both !! I know all arguments, but there is a big diff between > > the wish to use python 3.x and the reality. > > What are the issues that are blocking you from using Python3, other than > dependencies on libraries that haven't themselves been ported yet? > I checked it just last year and there are the most packages that I need, are not ported, so the twisted ( web, mail, words ) packages. Also reportlab and pygtk seems have some trouble with unicode and str. Other are the database driver. And for a lot of packages I didn`t know it, perhaps is there a central internetsite who ported packages are listed ? (gtkmozembed, gtksourceview, imaging with sane backend, and so on !! ) And some of the other packages will never ported, I must do that then myself. And then, it is only a lot of work for me ( new installer, new dependencies) for no advantages. My Project is very soon 3x compatible, mostly only some 1000 prints must changes, that can do a script. But last year also they say, that python3 is slower , I don`t know. And really, a lot of work only for so few changes, that is not my way. 2 Years ago I thought, it was a good and nice thing to change to python3, but for me it is now clear, that I must wait 5 or 10 years to port my project. bye J?rgen -- Cyrus-Computer GmbH Linux Server Support J?rgen Hamel Cuon - Warenwirtschaft mit Linux http://www.cuon.org Twitter: cuonOne Jabber: jhamel at cuonsim2.de -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From solipsis at pitrou.net Thu Jun 24 16:23:43 2010 From: solipsis at pitrou.net (Antoine Pitrou) Date: Thu, 24 Jun 2010 14:23:43 +0000 (UTC) Subject: [Python-porting] Recommended Python version? References: <1276603155.24369.38.camel@shane-asus-laptop> Message-ID: Hello Shane, > Apologies if this is not the right list for this question, but there are > many Python lists and I wasn't sure which to approach. > > We started the BIND 10 project a year ago, and picked Python 3 because > we don't expect the software to be production-ready until after 3 years > of work. What will Python be used for? If it's used as an embedded interpreter (e.g. for creating plugins) then it's a no-brainer really: the interpreter will be linked into your binary and there's no reason not to go with Python 3. The language is streamlined compared to Python 2, which makes it probably easier to use for almost everyone except people already expert in Python 2. If it's used for separate scripts or utility programs, I would also recommend Python 3 because, two months from now, 3.x will be the only actively developed branch. 2.7 is scheduled for release in a couple of weeks and it's the last feature release in the 2.x branch. As Martin explained, in two or three years the Python version of choice will be 3.2/3.3. (besides, you probably already know that compiling Python is easy and fast; all is needed, basically, is a C compiler and a reasonably comprehensive standard C library; you could even include your own local copy of Python 3 in your build process if you are really picky about not introducing dependencies) > We're considering back-porting the project from 3.1 to 2.7, and then > maintaining a version of the software that works with both the older 2.x > and the newer 3.x series. Does this make any sense? If many of your users ask loudly for it, then perhaps it makes sense. I don't think there's much point in doing it proactively, though. It will create an additional maintenance burden, and might actually confuse your users. Regards Antoine. From dmalcolm at redhat.com Thu Jun 24 17:44:32 2010 From: dmalcolm at redhat.com (David Malcolm) Date: Thu, 24 Jun 2010 11:44:32 -0400 Subject: [Python-porting] Recommended Python version? In-Reply-To: <20100615165757.654a3eee@station2.localdomain> References: <1276603155.24369.38.camel@shane-asus-laptop> <4C1776E2.1090504@egenix.com> <20100615165757.654a3eee@station2.localdomain> Message-ID: <1277394272.19477.4.camel@surprise> On Tue, 2010-06-15 at 16:57 +0200, J?rgen Hamel wrote: > On Tue, 15 Jun 2010 14:49:38 +0200 > "M.-A. Lemburg" wrote: > > > Shane Kerr wrote: > > > > We started the BIND 10 project a year ago, and picked Python 3 because > > > we don't expect the software to be production-ready until after 3 years > > > of work. > > > > > > However, we have concerns because very few systems ship with Python 3 > > > "out of the box" still. We think that early adopters - and later all > > > adopters - may be put off by this requirement. > > > > > > We're considering back-porting the project from 3.1 to 2.7, and then > > > maintaining a version of the software that works with both the older 2.x > > > and the newer 3.x series. Does this make any sense? > > > > FULL ACK, but I do with my project ( http://www.cuon.org ) for the next years only support > python 2.x. look above for my arguments. > > > Depending on what you want to do with Python, it's probably best > > to try to write software that works with both Python 2 and 3 - > > especially if you are targeting a very diverse set of systems. > > > > For backporting from 3 to 2, there's a helper available > > which may be useful: http://www.startcodon.com/wordpress/?cat=8 > > > > Note that most recent Linux distributions do ship with Python3. > > NO ! > Ubuntu Lucid Lynx - preinstalled python 2.6.5 - and Lucid Lynx is a LTS version > Gentoo - preinstalled python 2.6.5 > Debian Lenny - python 2.5.2 > Fedora 13 - python 2.6.4 Fedora 13 ships both python 2 and python 3 stacks, which are installable in parallel: in addition to the "python" rpm which is 2.6.4, there's a "python3" rpm, which is 3.1.2. We ship quite a few python 3 modules on top of the core runtime. See: https://fedoraproject.org/wiki/Features/Python3F13#Porting_status for the gory details. Hope this is helpful Dave From benjamin at python.org Tue Jun 29 22:57:06 2010 From: benjamin at python.org (Benjamin Peterson) Date: Tue, 29 Jun 2010 15:57:06 -0500 Subject: [Python-porting] [ANN] Six, utilities for supporting Python 2 and 3 with the same code base Message-ID: I've just released for the first time six, a set of helpers for maintaining a code base on Python 2 and 3 simultaneously. It includes fake byte and unicode literals and wrappers for syntax changes between the languages. The license is MIT. You can download it on PyPi: http://pypi.python.org/pypi/six or read the documentation: http://packages.python.org/six/ Bugs can be reported to the Launchpad page: http://bugs.launchpad.net/python-six -- Regards, Benjamin From brett at python.org Wed Jun 30 21:18:38 2010 From: brett at python.org (Brett Cannon) Date: Wed, 30 Jun 2010 12:18:38 -0700 Subject: [Python-porting] [ANN] Six, utilities for supporting Python 2 and 3 with the same code base In-Reply-To: References: Message-ID: On Tue, Jun 29, 2010 at 13:57, Benjamin Peterson wrote: > I've just released for the first time six, a set of helpers for > maintaining a code base on Python 2 and 3 simultaneously. It includes > fake byte and unicode literals and wrappers for syntax changes between > the languages. The license is MIT. > > You can download it on PyPi: http://pypi.python.org/pypi/six > or read the documentation: http://packages.python.org/six/ > > Bugs can be reported to the Launchpad page: http://bugs.launchpad.net/python-six I was actually thinking about doing this; you beat me to it! =) Looks good overall. Only three suggestions. One is that the documentation for const is a little confusing; I would move the example to the end as I thought that dispatch_types was an actual function in the module instead of just example usage. Two, is there a need for a function to get the currently raised exception (especially without the traceback to prevent accidental circular loops)? Since that part of the syntax changed it would probably be good to have a function to call which returns the raised exception. Don't remember if the 'with' statement cleans up its variables, but if it does then the traceback object could be exposed on a context manager w/o leaking. And lastly, a link back to the PyPI page from the packages.python.org pages would be good in case the docs end up ranking higher in searches than the PyPI page. From benjamin at python.org Wed Jun 30 22:24:49 2010 From: benjamin at python.org (Benjamin Peterson) Date: Wed, 30 Jun 2010 15:24:49 -0500 Subject: [Python-porting] [ANN] Six, utilities for supporting Python 2 and 3 with the same code base In-Reply-To: References: Message-ID: 2010/6/30 Brett Cannon : > On Tue, Jun 29, 2010 at 13:57, Benjamin Peterson wrote: >> I've just released for the first time six, a set of helpers for >> maintaining a code base on Python 2 and 3 simultaneously. It includes >> fake byte and unicode literals and wrappers for syntax changes between >> the languages. The license is MIT. >> >> You can download it on PyPi: http://pypi.python.org/pypi/six >> or read the documentation: http://packages.python.org/six/ >> >> Bugs can be reported to the Launchpad page: http://bugs.launchpad.net/python-six > > I was actually thinking about doing this; you beat me to it! =) > > Looks good overall. Only three suggestions. One is that the > documentation for const is a little confusing; I would move the > example to the end as I thought that dispatch_types was an actual > function in the module instead of just example usage. Moved, thank you. > > Two, is there a need for a function to get the currently raised > exception (especially without the traceback to prevent accidental > circular loops)? Since that part of the syntax changed it would > probably be good to have a function to call which returns the raised > exception. Don't remember if the 'with' statement cleans up its > variables, but if it does then the traceback object could be exposed > on a context manager w/o leaking. I believe sys.exc_info()[:2] is still the correct way in both Python versions. > > And lastly, a link back to the PyPI page from the packages.python.org > pages would be good in case the docs end up ranking higher in searches > than the PyPI page. Done. -- Regards, Benjamin From regebro at gmail.com Wed Jun 30 22:32:49 2010 From: regebro at gmail.com (Lennart Regebro) Date: Wed, 30 Jun 2010 22:32:49 +0200 Subject: [Python-porting] [ANN] Six, utilities for supporting Python 2 and 3 with the same code base In-Reply-To: References: Message-ID: On Wed, Jun 30, 2010 at 21:18, Brett Cannon wrote: > I was actually thinking about doing this; you beat me to it! =) Me three! :-) I haven't looked at the code yet, just the docs. I have a suggestion for an addition, my bites-class. It's a subclass for bytes or str (depending on Python version) that enables you to do slicing of binary data with the same API both under Python 2 and Python 3. Like so: >>> from bites import Bites >>> data = Bites(open("thefile", 'rb').read()) >>> data.itemint(3) 75 >>> [x for x in data] 32, 45, 112, 75, 30 Otherwise you'll get characters under Python 2 and integers under Python 3. I attached it, feel free to add it if you like. -- Lennart Regebro: http://regebro.wordpress.com/ Python 3 Porting: http://python3porting.com/ +33 661 58 14 64 -------------- next part -------------- A non-text attachment was scrubbed... Name: bites.py Type: text/x-python Size: 859 bytes Desc: not available URL: