aio-libs / aiozmq

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

Remove deprecated loop argument for asyncio #178

Closed cknv closed 2 years ago

cknv commented 2 years ago

What do these changes do?

This tries to make it possible to use aiozmq on python 3.10 by removing the explicit loop parameter that has been deprecated for a while and removed in 3.10. The approach used was quite simple, I used python3.10 and ran python runtests.py until the tests started passing. There is still a fair number of warnings, but I am not entirely sure what the correct approach to those are or if they perhaps fall outside of the scope of this - I am trying to keep the changes minimal, partly due to the fact that I am not familiar with how the internals work.

However, I have not removed the loop parameter from the public API as that might make migration more difficult for users - even if the parameter should be meaningless with these changes.

I hope this is reasonable, but let me know if there is something that I have missed that needs to be addressed.

Are there changes in behavior for the user?

There should not be - but if there is, I will try to correct it.

Related issue number

I believe this would resolve:

And it would perhaps go some way to address the changes needed for:

Checklist

JelleZijlstra commented 2 years ago

Thanks! Unfortunately CI isn't happy, apparently due to some issue with Black. I'll look into upgrading Black to fix that.

Could you also add 3.10 to CI in this PR, so we can verify that the library works on 3.10 with your changes?

cknv commented 2 years ago

Absolutely @JelleZijlstra ! I must have missed the pull_request section under on somehow.