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

mode not ready for 3.11 #19

Closed
AntonOfTheWoods opened this issue Oct 25, 2022 · 5 comments · Fixed by #24
Closed

mode not ready for 3.11 #19

AntonOfTheWoods opened this issue Oct 25, 2022 · 5 comments · Fixed by #24
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@AntonOfTheWoods
Copy link

AntonOfTheWoods commented Oct 25, 2022

In the spirit of #9

The issues were highlighted in the above issue but mitigated not fixed. The error below is because of asyncio.wait, which has had passing coroutines deprecated since 3.8 and now removed in 3.11.

As an aside, it looks like aiokafka also has plenty of these and hasn't released in over a year (with a few blockers apparently), so it looks like a ton of work to get things working with 3.11.

Checklist

  • [ x] I have included information about relevant versions
  • [x ] I have verified that the issue persists when using the master branch of Mode.

Steps to reproduce

Try to run with python 3.11

Expected behavior

Run as with <3.11

Actual behavior

Error

Full traceback

faustworker_1  |     [2022-10-25 09:01:53,673] [10] [INFO] [^---AIOKafkaConsumerThread]: Stopping... 
faustworker_1  |       ^^^^^^^^^^^^^^^                                                                                              
faustworker_1  |   File "/usr/local/lib/python3.11/site-packages/mode/threads.py", line 253, in _serve
faustworker_1  |     await self.wait_until_stopped()                                                                                
faustworker_1  |   File "/usr/local/lib/python3.11/site-packages/mode/services.py", line 1005, in wait_until_stopped
faustworker_1  |     await self.wait()                                                                                              
faustworker_1  |   File "/usr/local/lib/python3.11/site-packages/mode/services.py", line 722, in wait
faustworker_1  |     await self._wait_stopped(timeout=timeout)                                                                      
faustworker_1  |   File "/usr/local/lib/python3.11/site-packages/mode/services.py", line 794, in _wait_stopped
faustworker_1  |     done, pending = await asyncio.wait(                                                                            
faustworker_1  |                     ^^^^^^^^^^^^^^^^^^^                                                                            
faustworker_1  |   File "/usr/local/lib/python3.11/asyncio/tasks.py", line 415, in wait
faustworker_1  |     raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
faustworker_1  | TypeError: Passing coroutines is forbidden, use tasks explicitly.

Versions

  • Python version 3.11
  • Mode version 0.2.1
  • Operating system Linux (python-3.11.0-slim docker image)
@wbarnha
Copy link
Member

wbarnha commented Oct 28, 2022

We're having related issues porting this project to support 3.11. I initially opened #20 to tackle this problem but it seems we're going to need a major overhaul. There's another fork called mode-ng, and we've brought in its maintainer to assist us in supporting this project.

Regarding aiokafka, it seems a great deal of effort will be required to get it ready for 3.11.

@wbarnha
Copy link
Member

wbarnha commented Oct 31, 2022

Opened up a PR for aiokafka in aio-libs/aiokafka#863, support should come soon hopefully.

@AntonOfTheWoods
Copy link
Author

@wbarnha , that PR was merged but it looks like it just updated some build settings in preparation for something. Actually, it looks like it is now building with 3.11, so if there is still a lot of work to do, it's not clear at all how it is passing the tests... Or am I missing something?

@wbarnha
Copy link
Member

wbarnha commented Nov 7, 2022

I figure if it's passing builds and tests, aiokafka is fine. Now the main bottleneck in our efforts is updating mode-streaming for 3.11.

@wbarnha wbarnha added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Nov 18, 2022
@lqhuang
Copy link
Collaborator

lqhuang commented Nov 19, 2022

I will involve this ASAP. Sorry for busy work recently 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants