-
Notifications
You must be signed in to change notification settings - Fork 386
Move to Github Actions and python version upgrade #238
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
Not sure why the Travis checks are not triggered. It triggered well in my fork |
Maybe travis is dropping support. @bombela A small nudge. Would you have time to review this? |
Create continuous integration with Github actions
Remove un used travis ci file
Fix indentation of "with" statement
c42d5bf
to
fb1e7f9
Compare
I have removed travis support and add github actions instead. The tests are running in my own PR. Still now sure why it's not being triggered in this PR. |
@@ -162,7 +161,7 @@ def test_heartbeat_can_open_channel_client_close(): | |||
print('SERVER LOST CLIENT :)') | |||
server_hbchan.close() | |||
server.close() | |||
|
|||
client.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test test_heartbeat_can_open_channel_client_close
fails in Python 3.9 if the client is closed before the server heartbeat channel is closed. Looking at the other tests, it seemed to me that client.close()
should be called after server.close()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This defeats the purpose of this test. The point is to have the client go away. And the server to detect this by the loss of heartbeats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Then I'll change it back. What I found that the test fails on python 3.9 if the client is closed before. Any idea why it fails on Python 3.9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test itself is successful. You can clearly see the message "CLOSE CLIENT SOCKET!!!". Followed by "SERVER LOST CLIENT :)". This is the expected behavior.
Somehow the test is marked as failed. Maybe the assert_raises is not doing its job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the confirmation. I'll see if I can fix it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the issue is on nosetests. I run many times these tests on python 3.9. It never fails. Only on github it fails. Then I found one of the tests `` passing with ok
status.
tests.test_buffered_channel.test_congestion_control_server_pushing ... Traceback (most recent call last):
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgree nlet.Greenlet.run
File "/__w/zerorpc-python/zerorpc-python/tests/test_buffered_channel.py", line 429, in server_do
server_bufchan.emit('coucou', x, timeout=0) # will fail when x == 1
File "/usr/local/lib/python3.9/unittest/case.py", line 226, in __exit__
self._raiseFailure("{} not raised".format(exc_name))
File "/usr/local/lib/python3.9/unittest/case.py", line 163, in _raiseFailure
raise self.test_case.failureException(msg)
AssertionError: TimeoutExpired not raised
2021-07-13T21:28:53Z <Greenlet at 0x7efdea2d5260: server_do> failed with AssertionError
ok
AssertionError
and ok
status together shouldn't be right.
The errors can be seen in my github action build log
So, I think for now we drop supporting python 3.9 (removing the entry from ci.yml and not adding in setup.py). Then probably we can migrate from nosetests to pytest which will enable us to support 3.9 in near future!
684c64c
to
e7aec19
Compare
- Dropped 2.6, 3.4, 3.5 support - Introduced 3.6, 3.7, 3.8 - Use "bionic" on for the travis build - Pass 'async' as ** dict item in the test so it's compatible with newer versions of python - Use pyzmq 16.0.4+ as the old versions cannot be built in python 3.7 - Support modern repr of BaseException BaseException doesn't add trailing comma from version 3.7.0. Hence the test case without ',' is added as well. See also: https://bugs.python.org/issue30399
0359415
to
3acf67a
Compare
8878655
to
304ed37
Compare
@bombela Any comments? |
Not sure what @bombela thinks but it would IMO help if we break this PR into smaller ones (e.g. raise a separate PR to fix Flake8 errors) |
I agree, one PR per topic. In order of reverse dependency of course. Dropping python 2.6 might be reasonable. For other versions of python 3, I am not so sure. I hate it when things suddenly stop working after an upgrade because people ditch backward compatibility. |
Closing this PR. I woudln't have time to work on it. Feel free to take ownership. |
I wanted to fix the Travis build errors and support Python 3.7. That lead me to many other changes. Of course, you can frown.
I used Google BigQuery to check the PyPI download statistics of zerorpc before dropping support of old python versions.
versions of python
BaseException doesn't add trailing comma from version 3.7.0.
Hence the test case without ',' is added as well.
See also: https://bugs.python.org/issue30399