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

Dependencies: Add support for Python 3.12 #131

Merged
merged 4 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

services:
rabbitmq:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
rabbitmq: [latest]
include:
- python-version: '3.8'
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

intersphinx_mapping = {
'python': ('https://docs.python.org/3.8', None),
'aio_pika': ('https://aio-pika.readthedocs.io/en/latest/', None)
'aio_pika': ('https://docs.aio-pika.com/', None)
}

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/performance.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. _pika: https://pika.readthedocs.io/en/stable/
.. _aio-pika: https://pika.readthedocs.io/en/stable/
.. _aio-pika: https://docs.aio-pika.com/
.. _msgpack: https://github.com/msgpack/msgpack-python


Expand Down
2 changes: 1 addition & 1 deletion docs/source/pika-comparison.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. _work queues: https://www.rabbitmq.com/tutorials/tutorial-two-python.html
.. _topics: https://www.rabbitmq.com/tutorials/tutorial-five-python.html
.. _RPC: https://www.rabbitmq.com/tutorials/tutorial-six-python.html
.. _aio-pika: https://aio-pika.readthedocs.io/en/latest/index.html
.. _aio-pika: https://docs.aio-pika.com/index.html

Coming from Pika
================
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers = [
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
keywords = ['ommunication', 'messaging', 'rpc', 'broadcast']
requires-python = '>=3.8'
Expand Down Expand Up @@ -50,7 +51,7 @@ pre-commit = [
'pylint==2.12.2',
]
rmq = [
'aio-pika~=9.0',
'aio-pika~=9.4.0',
'pamqp~=3.2',
'pytray>=0.3.4,<0.4.0',
]
Expand All @@ -60,7 +61,7 @@ tests = [
'pytest-cov',
'pytest~=7.0',
'pytest-asyncio~=0.12,<0.17',
'pytest-notebook>=0.7',
'pytest-notebook>=0.9',
'pytest-benchmark',
'pika',
'msgpack',
Expand Down
3 changes: 3 additions & 0 deletions src/kiwipy/rmq/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ async def next_task(self,
raises:
kiwipy.exceptions.QueueEmpty: When the queue has no tasks within the timeout
"""
# relinquish so that if there is requeue coroutines, they are run first and task queue get updated
await asyncio.sleep(0)

try:
message = await self._task_queue.get(no_ack=no_ack, fail=fail, timeout=timeout)
except aio_pika.exceptions.QueueEmpty as exc:
Expand Down