diff --git a/.github/workflows/pr_tests.yaml b/.github/workflows/pr_tests.yaml index 7cb3f21fcc..5e7259a6fb 100644 --- a/.github/workflows/pr_tests.yaml +++ b/.github/workflows/pr_tests.yaml @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] pydantic-version: ["pydantic-v1", "pydantic-v2"] fail-fast: false @@ -105,7 +105,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -124,7 +124,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -143,7 +143,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -182,7 +182,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -212,7 +212,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -251,7 +251,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -281,7 +281,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -309,7 +309,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -339,7 +339,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -367,7 +367,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -397,7 +397,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -425,7 +425,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: | diff --git a/pyproject.toml b/pyproject.toml index edfbea8cd8..9c070bc318 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", @@ -66,7 +67,10 @@ rabbit = ["aio-pika>=9,<10"] kafka = ["aiokafka>=0.9,<0.12"] -confluent = ["confluent-kafka>=2,<3"] +confluent = [ + "confluent-kafka>=2,<3; python_version < '3.13'", + "confluent-kafka>=2.6,<3; python_version >= '3.13'", +] nats = ["nats-py>=2.7.0,<=3.0.0"] diff --git a/tests/a_docs/getting_started/asyncapi/asyncapi_customization/test_handler.py b/tests/a_docs/getting_started/asyncapi/asyncapi_customization/test_handler.py index 6453f5a8d8..31eead7a3b 100644 --- a/tests/a_docs/getting_started/asyncapi/asyncapi_customization/test_handler.py +++ b/tests/a_docs/getting_started/asyncapi/asyncapi_customization/test_handler.py @@ -1,3 +1,5 @@ +from dirty_equals import IsPartialDict + from docs.docs_src.getting_started.asyncapi.asyncapi_customization.custom_handler import ( app, ) @@ -7,21 +9,33 @@ def test_handler_customization(): schema = get_app_schema(app).to_jsonable() - assert schema["channels"] == { - "input_data:Consume": { - "description": "Consumer function\n\n Args:\n msg: input msg\n ", + (subscriber_key, subscriber_value), (publisher_key, publisher_value) = schema[ + "channels" + ].items() + + assert subscriber_key == "input_data:Consume", subscriber_key + assert subscriber_value == IsPartialDict( + { "servers": ["development"], "bindings": {"kafka": {"topic": "input_data", "bindingVersion": "0.4.0"}}, "subscribe": { "message": {"$ref": "#/components/messages/input_data:Consume:Message"} }, - }, - "output_data:Produce": { - "description": "My publisher description", - "servers": ["development"], - "bindings": {"kafka": {"topic": "output_data", "bindingVersion": "0.4.0"}}, - "publish": { - "message": {"$ref": "#/components/messages/output_data:Produce:Message"} - }, + } + ), subscriber_value + desc = subscriber_value["description"] + assert ( # noqa: PT018 + "Consumer function\n\n" in desc + and "Args:\n" in desc + and " msg: input msg" in desc + ), desc + + assert publisher_key == "output_data:Produce", publisher_key + assert publisher_value == { + "description": "My publisher description", + "servers": ["development"], + "bindings": {"kafka": {"topic": "output_data", "bindingVersion": "0.4.0"}}, + "publish": { + "message": {"$ref": "#/components/messages/output_data:Produce:Message"} }, }