Skip to content
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

tests break with python 3.5.2 #107

Closed
RemiCardona opened this issue Aug 17, 2016 · 2 comments
Closed

tests break with python 3.5.2 #107

RemiCardona opened this issue Aug 17, 2016 · 2 comments
Labels

Comments

@RemiCardona
Copy link
Contributor

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, 1f5460a 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
Copy link
Contributor

smurfix commented Aug 25, 2016

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
Copy link
Contributor Author

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

RemiCardona added a commit that referenced this issue Sep 23, 2016
Starting with 3.5.2, the writer object is set to None in the stream
protocol.  Ideally, we should prevent further use of the protocol object
once the connection is closing or is closed.  But until we do, just make
sure we don't call close() twice as it's just silly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants