diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 173a06a0c..4b9e3ee14 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,6 @@ # 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, 3.8, 3.7 +# [Choice] Python version: 3, 3.9, 3.8 ARG VARIANT="3.9" FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 545834d34..ffe15824b 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.7, 3.8, 3.9 + // Update 'VARIANT' to pick a Python version: 3, 3.8, 3.9 "VARIANT": "3", // Options "NODE_VERSION": "lts/*" diff --git a/README.md b/README.md index 5fc1ba754..edf782e96 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.7 or higher is required in order to use the library +Python 3.8 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/samples/README.md b/samples/README.md index 94ca0b56c..6697e79ff 100644 --- a/samples/README.md +++ b/samples/README.md @@ -4,7 +4,7 @@ This directory contains samples showing how to use the various features of the M ## Quick Start - Simple Telemetry Sample (send message) -**Note that this sample is configured for Python 3.7+.** To ensure that your Python version is up to date, run `python --version`. If you have both Python 2 and Python 3 installed (and are using a Python 3 environment for this SDK), then install all libraries using `pip3` as opposed to `pip`. This ensures that the libraries are installed to your Python 3 runtime. +**Note that this sample is configured for Python 3.8+.** To ensure that your Python version is up to date, run `python --version`. If you have both Python 2 and Python 3 installed (and are using a Python 3 environment for this SDK), then install all libraries using `pip3` as opposed to `pip`. This ensures that the libraries are installed to your Python 3 runtime. 1. Install the [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest) (or use the [Azure Cloud Shell](https://shell.azure.com/)) and use it to [create an Azure IoT Hub](https://docs.microsoft.com/cli/azure/iot/hub?view=azure-cli-latest#az_iot_hub_create). diff --git a/scripts/configure-virtual-environments.sh b/scripts/configure-virtual-environments.sh index c484563c9..5bf600455 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.7.1 3.8.10 3.9.9 3.10.2" +export RUNTIMES_TO_INSTALL="3.8.10 3.9.9 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 93a35c310..bd17656ed 100644 --- a/setup.py +++ b/setup.py @@ -65,10 +65,10 @@ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ], install_requires=[ # Define sub-dependencies due to pip dependency resolution bug @@ -83,7 +83,7 @@ "PySocks", "typing_extensions", ], - python_requires=">=3.7, <4", + python_requires=">=3.8, <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 b9917a1d1..004540489 100644 --- a/vsts/build.yaml +++ b/vsts/build.yaml @@ -29,14 +29,14 @@ jobs: vmImage: 'Ubuntu 20.04' strategy: matrix: - Python37: - python.version: '3.7' Python38: python.version: '3.8' Python39: python.version: '3.9' Python310: python.version: '3.10' + Python311: + python.version: '3.11' steps: - task: UsePythonVersion@0 displayName: 'Use Python $(python.version)' diff --git a/vsts/dps-e2e.yaml b/vsts/dps-e2e.yaml index 1c211caea..60593afd8 100644 --- a/vsts/dps-e2e.yaml +++ b/vsts/dps-e2e.yaml @@ -10,7 +10,7 @@ jobs: steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.7' + versionSpec: '3.8' architecture: 'x64' - script: 'python scripts/env_setup.py --no_dev' diff --git a/vsts/python-canary.yaml b/vsts/python-canary.yaml index 10d9bdf53..c3f95c098 100644 --- a/vsts/python-canary.yaml +++ b/vsts/python-canary.yaml @@ -16,8 +16,8 @@ jobs: transport: 'mqttws' imageName: 'windows-latest' consumerGroup: 'cg2' - py37_linux_mqttws: - pv: '3.7' + py38_linux_mqttws: + pv: '3.8' transport: 'mqttws' imageName: 'Ubuntu 20.04' consumerGroup: 'cg4' @@ -31,6 +31,11 @@ jobs: transport: 'mqtt' imageName: 'Ubuntu 20.04' consumerGroup: 'cg6' + py311_linux_mqtt: + pv: '3.11' + transport: 'mqtt' + imageName: 'Ubuntu 20.04' + consumerGroup: 'cg7' pool: vmImage: $(imageName) diff --git a/vsts/python-e2e.yaml b/vsts/python-e2e.yaml index 85e56d32e..6a39968bc 100644 --- a/vsts/python-e2e.yaml +++ b/vsts/python-e2e.yaml @@ -7,8 +7,8 @@ jobs: strategy: matrix: - py37_mqtt: { pv: '3.7', transport: 'mqtt', consumer_group: 'e2e-consumer-group-1' } - py310_mqttws: { pv: '3.10', transport: 'mqttws', consumer_group: 'e2e-consumer-group-2' } + py38_mqtt: { pv: '3.8', transport: 'mqtt', consumer_group: 'e2e-consumer-group-1' } + py311_mqttws: { pv: '3.11', transport: 'mqttws', consumer_group: 'e2e-consumer-group-2' } steps: - task: UsePythonVersion@0 @@ -40,7 +40,7 @@ jobs: strategy: matrix: py310_mqtt: { pv: '3.10', transport: 'mqtt', consumer_group: 'e2e-consumer-group-3' } - py37_mqtt_ws: { pv: '3.7', transport: 'mqttws', consumer_group: 'e2e-consumer-group-4' } + py38_mqtt_ws: { pv: '3.8', transport: 'mqttws', consumer_group: 'e2e-consumer-group-4' } steps: - task: UsePythonVersion@0 diff --git a/vsts/python-nightly.yaml b/vsts/python-nightly.yaml index cabc9d6f4..f6bb36c1e 100644 --- a/vsts/python-nightly.yaml +++ b/vsts/python-nightly.yaml @@ -17,8 +17,8 @@ jobs: imageName: 'windows-latest' consumerGroup: 'cg2' - py37_linux_mqttws: - pv: '3.7' + py38_linux_mqttws: + pv: '3.8' transport: 'mqttws' imageName: 'Ubuntu 20.04' consumerGroup: 'cg4' @@ -37,6 +37,11 @@ jobs: transport: 'mqtt' imageName: 'Ubuntu 20.04' consumerGroup: 'cg7' + py311_linux_mqtt: + pv: '3.11' + transport: 'mqtt' + imageName: 'Ubuntu 20.04' + consumerGroup: 'cg8' pool: vmImage: $(imageName)