Ticket #5553 task closed fixed

Opened 2 years ago

Last modified 21 months ago

Drop Python 2.5 support after Twisted 12.1 release

Reported by: itamar Owned by: vperic
Priority: normal Milestone:
Component: core Keywords:
Cc: zooko@…, thijs Branch: branches/drop-25-support-5553-2
(diff, github, buildbot, log)
Author: vperic Launchpad Bug:

Description

In order to make it easier to support Python 3, but also to reduce maintenance burden, we should drop support for Python 2.5 after our next release. Asking on the mailing list didn't bring up anyone who would have issues with this, and we'll still support it in 12.1.

Change History

1

  Changed 2 years ago by zooko

Here's the analogous ticket for Tahoe-LAFS to drop support for Python ≤ 2.5, which we've been planning to do "after the next release", for the last several releases:

 https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1658

You might be interested in my notes about which major operating systems come with which versions of Python.

2

  Changed 2 years ago by zooko

  • cc zooko@… added

3

  Changed 22 months ago by vperic

  • branch set to branches/drop-25-support-5553
  • branch_author set to vperic

(In [34599]) Create branch drop-25-support-5553

4

  Changed 22 months ago by vperic

  • keywords review added

There we go.

5

  Changed 22 months ago by thijs

  • keywords review removed
  • owner set to vperic

Thanks for working on this. I'm not sure if this ticket is about updating the documentation, like you did in the branch, or also includes actually removing workarounds etc for Python 2.5. There are still quite some references. Could you also open several new ticket for removing those references (dividing it into separate tickets reduces the amount of work for a contributor and reviewer) and put this back up for review?

And maybe you can also mention in the .removal file that Python 2.5 is in security fix mode now and was released in xxxx (? ages ago) to emphasize people should upgrade their python if they still use 2.5?

6

  Changed 22 months ago by thijs

  • cc thijs added

The references I referred to in the previous comment:

./twisted/trial/test/test_assertions.py:            # Python 2.5 and earlier, stacklevel of 0 resulted in a warning
./twisted/__init__.py:    raise RuntimeError("Twisted requires Python 2.5 or later.")
./twisted/web/xmlrpc.py:            raise RuntimeError("useDateTime requires Python 2.5 or later.")
./twisted/web/xmlrpc.py:            raise RuntimeError("useDateTime requires Python 2.5 or later.")
./twisted/web/_flatten.py:            # In Python 2.5, after an exception, a generator's gi_frame is
./twisted/topfiles/setup.py:    print >>sys.stderr, "You must use at least Python 2.5 for Twisted"
./twisted/python/filepath.py:            # Under Python 2.5 on Windows, WindowsError has a winerror
./twisted/python/filepath.py:            # ERROR_PATH_NOT_FOUND.  However, in Python 2.5,
./twisted/python/filepath.py:    precision, call C{os.stat_float_times(True)}, or use Python 2.5.
./twisted/internet/defer.py:    requirement of Python 2.5, consider the use of L{inlineCallbacks} instead,
./twisted/internet/defer.py:    regular sequential function. This function uses features of Python 2.5
./twisted/internet/test/test_sigchld.py:    # random), Python 2.5 has set_wakeup_fd but not siginterrupt.
./twisted/internet/test/test_inlinecb.py:Conditional import of C{inlinecb_tests} for Python 2.5 and greater.
./twisted/internet/selectreactor.py:            # subclass, but on Python 2.5 and earlier it is not.)
./twisted/conch/checkers.py:    # Python 2.5 got spwd to interface with shadow passwords
./twisted/test/generator_failure_tests.py:Python 2.5+ test cases for failures thrown into generators.
./twisted/words/protocols/jabber/xmpp_stringprep.py:    # We require Unicode version 3.2. Python 2.5 and later provide this as
./twisted/application/app.py:                # Python 2.5 and above supports a stream attribute

7

follow-up: ↓ 10   Changed 22 months ago by vperic

  • keywords review added
  • owner vperic deleted

I opened ticket #5715 for the removal of code references you mention; just one ticket because the same tickets for 2.3 and 2.4 are about the same size (also marked it with the easy keyword). I also changed the topfile to now read "Python 2.5 is no longer supported. Python 2.5 was released in 2006 and will no longer receive even security fixes; users are encouraged to upgrade."

8

follow-up: ↓ 9   Changed 22 months ago by exarkun

And maybe you can also mention in the .removal file that Python 2.5 is in security fix mode now and was released in xxxx (? ages ago) to emphasize people should upgrade their python if they still use 2.5?

Why are we telling people about CPython's release timeline? We should leave that up to python.org.

9

in reply to: ↑ 8   Changed 22 months ago by thijs

Replying to exarkun:

Why are we telling people about CPython's release timeline? We should leave that up to python.org.

I was trying to do the users of twisted a favor so they can assess more quickly why this decision was made, like mentioning the version nr of Twisted in .removal files.

10

in reply to: ↑ 7   Changed 22 months ago by thijs

  • owner set to vperic
  • keywords review removed

Replying to vperic:

I opened ticket #5715 for the removal of code references you mention; just one ticket because the same tickets for 2.3 and 2.4 are about the same size (also marked it with the easy keyword). I also changed the topfile to now read "Python 2.5 is no longer supported. Python 2.5 was released in 2006 and will no longer receive even security fixes; users are encouraged to upgrade."

If you can simplify the topfile a little to something like "Python 2.5 is no longer supported.", then merge after a successful buildbot run.

11

  Changed 22 months ago by vperic

Simplified the topfile back, running the tests now:  Build results.

12

  Changed 21 months ago by thijs

vperic, could you merge this now that we started adding Python 2.6+ code in the trunk? Thanks.

13

  Changed 21 months ago by vperic

  • branch changed from branches/drop-25-support-5553 to branches/drop-25-support-5553-2

(In [35031]) Create branch drop-25-support-5553-2

14

  Changed 21 months ago by vperic

I ordered a test run for the new branch,  build results.

15

  Changed 21 months ago by vperic

  • status changed from new to closed
  • resolution set to fixed

(In [35033]) Merge drop-25-support-5553-2: Remove support for Python 2.5

Author: vperic Reviewer: thijs Fixes: #5553

Python 2.5 is no longer supported, modify the appropriate setup files and documentation.

Note: See TracTickets for help on using tickets.