◐ Shell
clean mode source ↗

bpo-27340: Use memoryview in SSLSocket.sendall() by tiran · Pull Request #3384 · python/cpython

pitrou

vadmium

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>
Signed-off-by: Christian Heimes <christian@python.org>

@tiran tiran deleted the bpo-27340-ssl-sendall branch

September 7, 2017 21:18

tiran added a commit to tiran/cpython that referenced this pull request

Sep 7, 2017
* 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 888bbdc)

tiran added a commit that referenced this pull request

Sep 7, 2017
* 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 888bbdc)