Git Product home page Git Product logo

Comments (5)

redoc23 avatar redoc23 commented on September 7, 2024

This is due to the fact that the transfer of the event loop to the Queue class from the async io package has been removed since python 3.10.
This is evidenced by the documentation:
https://docs.python.org/3/library/asyncio-queue.html#asyncio.Queue

Just try to remove the passing of the 'loop' parameter in the asyncio-nats-client library classes that are used in this asyncio-nats-streaming (stan.py) library.

from stan.py.

andrey99429 avatar andrey99429 commented on September 7, 2024

@redoc23, @wallyqs
Unfortunately, this doesn't fix the error.

  1. After removing parameter loop=self._loop from self._flush_queue = asyncio.Queue the new error occurs:

....\venv\lib\site-packages\nats\aio\client.py:319: in connect
await self._select_next_server()

async def _select_next_server(self):
await asyncio.sleep(
self.options["reconnect_time_wait"], loop=self._loop
)
TypeError: sleep() got an unexpected keyword argument 'loop'

  1. After removing parameter loop=self._loop from asyncio.sleep the following error occurs:

....\venv\lib\site-packages\nats\aio\client.py:319: in connect
await self._select_next_server()

while True:
if len(self._server_pool) == 0:
self._current_server = None
raise ErrNoServers
nats.aio.errors.ErrNoServers: nats: No servers available for connection

But the server is available.

from stan.py.

shubb30 avatar shubb30 commented on September 7, 2024

Unfortunately, simply removing references to the loop is not possible. The self._loop is what is used to create the task to ping the server, which would probably break the functionality if it were removed.

Is there any plan to update this library to work with Python 3.10?

210                self._ping_server_task = self._loop.create_task(
211                    self._ping_server())

from stan.py.

AdolfoVillalobos avatar AdolfoVillalobos commented on September 7, 2024

Hello to everyone. I understand this issue of compatibility is still present. I would be happy to contribute with a PR that helps bridging this gap, since I myself use stan in my system.

Anyone knows if the owners of the repo are still around, in order to hopefully review such a PR?

from stan.py.

wallyqs avatar wallyqs commented on September 7, 2024

@AdolfoVillalobos I can try to take a look if you send the PR

from stan.py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.