-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use python-modernize to make py code Python 3 compatible #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Doesn't affect the position
|
Hey @takluyver, I checked out your branch and copied (venv3) [venv3] ~/github/avro/lang/py/src/avro/tests $ python run_tests.py 23:23:11
...............................2017-07-04 23:23:15,261 INFO test_ipc.py:118 : Echo RPC Server listening on 127.0.0.1:46881
2017-07-04 23:23:15,261 INFO test_ipc.py:119 : RPC socket: <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 46881)>
2017-07-04 23:23:15,261 INFO ipc.py:179 : Sending handshake request: {'serverHash': b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85', 'clientHash': b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85'}
2017-07-04 23:23:15,262 INFO ipc.py:204 : writing request: {'ping': {'timestamp': 31415, 'text': 'hello ping'}}
2017-07-04 23:23:15,262 INFO ipc.py:654 : Serialized request: b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85\x00\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85\x00\x00\x08ping\xee\xea\x03\x14hello ping'
2017-07-04 23:23:15,263 INFO ipc.py:412 : Processing handshake request: {'meta': None, 'clientProtocol': None, 'serverHash': b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85', 'clientHash': b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85'}
2017-07-04 23:23:15,263 INFO ipc.py:441 : Handshake response: {'match': 'BOTH'}
2017-07-04 23:23:15,263 INFO ipc.py:375 : Processing request: {'ping': {'timestamp': 31415, 'text': 'hello ping'}}
2017-07-04 23:23:15,263 INFO test_ipc.py:90 : Message: {"request": [{"type": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Ping", "fields": [{"type": "long", "name": "timestamp", "default": -1}, {"type": "string", "name": "text", "default": ""}]}, "name": "ping"}], "errors": [], "response": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Pong", "fields": [{"type": "long", "name": "timestamp", "default": -1}, {"type": "org.apache.avro.ipc.echo.Ping", "name": "ping"}]}}
2017-07-04 23:23:15,263 INFO test_ipc.py:91 : Request: {'ping': {'timestamp': 31415, 'text': 'hello ping'}}
2017-07-04 23:23:15,264 INFO ipc.py:656 : Serialized response: b'\x00\x00\x00\x00\x00\x00\x80\xf0\xe0\xeb\xa1W\xee\xea\x03\x14hello ping'
127.0.0.1 - - [04/Jul/2017 23:23:15] "POST / HTTP/1.1" 200 -
2017-07-04 23:23:15,264 INFO ipc.py:665 : Response sent
2017-07-04 23:23:15,264 INFO ipc.py:219 : Processing handshake response: {'serverHash': None, 'match': 'BOTH', 'serverProtocol': None, 'meta': None}
2017-07-04 23:23:15,265 INFO test_ipc.py:143 : Received echo response: {'ping': {'timestamp': 31415, 'text': 'hello ping'}, 'timestamp': 1499190795264}
2017-07-04 23:23:15,265 INFO ipc.py:179 : Sending handshake request: {'serverHash': b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85', 'clientHash': b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85'}
2017-07-04 23:23:15,265 INFO ipc.py:204 : writing request: {'ping': {'timestamp': 123456, 'text': 'hello again'}}
2017-07-04 23:23:15,266 INFO ipc.py:654 : Serialized request: b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85\x00\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85\x00\x00\x08ping\x80\x89\x0f\x16hello again'
2017-07-04 23:23:15,266 INFO ipc.py:412 : Processing handshake request: {'meta': None, 'clientProtocol': None, 'serverHash': b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85', 'clientHash': b'\xce\x8a<\x94i\x95\xabb*\x81\xf3\xa4t\x99;\x85'}
2017-07-04 23:23:15,266 INFO ipc.py:441 : Handshake response: {'match': 'BOTH'}
2017-07-04 23:23:15,266 INFO ipc.py:375 : Processing request: {'ping': {'timestamp': 123456, 'text': 'hello again'}}
2017-07-04 23:23:15,266 INFO test_ipc.py:90 : Message: {"request": [{"type": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Ping", "fields": [{"type": "long", "name": "timestamp", "default": -1}, {"type": "string", "name": "text", "default": ""}]}, "name": "ping"}], "errors": [], "response": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Pong", "fields": [{"type": "long", "name": "timestamp", "default": -1}, {"type": "org.apache.avro.ipc.echo.Ping", "name": "ping"}]}}
2017-07-04 23:23:15,266 INFO test_ipc.py:91 : Request: {'ping': {'timestamp': 123456, 'text': 'hello again'}}
2017-07-04 23:23:15,267 INFO ipc.py:656 : Serialized response: b'\x00\x00\x00\x00\x00\x00\x84\xf0\xe0\xeb\xa1W\x80\x89\x0f\x16hello again'
127.0.0.1 - - [04/Jul/2017 23:23:15] "POST / HTTP/1.1" 200 -
2017-07-04 23:23:15,267 INFO ipc.py:665 : Response sent
2017-07-04 23:23:15,267 INFO ipc.py:219 : Processing handshake response: {'serverHash': None, 'match': 'BOTH', 'serverProtocol': None, 'meta': None}
2017-07-04 23:23:15,267 INFO test_ipc.py:149 : Received echo response: {'ping': {'timestamp': 123456, 'text': 'hello again'}, 'timestamp': 1499190795266}
...................
----------------------------------------------------------------------
Ran 50 tests in 2.114s
OK |
|
There's a |
As discussed in #133.
This still passes the tests with Python 2, but I can't work out how to test with Python 3 - running
ant -Dpython=python3 testhangs at this point: