Polyconseil / aioamqp

AMQP implementation using asyncio
Other
280 stars 88 forks source link

tests break with python 3.5.2 #107

Closed RemiCardona closed 7 years ago

RemiCardona commented 8 years ago

https://travis-ci.org/Polyconseil/aioamqp/jobs/153019740

Travis switched from python 3.5.0 to 3.5.2 since the last master build and so this went unnoticed.

The upstream asyncio commit that broke the code is likely to be https://hg.python.org/cpython/rev/d1479e05ed0f. On our side, 1f5460a93d3ba35cbbd9a1224d3af1ce412369aa is most likely the guilty patch (though I don't think we want to revert that patch since the upstream commit was probably made for a very good reason).

Will look at it ASAP.

smurfix commented 8 years ago

You mean this one?

======================================================================
ERROR: test_close (aioamqp.tests.test_connection_close.CloseTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/Polyconseil/aioamqp/aioamqp/tests/testcase.py", line 129, in tearDown
    self.loop.run_until_complete(go())
  File "/opt/python/3.5.2/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
    return future.result()
  File "/opt/python/3.5.2/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/opt/python/3.5.2/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/opt/python/3.5.2/lib/python3.5/asyncio/coroutines.py", line 121, in send
    return self.gen.send(value)
  File "/home/travis/build/Polyconseil/aioamqp/aioamqp/tests/testcase.py", line 125, in go
    yield from amqp.close()
  File "/opt/python/3.5.2/lib/python3.5/asyncio/coroutines.py", line 105, in __next__
    return self.gen.send(None)
  File "/home/travis/build/Polyconseil/aioamqp/aioamqp/protocol.py", line 122, in close
    frame.write_frame(encoder)
  File "/home/travis/build/Polyconseil/aioamqp/aioamqp/frame.py", line 379, in write_frame
    return self.writer.write(transmission.getvalue())
AttributeError: 'NoneType' object has no attribute 'write'
RemiCardona commented 8 years ago

Travis didn't catch that one. It caught 2 other tests : test_connection_lost and test_heartbeat.