Comments (5)
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.
@redoc23, @wallyqs
Unfortunately, this doesn't fix the error.
- 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'
- 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.
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.
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.
@AdolfoVillalobos I can try to take a look if you send the PR
from stan.py.
Related Issues (20)
- Do NATS has asynchronous publisher in another language besides Python? HOT 3
- Inconsistent naming of subscription inbox compare to other clients
- pending_limits implications
- Support for PINGs from client to server to detect connection loss
- How to handle max_payload limit? HOT 1
- Retrieve GUID from subscription msg HOT 3
- Document connection lost handler usage and reconnection examples
- Cannot reconnect after connection is lost due to PING HOT 1
- Do you have plans and timelines for supporting sync subscriptions? HOT 4
- Canonical example for systemd
- Lost data for subscription
- any examples how to send binary data (with protobuf) ? HOT 2
- How to using with Django?
- [DBG] Skipping redelivery to subid=<> due to missed client heartbeat
- ModuleNotFoundError: No module named 'nats.aio' HOT 3
- how to get all available messages and exit ? HOT 1
- Reconnection problem after server reboot HOT 2
- Using synchronous sc.publish ?
- unittest.makeSuite() is deprecated and will be removed in Python 3.13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stan.py.