From c8e62e25c2d96a0c21faaee1453f5c032407b1cb Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Wed, 2 Dec 2026 10:28:51 -0600 Subject: [PATCH 1/2] Enable Service Bus SDK tests on all Python versions --- eng/scripts/install-dependencies.sh | 11 ----------- eng/templates/jobs/ci-emulator-tests.yml | 1 - workers/pyproject.toml | 1 + .../tests/emulator_tests/test_servicebus_functions.py | 3 --- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index 84fb8cb1..9ad7f024 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -36,14 +36,3 @@ $UV_PIP -U --prerelease=if-necessary-or-explicit \ -e "$2/[test-http-v2]" \ -e "$2/[test-deferred-bindings]" \ "${EXTRA_ARGS[@]}" - -# The Service Bus extension requires protobuf <7, which conflicts with the -# Python 3.13+ worker stubs. Its uamqp dependency also lacks Python 3.14+ wheels. -# Keep this gate aligned with the early skip in test_servicebus_functions.py. -if [ "${PY_MINOR:-0}" -lt 13 ]; then - SERVICEBUS_DIR="./servicebus_dir" - python -m uv pip install --prerelease=allow -U --target "$SERVICEBUS_DIR" azurefunctions-extensions-bindings-servicebus==1.0.0b2 - python -c "import sys; sys.path.insert(0, '$SERVICEBUS_DIR'); import azurefunctions.extensions.bindings.servicebus as sb; print('servicebus version:', sb.__version__)" -else - echo "Skipping servicebus binding extension on Python $PY_VER (requires Python <3.13)." -fi diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml index 59a91954..bb560184 100644 --- a/eng/templates/jobs/ci-emulator-tests.yml +++ b/eng/templates/jobs/ci-emulator-tests.yml @@ -237,7 +237,6 @@ jobs: AzureWebJobsSQLPassword: $(AzureWebJobsSQLPassword) displayName: 'Install Azurite and Start ServiceBus Emulator' - bash: | - export PYTHONPATH="$(Build.SourcesDirectory)/servicebus_dir:$PYTHONPATH" python -m pytest -q --dist loadfile --reruns 4 tests/emulator_tests/test_servicebus_functions.py env: AzureWebJobsStorage: $(AzureWebJobsStorage) diff --git a/workers/pyproject.toml b/workers/pyproject.toml index 28806920..508450b9 100644 --- a/workers/pyproject.toml +++ b/workers/pyproject.toml @@ -94,6 +94,7 @@ test-http-v2 = [ test-deferred-bindings = [ "azurefunctions-extensions-bindings-blob==1.1.2", "azurefunctions-extensions-bindings-cosmosdb==1.0.0", + "azurefunctions-extensions-bindings-servicebus==1.0.0b3", "azurefunctions-extensions-bindings-eventhub==1.0.0b1; python_version < '3.14'" ] diff --git a/workers/tests/emulator_tests/test_servicebus_functions.py b/workers/tests/emulator_tests/test_servicebus_functions.py index 3d69f9b3..62e519b0 100644 --- a/workers/tests/emulator_tests/test_servicebus_functions.py +++ b/workers/tests/emulator_tests/test_servicebus_functions.py @@ -1,9 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json -import sys import time -import unittest from tests.utils import testutils @@ -67,7 +65,6 @@ def get_script_dir(cls): 'servicebus_functions_stein' / 'generic' -@unittest.skipIf(sys.version_info.minor >= 13, "Skip to figure out uamqp.") class TestServiceBusSDKFunctions(testutils.WebHostTestCase): @classmethod From 6ee3740d5cb52180fcadf5d1d8470acccf8e2d4c Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Wed, 2 Dec 2026 15:12:09 -0600 Subject: [PATCH 2/2] Enable Event Hub SDK tests on all Python versions --- runtimes/v2/pyproject.toml | 2 +- workers/pyproject.toml | 2 +- workers/tests/emulator_tests/test_eventhub_functions.py | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/runtimes/v2/pyproject.toml b/runtimes/v2/pyproject.toml index d58a574b..642962e0 100644 --- a/runtimes/v2/pyproject.toml +++ b/runtimes/v2/pyproject.toml @@ -56,7 +56,7 @@ test-http-v2 = [ ] test-deferred-bindings = [ "azurefunctions-extensions-bindings-blob==1.0.0", - "azurefunctions-extensions-bindings-eventhub==1.0.0b1" + "azurefunctions-extensions-bindings-eventhub==1.0.0b2" ] [build-system] diff --git a/workers/pyproject.toml b/workers/pyproject.toml index 508450b9..650438ca 100644 --- a/workers/pyproject.toml +++ b/workers/pyproject.toml @@ -95,7 +95,7 @@ test-deferred-bindings = [ "azurefunctions-extensions-bindings-blob==1.1.2", "azurefunctions-extensions-bindings-cosmosdb==1.0.0", "azurefunctions-extensions-bindings-servicebus==1.0.0b3", - "azurefunctions-extensions-bindings-eventhub==1.0.0b1; python_version < '3.14'" + "azurefunctions-extensions-bindings-eventhub==1.0.0b2" ] [build-system] diff --git a/workers/tests/emulator_tests/test_eventhub_functions.py b/workers/tests/emulator_tests/test_eventhub_functions.py index fbb6d8a6..fc0e9a2c 100644 --- a/workers/tests/emulator_tests/test_eventhub_functions.py +++ b/workers/tests/emulator_tests/test_eventhub_functions.py @@ -4,8 +4,6 @@ import time from tests.utils import testutils -from unittest import skipIf -import sys class TestEventHubFunctions(testutils.WebHostTestCase): @@ -172,7 +170,6 @@ def test_eventhub_retry_trigger_with_default_intervals(self): self.assertEqual(result['all_attempts'], [0, 1, 2]) -@skipIf(sys.version_info.minor >= 14, "Skip to figure out uamqp.") class TestEventHubFunctionsSDK(TestEventHubFunctions): @classmethod