Skip to content

python_requires needs to be less than 3.10 #3

@vinilucenasouza

Description

@vinilucenasouza

Describe the bug
The lib doesnt work with python > 3.10
To Reproduce
Steps to reproduce the behavior:

  1. Create a env with python > than 3.10
  2. Run the application
  3. See error

Expected behavior
The app should have run
Fixes
(Recomended)

  1. Change this line to python_requires=">=3.6, <3.10",
  2. Change to not use loop by Semaphore in Python's asyncio
    Screenshots
    Error:
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multipro
cessing/process.py", line 314, in _bootstrap                                                                           self.run()
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multipro
cessing/process.py", line 108, in run                                                                                  self._target(*self._args, **self._kwargs)
  File "/Users/<USER>/Documents/Python/python_projects/liveclient-python-example/venv/lib/python3.12/site-p
ackages/live_client/query/query.py", line 80, in watch                                                                 loop.run_until_complete(read_results(url, channels, output_queue, settings))
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/
base_events.py", line 685, in run_until_complete                                                                       return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/<USER>/Documents/Python/python_projects/liveclient-python-example/venv/lib/python3.12/site-p
ackages/live_client/query/query.py", line 61, in read_results                                                          async with Client(url, ssl=verify_ssl) as client:
  File "/Users/<USER>/Documents/Python/python_projects/liveclient-python-example/venv/lib/python3.12/site-p
ackages/aiocometd/client.py", line 432, in __aenter__                                                                  await self.open()
  File "/Users/<USER>/Documents/Python/python_projects/liveclient-python-example/venv/lib/python3.12/site-p
ackages/aiocometd/client.py", line 273, in open                                                                        self._transport = await self._negotiate_transport()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/<USER>/Documents/Python/python_projects/liveclient-python-example/venv/lib/python3.12/site-p
ackages/aiocometd/client.py", line 198, in _negotiate_transport                                                        transport = create_transport(DEFAULT_CONNECTION_TYPE,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/<USER>/Documents/Python/python_projects/liveclient-python-example/venv/lib/python3.12/site-p
ackages/aiocometd/transports/registry.py", line 47, in create_transport                                                return TRANSPORT_CLASSES[connection_type](*args, **kwargs)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/<USER>/Documents/Python/python_projects/liveclient-python-example/venv/lib/python3.12/site-p
ackages/aiocometd/transports/long_polling.py", line 25, in __init__                                                    self._http_semaphore = asyncio.Semaphore(2, loop=self._loop)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Semaphore.__init__() got an unexpected keyword argument 'loop'
^CTraceback (most recent call last):
  File "/Users/<USER>/Documents/Python/python_projects/liveclient-python-example/BuildingSimplify.py", line
 31, in <module>                                                                                                       handle_events()
  File "/Users/<USER>/Documents/Python/python_projects/liveclient-python-example/venv/lib/python3.12/site-p
ackages/live_client/query/query.py", line 113, in wrapper                                                              event = results_queue.get(timeout=timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multipro
cessing/queues.py", line 113, in get                                                                                   if not self._poll(timeout):
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multipro
cessing/connection.py", line 257, in poll                                                                              return self._poll(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multipro
cessing/connection.py", line 440, in _poll                                                                             r = wait([self], timeout)
        ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multipro
cessing/connection.py", line 1135, in wait                                                                             ready = selector.select(timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/selector
s.py", line 415, in select                                                                                             fd_event_list = self._selector.poll(timeout)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt

Environment (please complete the following information):

  • OS: IOS
  • Python version >=3.10
  • Live Version: Not Applicable

Additional context
To fix this issue, you have two options:

  1. Downgrade your Python version to 3.9 or earlier where the loop argument is still accepted by the Semaphore class.

  2. Update the aiocometd package to a version that supports Python 3.10 and later.
    There is one package that is not the same: https://pypi.org/project/aiocometd-noloop/
    But this needs a better reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions