[issue37404] asyncio sock_recv blocks on ssl sockets.

2020-02-03 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2020-02-02 Thread Ido Michael


Ido Michael  added the comment:

Sorry it broke the version, what could I have done to avoid this?
Also can we close this issue?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-09 Thread Christian Heimes


Christian Heimes  added the comment:

The patch broke Python builds without ssl support and caused a minor 
performance regression in hot paths. I changed the code to only perform the 
check in debug mode.

--
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-09 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +17004
pull_request: https://github.com/python/cpython/pull/17526

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 930cef2770b641f49e69b67840daaa53b65cd0e0 by Andrew Svetlov in 
branch '3.8':
[3.8] bpo-37404: Raising value error if an SSLSocket is passed to asyncio 
functions (GH-16457) (#17496)
https://github.com/python/cpython/commit/930cef2770b641f49e69b67840daaa53b65cd0e0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset a85066df9423d381e6b233469b00db55563a9f80 by Miss Islington (bot) 
in branch '3.7':
bpo-37404: Raising value error if an SSLSocket is passed to asyncio functions 
(GH-16457)
https://github.com/python/cpython/commit/a85066df9423d381e6b233469b00db55563a9f80


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +16974
pull_request: https://github.com/python/cpython/pull/17496

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset 892f9e0777f262d366d4747a54c33a1c15a49da6 by Miss Islington (bot) 
(idomic) in branch 'master':
 bpo-37404: Raising value error if an SSLSocket is passed to asyncio functions 
(GH-16457)
https://github.com/python/cpython/commit/892f9e0777f262d366d4747a54c33a1c15a49da6


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-12-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16973
pull_request: https://github.com/python/cpython/pull/17495

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-09-28 Thread Ido Michael


Ido Michael  added the comment:

Fixed this issue since the CLA of the past user wasn't signed.

Added a check for the socket type in each of the methods: 
sock_recv, sock_recv_into, sock_sendall, sock_connect, sock_accept.

PR: GH-16457

--
nosy: +Ido Michael

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-09-28 Thread Ido Michael


Change by Ido Michael :


--
pull_requests: +16037
pull_request: https://github.com/python/cpython/pull/16457

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-09-13 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
keywords: +easy, newcomer friendly

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-06-28 Thread Akshay Takkar


Change by Akshay Takkar :


--
keywords: +patch
pull_requests: +14274
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14457

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-06-26 Thread Akshay Takkar


Akshay Takkar  added the comment:

Ah, I see. Yes, raising an exception would probably be very useful. Thanks for 
the info.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-06-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Use asyncio transports or streams.
sock_recv() is a low-level API with a very limited audience.

wrapped ssl socket provides a synchronous interface only.

Perhaps we should raise an exception if SSLSocket is passed into asyncio 
functions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-06-26 Thread Akshay Takkar


Akshay Takkar  added the comment:

Can you please elaborate on how to get around this issue?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-06-25 Thread Christian Heimes


Christian Heimes  added the comment:

You can't use sock_recv() with a wrapped SSL socket. A SSLSocket behaves 
differently because there is user-level buffering. The connection operates on 
TLS frames and only hands off data after it has been decrypted and verified. 
asyncio uses wrap_bio().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-06-25 Thread Akshay Takkar


New submission from Akshay Takkar :

I'm working on a server that uses sock_recv from asyncio.
await sock_recv(socket, n) never returns if socket is wrapped in ssl using the 
wrap_socket function from the ssl module.
I think the problem stated in this stackoverflow question could be the reason: 
https://stackoverflow.com/questions/40346619/behavior-of-pythons-select-with-partial-recv-on-ssl-socket

--
assignee: christian.heimes
components: SSL, asyncio
files: server_client
messages: 346550
nosy: AkshayTakkar, asvetlov, christian.heimes, yselivanov
priority: normal
severity: normal
status: open
title: asyncio sock_recv blocks on ssl sockets.
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48437/server_client

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com