FAQ
I'm just about to start writing myself a C extension module, and as I
was pondering how far to make it backward compatible the following
thought sprung to mind. What's the oldest and newest version of
Python you currently write code for [1]?

I still have a fairly sizeable system that's running on Python 1.5.2
(it's slooowly being migrated across on a break/fix basis, which is the
only time the customer pays, but alas it rarely breaks), but most of the
stuff I do these days is based around 2.5.x (various flavours of .2 to
.4) as py2exe doesn't cope well with 2.6. I've done little under 2.6
(certainly nothing that would specifically use any of its features), and
apart from library changes (e.g. MIMEWriter's severe makeover) I tend to
code in a subset of Python that will allow me to run on a fairly wide
range of versions (although not as far back as 1.5.2, I have to remember
how to convert between "idioms" like list comprehensions).

So what's your version range?


1 - this won't effect my decision, it's just something I'm idly
curious about. However, I probably won't code the extension as
a type for that reason as I know the extension types have changed
between major versions.

--
Regards,
Daryl Tester

"Must have scripting experience; Pearl, Shell, Python, VBScript, Born,
Corn, Awk, Sed" -- Unix job advertisement.

Search Discussions

  • Tim Wegener at Mar 3, 2009 at 1:54 am

    Daryl Tester wrote:
    I'm just about to start writing myself a C extension module, and as I
    was pondering how far to make it backward compatible the following
    thought sprung to mind. What's the oldest and newest version of
    Python you currently write code for [1]?
    I generally base this decision based on what the slowest moving (and
    relevant/maintained) Linux distros ship. Distrowatch.com is handy for
    checking this.

    Quick survey:
    CentOS 4: 2.3
    CentOS 5: 2.4
    Fedora 7-10: 2.5
    Ubuntu 6.06 LTS: 2.4
    Ubuntu 8.04 LTS: 2.5

    Hence, I generally code for 2.4 or 2.3 depending on the intended
    audience/application. (Main significant differences from 2.3->2.4 are
    decorator syntax, generator expressions, and library module bug
    fixes/minor api changes.)

    A lot of third-party modules require 2.4, so this may also be a factor.

    Also OS X maybe relevant:
    10.3 (Panther): 2.3
    10.4 (Tiger): 2.3
    10.5 (Leopard): 2.5

    Tim
  • Ryan Verner at Mar 3, 2009 at 3:05 am
    2.3 here. Still support some apps on FC3 boxes, unfortunately!
    On 03/03/2009, at 10:52 AM, Daryl Tester wrote:

    I'm just about to start writing myself a C extension module, and as I
    was pondering how far to make it backward compatible the following
    thought sprung to mind. What's the oldest and newest version of
    Python you currently write code for [1]?

    I still have a fairly sizeable system that's running on Python 1.5.2
    (it's slooowly being migrated across on a break/fix basis, which is
    the
    only time the customer pays, but alas it rarely breaks), but most of
    the
    stuff I do these days is based around 2.5.x (various flavours of .2 to
    .4) as py2exe doesn't cope well with 2.6. I've done little under 2.6
    (certainly nothing that would specifically use any of its features),
    and
    apart from library changes (e.g. MIMEWriter's severe makeover) I
    tend to
    code in a subset of Python that will allow me to run on a fairly wide
    range of versions (although not as far back as 1.5.2, I have to
    remember
    how to convert between "idioms" like list comprehensions).

    So what's your version range?


    1 - this won't effect my decision, it's just something I'm idly
    curious about. However, I probably won't code the extension as
    a type for that reason as I know the extension types have changed
    between major versions.

    --
    Regards,
    Daryl Tester

    "Must have scripting experience; Pearl, Shell, Python, VBScript, Born,
    Corn, Awk, Sed" -- Unix job advertisement.
    --
    sapug mailing list
    sapug at python.org
    http://mail.python.org/mailman/listinfo/sapug
  • Kim Hawtin at Mar 4, 2009 at 1:25 am

    Daryl Tester wrote:
    I'm just about to start writing myself a C extension module, and as I
    was pondering how far to make it backward compatible the following
    thought sprung to mind. What's the oldest and newest version of
    Python you currently write code for [1]?

    I still have a fairly sizeable system that's running on Python 1.5.2
    (it's slooowly being migrated across on a break/fix basis, which is the
    only time the customer pays, but alas it rarely breaks), but most of the
    stuff I do these days is based around 2.5.x (various flavours of .2 to
    .4) as py2exe doesn't cope well with 2.6. I've done little under 2.6
    (certainly nothing that would specifically use any of its features), and
    apart from library changes (e.g. MIMEWriter's severe makeover) I tend to
    code in a subset of Python that will allow me to run on a fairly wide
    range of versions (although not as far back as 1.5.2, I have to remember
    how to convert between "idioms" like list comprehensions).

    So what's your version range?

    1 - this won't effect my decision, it's just something I'm idly
    curious about. However, I probably won't code the extension as
    a type for that reason as I know the extension types have changed
    between major versions.
    Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:40)
    [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2

    Python 2.4.3 (#1, Jan 14 2008, 18:31:21)
    [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2

    Python 2.3.5 (#2, Oct 16 2006, 19:19:48)
    [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2

    cheers,

    Kim
    --
    Operating Systems, Services and Operations
    Information Technology Services, The University of Adelaide
    kim.hawtin at adelaide.edu.au

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsapug @
categoriespython
postedMar 3, '09 at 12:22a
activeMar 4, '09 at 1:25a
posts4
users4
websitepython.org

People

Translate

site design / logo © 2018 Grokbase