#5972 enhancement closed fixed (fixed)

Port twisted.internet.error to Python 3

Reported by: itamar Owned by: itamar
Priority: normal Milestone: Python 3.3 Minimal
Component: core Keywords:
Cc: Branch: branches/ierror-py3-5972
(diff, github, buildbot, log)
Author: itamarst Launchpad Bug:

Description

twisted.internet.error needs to run on Python 3.3.

Change History (6)

comment:1 Changed 23 months ago by itamarst

  • Author set to itamarst
  • Branch set to branches/ierror-py3-5972

(In [35629]) Branching to 'ierror-py3-5972'

comment:2 Changed 23 months ago by itamar

  • Keywords review added
  • Owner changed from itamar to exarkun

The getConnectError API does not appear to be used well in Twisted, e.g. I'm pretty sure the gaierror code path is never hit. But, at least there's tests now. The changes to the code were because Python 3 doesn't have __getitem__ on Exceptions anymore.

http://buildbot.twistedmatrix.com/boxes-supported?branch=/branches/ierror-py3-5972 was started, haven't looked at it yet.

comment:3 Changed 23 months ago by exarkun

  • Status changed from new to assigned

comment:4 Changed 23 months ago by exarkun

  • Keywords review removed
  • Owner changed from exarkun to itamar
  • Status changed from assigned to new
  1. in test_error.py, please move the stdlib imports above the twisted imports.
  2. in error.py, perhaps the comment about Python 2.2 could be adjusted? It seems like the author probably meant "Python 2.2 and newer", which effectively means all Python versions now. I suspect socket.gaierror is always present now, too, but we can leave actually changing the logic for another time (file a ticket?)

Otherwise looks good, please merge after addressing the above.

comment:5 Changed 23 months ago by itamar

Will do. (I couldn't BTW find any instance where an actual exception was passed in, only tuples, but maybe I missed something.)

comment:6 Changed 23 months ago by itamarst

  • Resolution set to fixed
  • Status changed from new to closed

(In [35643]) Merge ierror-py3-5972

Author: itamar
Review: exarkun
Fixes: #5972

Port twisted.internet.error to Python 3, with improved test coverage.

Note: See TracTickets for help on using tickets.