Ticket #6142 enhancement closed fixed

Opened 7 months ago

Last modified 7 months ago

Port twisted.internet.ssl to Python 3

Reported by: itamar Owned by: itamar
Priority: normal Milestone: Python 3.3 Minimal
Component: core Keywords:
Cc: Branch: branches/ssl-py3-6142
Author: itamarst Launchpad Bug:

Description

twisted.internet.ssl should run on Python 3.

Change History

1

Changed 7 months ago by itamarst

  • branch set to branches/ssl-py3-6142
  • branch_author set to itamarst

(In [36308]) Branching to 'ssl-py3-6142'

2

Changed 7 months ago by itamar

This will include twisted.test.test_ssl, but not twisted.internet.test.test_tls, which depends on SSL endpoints (#6157), which in turn depends on this ticket. test_tls will have to be done separately as a result.

3

Changed 7 months ago by itamar

  • keywords review added
  • owner set to exarkun

Ready for review;  https://buildbot.twistedmatrix.com/boxes-supported?branch=/branches/ssl-py3-6142 is running.

  1. Re-enabled various places where SSL was disabled on Python 3.
  2. Usual minor fixes.
  3. Removed a little bit of duplication (e.g certPath) in the test code.

4

Changed 7 months ago by exarkun

  • owner changed from exarkun to itamar
  • keywords review removed

Thanks.

  1. twisted/test/test_ssl.py
    1. in generateCertificateFiles, FilePath.setContent is better than open/write/close.
    2. likewise for FilePath.getContent in StolenTCPTestCase.createServer
    3. ConnectionLostTestCase.test_bothSidesLoseConnection does a transport.write("a") - ie native instead of byte string. This should cause a test failure...
    4. Do any of these tests run? They all skip on the Python 3.3 builder and locally.
  2. Some code being changed has comments about ticket #6141 - not #6142?

5

Changed 7 months ago by itamar

  • keywords review added
  • owner changed from itamar to exarkun

1.1, 1.2: Fixed. 1.3: Apparently SSL.Connection.send will accept unicode. I added a hack to twisted.protocols.tls that will catch this. I also fixed the test. 1.4: They all run... if you have pyOpenSSL installed. The buildslave doesn't, but you can install it locally. I'll email Barry about improving our buildslave setup.

2: Those comments were somewhat inaccurate, the imports should probably be from the public module (i.e. twisted.internet.ssl), not _sslverify. In any case I missed them when porting _sslverify (#6141), and doing it here is reasonable since this is the public API exposing _sslverify.

 http://buildbot.twistedmatrix.com/boxes-supported?branch=/branches/ssl-py3-6142 is running.  http://buildbot.twistedmatrix.com/boxes-supported?branch=/branches/ssl-py3-6142

6

Changed 7 months ago by exarkun

  • keywords review removed
  • owner changed from exarkun to itamar

Okay, thanks. Please merge.

7

Changed 7 months ago by itamarst

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

(In [36350]) Merge ssl-py3-6142.

Author: itamar Review: exarkun Fixes: #6142

Port twisted.internet.ssl to Python 3.

Note: See TracTickets for help on using tickets.