[Numpy-discussion] When to stop supporting Python 2.6?

Charles R Harris charlesr.harris at gmail.com
Fri Dec 4 10:49:57 EST 2015


On Fri, Dec 4, 2015 at 2:40 AM, Julian Taylor <jtaylor.debian at googlemail.com
> wrote:

> dropping 3.2: +-0 as it would remove some extra code in our broken py3
> string handling but not much
> dropping 3.3: -1 doesn't gain us anything so far I know
> dropping 2.6: -1, I don't see not enough advantage the only issue I know
> of is an occasional set literal which gets caught by our test-suite
> immediately. Besides 2.6 is still the default in RHEL6. But if there is
> something larger which makes it worthwhile I don't know about I have no
> objections.
>

My thought is that dropping 2.6 allows a more unified code base between
Python 2 and Python3. In 2.7 we get


   - The syntax for set literals ({1,2,3} is a mutable set).
   - Dictionary and set comprehensions ({i: i*2 for i in range(3)}).
   - Multiple context managers in a single with
   <https://docs.python.org/3/reference/compound_stmts.html#with> statement.
   - A new version of the io
   <https://docs.python.org/3/library/io.html#module-io> library, rewritten
   in C for performance.
   - The ordered-dictionary type described in *PEP 372: Adding an Ordered
   Dictionary to collections*
   <https://docs.python.org/3/whatsnew/2.7.html#pep-0372>.
   - The new "," format specifier described in *PEP 378: Format Specifier
   for Thousands Separator*
   <https://docs.python.org/3/whatsnew/2.7.html#pep-0378>.
   - The memoryview
   <https://docs.python.org/3/library/stdtypes.html#memoryview> object.
   - A small subset of the importlib
   <https://docs.python.org/3/library/importlib.html#module-importlib>
   module, described below
   <https://docs.python.org/3/whatsnew/2.7.html#importlib-section>.
   - The repr() <https://docs.python.org/3/library/functions.html#repr> of
   a float x is shorter in many cases: it’s now based on the shortest
   decimal string that’s guaranteed to round back to x. As in previous
   versions of Python, it’s guaranteed that float(repr(x)) recovers x.
   - Float-to-string and string-to-float conversions are correctly rounded.
   The round() <https://docs.python.org/3/library/functions.html#round>
   function is also now correctly rounded.
   - The PyCapsule
   <https://docs.python.org/3/c-api/capsule.html#c.PyCapsule> type, used to
   provide a C API for extension modules.
   - The PyLong_AsLongAndOverflow()
   <https://docs.python.org/3/c-api/long.html#c.PyLong_AsLongAndOverflow> C
   API function.

In particular, memoryview and PyCapsule are available. Moving to Python 3.3
as a minimum provides unicode literals. Python 3.4 strikes me as the end of
the Python 3 beginning, with future Python development taking off from
there.

<snip>

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151204/fe95aa22/attachment.html>


More information about the NumPy-Discussion mailing list