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 587c175a6..f884e6389 100644 --- a/vsts/build.yaml +++ b/vsts/build.yaml @@ -30,8 +30,6 @@ jobs: vmImage: 'ubuntu-24.04' strategy: matrix: - Python39: - python.version: '3.9' Python310: python.version: '3.10' Python311: @@ -40,9 +38,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 e93ac1693..e292cf79c 100644 --- a/vsts/python-e2e.yaml +++ b/vsts/python-e2e.yaml @@ -70,7 +70,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: @@ -105,7 +105,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: 'cg1' } 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 f2de4f860..4d7bc26c8 100644 --- a/vsts/python-nightly.yaml +++ b/vsts/python-nightly.yaml @@ -68,18 +68,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' @@ -113,17 +113,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: