Changes between and of Initial VersionVersion 6Ticket #6083


Ignore:
Timestamp:
10/08/2012 01:28:27 PM (23 months ago)
Author:
exarkun
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6083

    • Property Milestone changed from Twisted-12.3 to
  • Ticket #6083 – Description

    initial v6  
    11I'm not 100% sure which part here you consider a bug, but it definitely is rather unfortunate how it's right now: 
    22 
    3 If transport.writeSequence() is called with a generator on a vanilla TCP transport, it silently does nothing. The reason is that the iterable is checked for unicode strings first in a for-loop. When it tries to reuse the iterable for actually sending data, it’s exhausted so nothing is written: http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.2.0/twisted/internet/abstract.py#L340 
     3If `transport.writeSequence()` is called with a generator on a vanilla TCP transport, it silently does nothing. The reason is that the iterable is checked for unicode strings first in a for-loop. When it tries to reuse the iterable for actually sending data, it’s exhausted so nothing is written: http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.2.0/twisted/internet/abstract.py#L340 
    44 
    5 OTOH the TLS version doesn't check for unicode but does a simple ''.join(iovec) instead, therefor it works perfectly: http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.2.0/twisted/protocols/tls.py#L532 
     5OTOH the TLS version doesn't check for unicode but does a simple `''.join(iovec)` instead, therefor it works perfectly: http://twistedmatrix.com/trac/browser/tags/releases/twisted-12.2.0/twisted/protocols/tls.py#L532 
    66 
    77The situation means that if you write your code for TLS and start testing for vanilla, your protocols freeze and you have no idea why.