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

TypeError: As of 3.10, the *loop* parameter was removed from Queue() since it is no longer necessary #9

Open
kero3009destiny opened this issue Apr 14, 2024 · 1 comment

Comments

@kero3009destiny
Copy link

Same issue on Windows Python3.11 and Linux Python3.10.

i sure do love breaking changes in python!

@toasta
Copy link

toasta commented May 17, 2024

You can apply this patch to aiokrpc/server.py

--- venv/lib/python3.10/site-packages/aiokrpc/server.py	2024-05-17 09:26:43.999917076 +0200
+++ /tmp/server.py	2024-05-17 09:25:19.004655003 +0200
@@ -83,13 +83,13 @@
 
     # region Query implementation
     async def _catch_response(self, key):
-        queue = asyncio.Queue(loop=self.loop)
+        queue = asyncio.Queue()
 
         self.requests[key] = queue
         try:
             for attempt in range(3):
                 try:
-                    rt, response = await asyncio.wait_for(queue.get(), 10, loop=self.loop)
+                    rt, response = await asyncio.wait_for(queue.get(), 10)
                     if rt == "e":
                         raise KRPCErrorResponse(response)
                     else:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants