Geert Jansen added the comment:

Hi Victor,

see below my comments:

* SSLSocket.read(), SSLOBject.read() and _ssl._SSLSocket.read() taking a buffer 
as the second positional argument.

Both SSLSocket.read() and _SSLSocket.read() already accepted two arguments so I 
went for consistency. The former has been publicly documented in prior releases 
so I don't think it can be changed?

* versionadded for server_hostname set to 3.5

This is when it was first documented. If it's more correct to specify when it 
was first implemented then I can put it to 3.2.

* server_hostname property is idna encoded bytes instead of unicode

Agreed that it should be changes to unicode.

Currently SSLSocket.server_hostname is whatever was passed to the constructor, 
which can be unicode or an already encoded bytes instance. 
SSLObject.server_hostname on the other hand is always a bytes instance.

Should SSLSocket.server_hostname also be changed to always return unicode even 
if a bytes was passed to the constructor? I'd tend to say yes especially 
because the attribute was not documented before. But it would be a change in 
behavior.

Now that I think of it - since SSLSocket now uses SSLObject to check the 
hostname, and SSLObject exposes server_hostname as a bytes instance, is 
hostname checking currently broken for non-ascii hostnames?

* Documentation suggestions.

Mostly make sense. I will have a look.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22564>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to