Opened 3 years ago

Last modified 2 months ago

#5715 task new

Get rid of references and code specific to Python 2.5

Reported by: vperic Owned by: thijs
Priority: lowest Milestone:
Component: core Keywords:
Cc: thijs, ba.jones.me@… Branch:
Author: Launchpad Bug:

Description (last modified by thijs)

After ticket #5553 officially drops Python 2.5 support, we should get rid of code referencing Python 2.5 specifically. This should probably only be done after #5386 (the same for Python 2.3) and #5387 (2.4).

Some of these comments can be removed, some might require the removal of code as well; grep gives the following mentions of Python 2.5:

twisted/conch/checkers.py:18:    # Python 2.5 got spwd to interface with shadow passwords
twisted/internet/selectreactor.py:117:            # subclass, but on Python 2.5 and earlier it is not.)
twisted/python/filepath.py:340:            # Under Python 2.5 on Windows, WindowsError has a winerror
twisted/python/filepath.py:355:            # ERROR_PATH_NOT_FOUND.  However, in Python 2.5,
twisted/python/filepath.py:682:    precision, call C{os.stat_float_times(True)}, or use Python 2.5.
twisted/test/test_failure.py:857:    Tests C{failure.Failure} support for generator features added in Python 2.5
wisted/trial/test/test_assertions.py:832:            # Python 2.5 and earlier, stacklevel of 0 resulted in a warning
twisted/web/_flatten.py:314:            # In Python 2.5, after an exception, a generator's gi_frame is

And everything around Python <= 2.6:

twisted/__init__.py:16:    if version < (2, 6):
twisted/logger/_global.py:209:            if sys.version_info < (2, 6):
twisted/logger/test/test_flatten.py:149:            if sys.version_info[:2] == (2, 6):
twisted/python/zippath.py:21:if sys.version_info[:2] >= (2, 6):
twisted/test/test_log.py:261:        if sys.version_info >= (2, 6):
twisted/test/test_rebuild.py:195:    if sys.version_info < (2, 6):
twisted/test/test_rebuild.py:213:    if sys.version_info >= (2, 6):
twisted/test/test_twisted.py:194:    supportedPythonVersion = (2, 6)
twisted/test/test_twisted.py:640:if sys.version_info[:2] == (2, 6):
twisted/topfiles/setup.py:12:if sys.version_info < (2, 6):
twisted/topfiles/setup.py:40:if sys.version_info[:2] <= (2, 6):
twisted/trial/_synctest.py:243:        if sys.version_info[:2] > (2, 6):
twisted/internet/kqreactor.py:17:This implementation depends on Python 2.6 or higher which has kqueue support
twisted/topfiles/setup.py:13:    print >>sys.stderr, "You must use at least Python 2.6 for Twisted"

Change History (10)

comment:1 Changed 3 years ago by exarkun

  • Keywords easy removed
  • Priority changed from normal to lowest

comment:2 Changed 3 years ago by thijs

  • Cc thijs added

comment:3 Changed 2 years ago by thijs

  • Description modified (diff)

Update ticket description.

comment:4 in reply to: ↑ description ; follow-up: Changed 2 years ago by thijs

Replying to vperic:

./twisted/trial/test/test_assertions.py:724: # Python 2.5 and earlier, stacklevel of 0 resulted in a warning

This seems like a test worth to keep around.

./twisted/web/_flatten.py:314: # In Python 2.5, after an exception, a generator's gi_frame is
./twisted/python/util.py:873: 2.5's implementation of L{id} always returns positive values.

I've opened a new ticket for this so it can be deprecated at some later release (it's deprecated in 13.0 and 14+ seems a better time-frame to completely remove it).

./twisted/python/filepath.py:333: # Under Python 2.5 on Windows, WindowsError has a winerror
./twisted/python/filepath.py:348: # ERROR_PATH_NOT_FOUND. However, in Python 2.5,

These two are reported in #6627.

comment:5 in reply to: ↑ 4 Changed 2 years ago by thijs

Replying to thijs:

./twisted/python/util.py:873: 2.5's implementation of L{id} always returns positive values.

I've opened a new ticket for this so it can be deprecated at some later release (it's deprecated in 13.0 and 14+ seems a better time-frame to completely remove it).

That's ticket #6707.

comment:6 Changed 6 months ago by grimley

  • Cc ba.jones.me@… added
  • Owner set to grimley
  • Status changed from new to assigned

comment:7 Changed 6 months ago by grimley

Should the NEWS file (twisted/web/topfiles/NEWS) be left as is. Python support is added in Version 0.7.0 It seems unreasonable to remove this in as a place for historical tracking of changes.

comment:8 Changed 2 months ago by thijs

  • Owner changed from grimley to thijs
  • Status changed from assigned to new

comment:9 Changed 2 months ago by thijs

  • Description modified (diff)

update grep results (twisted 15.2.1).

comment:10 Changed 2 months ago by thijs

  • Description modified (diff)

add python < 2.6 stuff

Note: See TracTickets for help on using tickets.