Opened 4 years ago

Closed 4 years ago

#5972 enhancement closed fixed (fixed)

Port twisted.internet.error to Python 3

Reported by: Itamar Turner-Trauring Owned by: Itamar Turner-Trauring
Priority: normal Milestone: Python 3.3 Minimal
Component: core Keywords:
Cc: Branch: branches/ierror-py3-5972
branch-diff, diff-cov, branch-cov, buildbot
Author: itamarst

Description

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

Change History (6)

comment:1 Changed 4 years ago by itamarst

Author: itamarst
Branch: branches/ierror-py3-5972

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

comment:2 Changed 4 years ago by Itamar Turner-Trauring

Keywords: review added
Owner: changed from Itamar Turner-Trauring to Jean-Paul Calderone

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 4 years ago by Jean-Paul Calderone

Status: newassigned

comment:4 Changed 4 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: changed from Jean-Paul Calderone to Itamar Turner-Trauring
Status: assignednew
  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 4 years ago by Itamar Turner-Trauring

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 4 years ago by itamarst

Resolution: fixed
Status: newclosed

(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.