This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new d7c59d4cf chore(#1103): add 3.11 to supported Python versions (#1705)
d7c59d4cf is described below

commit d7c59d4cf44123e497652e444098738d23a0df4a
Author: Tim <[email protected]>
AuthorDate: Mon Aug 7 12:20:14 2023 +0200

    chore(#1103): add 3.11 to supported Python versions (#1705)
---
 .github/workflows/pr-validation.yml                               | 2 +-
 streampipes-client-python/setup.py                                | 6 ++++--
 .../streampipes/functions/utils/async_iter_handler.py             | 8 +++++---
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/pr-validation.yml 
b/.github/workflows/pr-validation.yml
index 6544d1684..45f02be67 100644
--- a/.github/workflows/pr-validation.yml
+++ b/.github/workflows/pr-validation.yml
@@ -139,7 +139,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python: [3.8, 3.9, "3.10"]
+        python: [3.8, 3.9, "3.10", "3.11"]
         os: [ubuntu-latest, macos-latest, windows-latest]
 
     steps:
diff --git a/streampipes-client-python/setup.py 
b/streampipes-client-python/setup.py
index 468200354..e7bb800d3 100644
--- a/streampipes-client-python/setup.py
+++ b/streampipes-client-python/setup.py
@@ -41,7 +41,8 @@ base_packages = [
     "pandas~=1.5",
     "pydantic~=1.10",
     "requests~=2.28",
-    "nats-py~=2.2",
+    "nats-py~=2.2;  python_version <= '3.10'",
+    "nats-py~=2.3.0;  python_version == '3.11'",
     "confluent-kafka~=2.0",
     "typing-extensions~=4.5",
 ]
@@ -130,8 +131,9 @@ setuptools.setup(
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
         "Programming Language :: Python :: 3.10",
+        "Programming Language :: Python :: 3.11",
         "Topic :: Scientific/Engineering"
     ],
     ext_modules=[],
-    keywords='streampipes, iot, iiot, analytics, stream-processing, apache',
+    keywords='streampipes, iot, iiot, analytics, stream-processing, online-ml, 
apache',
 )
diff --git 
a/streampipes-client-python/streampipes/functions/utils/async_iter_handler.py 
b/streampipes-client-python/streampipes/functions/utils/async_iter_handler.py
index 62a742d5b..0c90e7859 100644
--- 
a/streampipes-client-python/streampipes/functions/utils/async_iter_handler.py
+++ 
b/streampipes-client-python/streampipes/functions/utils/async_iter_handler.py
@@ -56,11 +56,13 @@ class AsyncIterHandler:
         message: Tuple[str, Any]
             Description of the anonymous integer return value.
         """
-        pending = {AsyncIterHandler.anext(stream_id, message) for stream_id, 
message in messages.items()}
+        pending = {
+            asyncio.create_task(AsyncIterHandler.anext(stream_id, message)) 
for stream_id, message in messages.items()
+        }
         while pending:
-            done, pending = await asyncio.wait(pending, 
return_when=asyncio.FIRST_COMPLETED)  # type: ignore
+            done, pending = await asyncio.wait(pending, 
return_when=asyncio.FIRST_COMPLETED)
             for i in done:
                 stream_id, msg = i.result()
                 if stream_id != "stop":
-                    pending.add(AsyncIterHandler.anext(stream_id, 
messages[stream_id]))
+                    
pending.add(asyncio.create_task(AsyncIterHandler.anext(stream_id, 
messages[stream_id])))
                 yield stream_id, msg

Reply via email to