You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bummer, and was hard to track down. The way non-blocking SSL-wrapped sockets function changed between python 2 and 3, and we need to change some stuff, or re-write how we do communication in python 3 (cpython AND pypy).
I managed to reproduce it with a more basic example (I’ll paste below). It looks to me like the behavior changed so the ssl wrapping copies the original socket and closes the old one or something. I think we’ll need to update test_connection to do a different thing for an ssl socket, like they talk about here: https://docs.python.org/3/library/ssl.html#notes-on-non-blocking-sockets
I think we should add an ssl test, probably involving a test server locally. I don’t really want to write a test server in every language, and one already exists in the ruby agent, so maybe the ebst move is to update the test server in the ruby agent to handle ssl and then fire up that test server from the python agent for the tests.
Another thing that’s worrysome is how much of a breaking change in python this seems to be. It might be worth seeing if we can update the python agent tests to test multiple versions of python 3 if possible. Maybe there’s a thing like rbenv for python.
dumb code that currently results in an ssl error that I think means the connection is alive but would block at the moment:
This is a bummer, and was hard to track down. The way non-blocking SSL-wrapped sockets function changed between python 2 and 3, and we need to change some stuff, or re-write how we do communication in python 3 (cpython AND pypy).
From @jason-o-matic:
I think we should add an ssl test, probably involving a test server locally. I don’t really want to write a test server in every language, and one already exists in the ruby agent, so maybe the ebst move is to update the test server in the ruby agent to handle ssl and then fire up that test server from the python agent for the tests.
Another thing that’s worrysome is how much of a breaking change in python this seems to be. It might be worth seeing if we can update the python agent tests to test multiple versions of python 3 if possible. Maybe there’s a thing like rbenv for python.
dumb code that currently results in an ssl error that I think means the connection is alive but would block at the moment:
It looks like https://docs.python.org/3/library/asyncio.html#module-asyncio is probably the thing that should be used in python3. Anyway, probably the next move is to disable secure in python 3 and print out a warning if someone enables it.
Depending on how good support for asyncio is on windows, this may also help with windows support (#13) for at least python 3.
The text was updated successfully, but these errors were encountered: