diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index a7c8ee4af..e631a880d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,7 @@ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/python-3/.devcontainer/base.Dockerfile -# [Choice] Python version: 3, 3.9 -ARG VARIANT="3.9" +# [Choice] Python version: 3, 3.10 +ARG VARIANT="3.10" FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ba9200b89..8057e5ffd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,7 +6,7 @@ "dockerfile": "Dockerfile", "context": "..", "args": { - // Update 'VARIANT' to pick a Python version: 3, 3.9 + // Update 'VARIANT' to pick a Python version: 3, 3.10 "VARIANT": "3", // Options "NODE_VERSION": "lts/*" diff --git a/README.md b/README.md index a50ed4a27..f33c65f1c 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The Azure IoT Device library is available on PyPI: pip install azure-iot-device ``` -Python 3.9 or higher is required in order to use the library +Python 3.10 or higher is required in order to use the library ## Using the library API documentation for this package is available via [**Microsoft Docs**](https://docs.microsoft.com/python/api/azure-iot-device/azure.iot.device?view=azure-python). diff --git a/requirements_test.txt b/requirements_test.txt index aa2a3cd88..0dbe995d2 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -5,7 +5,8 @@ pytest-testdox>=1.1.1 pytest-cov pytest-timeout flake8 -azure-iot-hub # Only needed for iothub e2e +# Use a GitHub dependency to get the beta version of azure-iot-hub +azure-iot-hub @ git+https://github.com/Azure/azure-iot-hub-python.git@52d1ee2b5b987ae24dd3f9891ca55177c19aeb3c # Only needed for iothub e2e azure-iothub-provisioningserviceclient >= 1.2.0 # Only needed for provisioning e2e azure-eventhub # Only needed for iothub e2e psutil # Only needed for iothub e2e diff --git a/scripts/configure-virtual-environments.sh b/scripts/configure-virtual-environments.sh index 4f5eddd73..b6c363829 100755 --- a/scripts/configure-virtual-environments.sh +++ b/scripts/configure-virtual-environments.sh @@ -6,7 +6,7 @@ script_dir=$(cd "$(dirname "$0")" && pwd) -export RUNTIMES_TO_INSTALL="3.9.9 3.10.2" +export RUNTIMES_TO_INSTALL="3.10.2" echo "This script will do the following:" echo "1. Use apt to install pre-requisites for pyenv" diff --git a/setup.py b/setup.py index 2f76ea187..7702eca5a 100644 --- a/setup.py +++ b/setup.py @@ -65,10 +65,11 @@ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ], install_requires=[ "deprecation>=2.1.0,<3.0.0", @@ -79,7 +80,7 @@ "PySocks", "typing_extensions", ], - python_requires=">=3.9, <4", + python_requires=">=3.10, <4", packages=find_namespace_packages(where="azure-iot-device"), package_data={"azure.iot.device": ["py.typed"]}, package_dir={"": "azure-iot-device"}, diff --git a/vsts/build.yaml b/vsts/build.yaml index 0196f8017..53448e150 100644 --- a/vsts/build.yaml +++ b/vsts/build.yaml @@ -65,8 +65,6 @@ jobs: vmImage: 'ubuntu-24.04' strategy: matrix: - Python39: - python.version: '3.9' Python310: python.version: '3.10' Python311: @@ -75,9 +73,8 @@ jobs: python.version: '3.12' Python313: python.version: '3.13' - # Disabled as it is failing on pipeline (published uamqp wheel fails to compile) - # Python314: - # python.version: '3.14' + Python314: + python.version: '3.14' steps: - task: UsePythonVersion@0 displayName: 'Use Python $(python.version)' diff --git a/vsts/dps-e2e.yaml b/vsts/dps-e2e.yaml index 02badeb8d..a016027af 100644 --- a/vsts/dps-e2e.yaml +++ b/vsts/dps-e2e.yaml @@ -270,7 +270,7 @@ stages: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.9' + versionSpec: '3.10' architecture: 'x64' - script: 'python scripts/env_setup.py --no_dev' diff --git a/vsts/python-canary.yaml b/vsts/python-canary.yaml index 8a88b751f..10db46f2a 100644 --- a/vsts/python-canary.yaml +++ b/vsts/python-canary.yaml @@ -6,26 +6,21 @@ jobs: strategy: maxParallel: 4 matrix: - py39_windows_mqtt: - pv: '3.9' + py310_windows_mqtt: + pv: '3.10' transport: 'mqtt' imageName: 'windows-latest' consumerGroup: 'cg1' - py39_windows_mqttws: - pv: '3.9' + py310_windows_mqttws: + pv: '3.10' transport: 'mqttws' imageName: 'windows-latest' consumerGroup: 'cg2' - py39_linux_mqttws: - pv: '3.9' + py310_linux_mqttws: + pv: '3.10' transport: 'mqttws' imageName: 'Ubuntu 20.04' consumerGroup: 'cg4' - py39_linux_mqtt: - pv: '3.9' - transport: 'mqtt' - imageName: 'Ubuntu 20.04' - consumerGroup: 'cg5' py310_linux_mqtt: pv: '3.10' transport: 'mqtt' diff --git a/vsts/python-e2e.yaml b/vsts/python-e2e.yaml index 71b420def..b90630ded 100644 --- a/vsts/python-e2e.yaml +++ b/vsts/python-e2e.yaml @@ -43,7 +43,7 @@ stages: export IOTHUB_CONNECTION_STRING=$(az iot hub connection-string show -g $AZURE_RESOURCE_GROUP --hub-name $AZURE_IOTHUB_NAME --pn iothubowner --query "connectionString" --output tsv) export EVENTHUB_CONNECTION_STRING=$(az iot hub connection-string show -g $AZURE_RESOURCE_GROUP --hub-name $AZURE_IOTHUB_NAME --eh --query "connectionString" --output tsv) - for i in $(seq 1 4); do + for i in $(seq 1 5); do cg_name="cg$i" az iot hub consumer-group create -g "$AZURE_RESOURCE_GROUP" --hub-name "$AZURE_IOTHUB_NAME" --name "$cg_name" done @@ -78,7 +78,7 @@ stages: strategy: matrix: - py39_mqtt: { pv: '3.9', transport: 'mqtt', consumer_group: 'cg1' } + py310_mqtt: { pv: '3.10', transport: 'mqtt', consumer_group: 'cg1' } py312_mqttws: { pv: '3.12', transport: 'mqttws', consumer_group: 'cg2' } steps: @@ -113,7 +113,7 @@ stages: strategy: matrix: - # Not covering Python 3.14 as it is failing on pipeline (published uamqp wheel fails to compile). + py314_mqtt: { pv: '3.14', transport: 'mqtt', consumer_group: 'cg5' } py313_mqtt: { pv: '3.13', transport: 'mqtt', consumer_group: 'cg3' } py312_mqtt_ws: { pv: '3.12', transport: 'mqttws', consumer_group: 'cg4' } diff --git a/vsts/python-nightly.yaml b/vsts/python-nightly.yaml index 6ca2c667a..54de7c6af 100644 --- a/vsts/python-nightly.yaml +++ b/vsts/python-nightly.yaml @@ -64,13 +64,13 @@ stages: - job: 'Test' # The Windows legs of this matrix run right up against Azure Pipelines' implicit # 60-minute job timeout, so they get cancelled mid-run even though the suite - # itself passes. Measured in build 161689: - # py39_windows_mqtt 60.4 min -> CANCELLED (pytest had already reported - # "74 passed, 33 skipped" in 57:16) - # py39_windows_mqttws 52.9 min -> passed, with only ~7 minutes of headroom + # itself passes. Historical Python 3.9 measurements from build 161689: + # Windows MQTT leg 60.4 min -> CANCELLED (pytest had already reported + # "74 passed, 33 skipped" in 57:16) + # Windows MQTTWS leg 52.9 min -> passed, with only ~7 minutes of headroom # the seven linux legs 31.9 - 34.7 min # Whichever Windows leg is slower on the day is the one that dies, which is why - # the failure appears to wander between py39_windows_mqtt and py39_windows_mqttws. + # the failure appears to wander between the Windows MQTT and MQTTWS legs. # Give the job a realistic budget instead. timeoutInMinutes: 90 variables: @@ -79,18 +79,18 @@ stages: strategy: maxParallel: 9 matrix: - py39_windows_mqtt: - pv: '3.9' + py310_windows_mqtt: + pv: '3.10' transport: 'mqtt' imageName: 'windows-latest' consumerGroup: 'cg1' - py39_windows_mqttws: - pv: '3.9' + py310_windows_mqttws: + pv: '3.10' transport: 'mqttws' imageName: 'windows-latest' consumerGroup: 'cg2' - py39_linux_mqttws: - pv: '3.9' + py310_linux_mqttws: + pv: '3.10' transport: 'mqttws' imageName: 'ubuntu-22.04' consumerGroup: 'cg3' @@ -124,17 +124,16 @@ stages: transport: 'mqttws' imageName: 'ubuntu-22.04' consumerGroup: 'cg9' - # These are failing due to uamqp compilation errors, used in tests. - # py314_linux_mqtt: - # pv: '3.14' - # transport: 'mqtt' - # imageName: 'ubuntu-22.04' - # consumerGroup: 'cg10' - # py314_linux_mqttws: - # pv: '3.14' - # transport: 'mqttws' - # imageName: 'ubuntu-22.04' - # consumerGroup: 'cg11' + py314_linux_mqtt: + pv: '3.14' + transport: 'mqtt' + imageName: 'ubuntu-22.04' + consumerGroup: 'cg10' + py314_linux_mqttws: + pv: '3.14' + transport: 'mqttws' + imageName: 'ubuntu-22.04' + consumerGroup: 'cg11' pool: