aio-libs / aiozmq

Asyncio (pep 3156) integration with ZeroMQ
aiozmq.readthedocs.org
BSD 2-Clause "Simplified" License
422 stars 56 forks source link

Add support for Python 3.6 and Python 3.7 #132

Closed JelleZijlstra closed 4 years ago

JelleZijlstra commented 6 years ago

Add 3.6 and 3.7 to Travis and make them pass.

blueyed commented 6 years ago

Currently it fails with a SyntaxError with 0.7.1 (which is very old already):

  File "…/project/.venv/lib/python3.7/site-packages/aiozmq/rpc/base.py", line 251
    fut = asyncio.async(coro, loop=self.loop)
                      ^
SyntaxError: invalid syntax

There have been fixes in this regard on master. So a new release alone might suffice?!

JelleZijlstra commented 6 years ago

The tests still don't pass on 3.7, and the fixes are somewhat tricky. I've been working on getting it fixed but haven't had the time yet to finish it up. After everything is green on 3.7 I'll do a release.

petterreinholdtsen commented 5 years ago

Is there an alternative to renaming the async() function to another non-reserved name?

JelleZijlstra commented 5 years ago

Yes, we can just use asyncio.ensure_future for that one. There are other problems with 3.7 that are harder to fix, so I didn't get to this yet.

blueyed commented 5 years ago

For reference: https://github.com/aio-libs/aiozmq/pull/146

hoefling commented 4 years ago

I would like to help with implementing the missing bits for 3.6/3.7 and releasing a new version. What would be the steps for that? Looking at the Travis log, there's only one test that's still failing on 3.7, the ZmqEventLoopTests.test_close_on_error due to changes in python/cpython#4365 (the fd.fileno() in _ensure_fd_no_transport is called on the closed socket, reraising the Socket operation on non-socket).

JelleZijlstra commented 4 years ago

Thanks @hoefling! Yes, that test needs to be fixed—sorry that I let this drop! Once that's done, I can cut a new release with 3.7 support. However, since 3.8 is out now, I'd love to also support 3.8 if it doesn't turn out too much trouble.

JelleZijlstra commented 4 years ago

So in summary, if you are willing to contribute a PR fixing the remaining 3.7 issue, I'd happily review and merge it.

bastianlb commented 4 years ago

@hoefling any progress on this? Am happy to help if you can point me in the right direction.

logileifs commented 4 years ago

seems like this has already been merged, will there be a new release soon with the fix included?