]> granicus.if.org Git - python/commit
[3.6] bpo-27340: Use memoryview in SSLSocket.sendall() (GH-3384) (#3434)
authorChristian Heimes <christian@python.org>
Thu, 7 Sep 2017 23:59:17 +0000 (16:59 -0700)
committerGitHub <noreply@github.com>
Thu, 7 Sep 2017 23:59:17 +0000 (16:59 -0700)
commit9423f5d68874ff2e500cbe072c25f883cf754be8
treedd2a51514097619ac5ccc9fa11339585e7797e59
parent6c99b652f7909f86753b9e567ea18c95ee736e83
[3.6] bpo-27340: Use memoryview in SSLSocket.sendall() (GH-3384) (#3434)

* bpo-27340: Use memoryview in SSLSocket.sendall()

SSLSocket.sendall() now uses memoryview to create slices of data. This fix
support for all bytes-like object. It is also more efficient and avoids
costly copies.

Signed-off-by: Christian Heimes <christian@python.org>
* Cast view to bytes, fix typo

Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 888bbdc192ec4db888a294ef758cf5510442dc9a)
Lib/ssl.py
Lib/test/test_ssl.py
Misc/NEWS.d/next/Library/2017-09-06-06-50-41.bpo-27340.GgekV5.rst [new file with mode: 0644]