Skip to content

Commit

Permalink
Remove support for Python 3.8 (#3887)
Browse files Browse the repository at this point in the history
# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes].**
- [x] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [x] **I have read the [contribution
guidelines](https://github.com/microsoft/promptflow/blob/main/CONTRIBUTING.md).**
- [x] **I confirm that all new dependencies are compatible with the MIT
license.**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [x] Title of the pull request is clear and informative.
- [x] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
  • Loading branch information
luigiw authored Dec 31, 2024
1 parent e8641e6 commit ebf1192
Show file tree
Hide file tree
Showing 39 changed files with 73 additions and 58 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/promptflow-core-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-evals-e2e-test-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-evals-e2e-test-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-evals-installation-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-evals-performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-evals-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-parallel-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-parallel-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/promptflow-release-testing-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
pythonVersion: ['3.8', '3.9', '3.10', '3.11']
pythonVersion: ['3.9', '3.10', '3.11']
defaults:
run:
shell: bash
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
pythonVersion: ['3.8', '3.9', '3.10', '3.11']
pythonVersion: ['3.9', '3.10', '3.11']
# snok/install-poetry need this to support Windows
defaults:
run:
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
pythonVersion: ['3.8', '3.9', '3.10', '3.11']
pythonVersion: ['3.9', '3.10', '3.11']
# snok/install-poetry need this to support Windows
defaults:
run:
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
pythonVersion: ['3.8', '3.9', '3.10', '3.11']
pythonVersion: ['3.9', '3.10', '3.11']
# snok/install-poetry need this to support Windows
defaults:
run:
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
pythonVersion: ['3.8', '3.9', '3.10', '3.11']
pythonVersion: ['3.9', '3.10', '3.11']
env:
PROMPT_FLOW_TEST_MODE: "live"
WORKING_DIRECTORY: ${{ github.workspace }}/src/promptflow-azure
Expand Down Expand Up @@ -368,7 +368,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
pythonVersion: ['3.8', '3.9', '3.10', '3.11']
pythonVersion: ['3.9', '3.10', '3.11']
runs-on: ${{ matrix.os }}
steps:
- name: checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-sdk-cli-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
pythonVersion: ['3.8', '3.9', '3.10', '3.11']
pythonVersion: ['3.9', '3.10', '3.11']
environment:
internal
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-tracing-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promptflow-tracing-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']
fail-fast: false
# snok/install-poetry need this to support Windows
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdk-cli-azure-test-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
matrix:
# replay tests can cover more combinations
os: [ubuntu-latest]
pythonVersion: ['3.8', '3.9', '3.10', '3.11']
pythonVersion: ['3.9', '3.10', '3.11']
environment:
internal
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdk-cli-azure-test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
matrix:
# replay tests can cover more combinations
os: [ubuntu-latest]
pythonVersion: ['3.8', '3.9', '3.10', '3.11']
pythonVersion: ['3.9', '3.10', '3.11']

runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/dev_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
Select either Conda or Poetry to set up your development environment.

1. Conda environment setup
- First create a new [conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) environment. Please specify python version as 3.8/3.9/3.10/3.11.
- First create a new [conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) environment. Please specify python version as 3.9/3.10/3.11.
`conda create -n <env_name> python=3.9`.
- Activate the env you created.
- In root folder, run `python scripts/dev-setup/main.py` to install the packages and dependencies; if you are using Visual Studio Code, it is recommended to add `--vscode` (which is `python scripts/dev-setup/main.py --vscode`) to enable VS Code to recognize the packages.

2. Poetry environment setup
- Install [poetry](https://python-poetry.org/docs/). Please specify python version as 3.8/3.9/3.10/3.11.
- Install [poetry](https://python-poetry.org/docs/). Please specify python version as 3.9/3.10/3.11.
- Each folder under [src](../../src/) (except the promptflow folder) is a separate package, so you need to install the dependencies for each package.
- `poetry install -C promptflow-core -E <extra> --with dev,test`
- `poetry install -C promptflow-devkit -E <extra> --with dev,test`
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This guide outlines the Promptflow SDK and CLI installation process.
## Create a virtual environment (optional)
When installing prompt flow locally, we recommend using a virtual environment for the installation. This ensures
that the dependencies for prompt flow are isolated from the rest of your system. Please ensure you have a working
python environment (python>=3.8,<4.0), a new virtual environment is preferred.
python environment (python>=3.9,<4.0), a new virtual environment is preferred.

::::{tab-set}
:::{tab-item} venv
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[MASTER]
py-version=3.9
ignore-patterns=test_*,conftest,setup,.*_utils\.py
ignore-paths=src\promptflow-evals\tests,src\promptflow-evals\samples,promptflow\evals\evaluate\_telemetry,promptflow\evals\evaluate\_batch_run_client\code_client.py,promptflow\evals\evaluate\_batch_run_client\proxy_client.py
ignore-paths=src\promptflow-evals\tests,src\promptflow-evals\samples,promptflow\evals\evaluate\_telemetry,promptflow\evals\evaluate\_batch_run_client\code_client.py,promptflow\evals\evaluate\_batch_run_client\proxy_client.py,src/promptflow-devkit/tests/sdk_pfs_test/utils.py
reports=no

[MESSAGES CONTROL]
Expand Down
2 changes: 1 addition & 1 deletion scripts/installer/curl_install_pypi/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def verify_python_version():
print_status('Verifying Python version.')
v = sys.version_info
if v < (3, 8):
raise CLIInstallError('The promptflow does not support Python versions less than 3.8.')
raise CLIInstallError('The promptflow does not support Python versions less than 3.9.')
if 'conda' in sys.version:
raise CLIInstallError("This script does not support the Python Anaconda environment. "
"Create an Anaconda virtual environment and install with 'pip'")
Expand Down
5 changes: 5 additions & 0 deletions src/promptflow-azure/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# promptflow-azure package

## v1.17.0 (2025.1.8)

### Improvements
- Dropped Python 3.8 support for security reasons.

## v1.16.0 (2024.09.30)

## v1.15.0 (2024.08.15)
Expand Down
3 changes: 1 addition & 2 deletions src/promptflow-azure/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -38,7 +37,7 @@ packages = [
"Bug Reports" = "https://github.com/microsoft/promptflow/issues"

[tool.poetry.dependencies]
python = ">=3.8,<3.9.7 || >3.9.7,<3.13"
python = ">=3.9,<3.9.7 || >3.9.7,<3.13"
azure-core = ">=1.26.4,<2.0.0"
azure-storage-blob = {extras = ["aio"], version = ">=12.17.0,<13.0.0"} # add [aio] for async run download feature
azure-identity = ">=1.12.0,<2.0.0"
Expand Down
5 changes: 5 additions & 0 deletions src/promptflow-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# promptflow-core package

## v1.17.0 (2025.1.8)

### Improvements
- Dropped Python 3.8 support for security reasons.

## v1.16.0 (2024.09.30)
### Bugs fixed
- Fix promptflow serving app logged inputs out with default logging level.
Expand Down
3 changes: 1 addition & 2 deletions src/promptflow-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -40,7 +39,7 @@ packages = [
"Bug Reports" = "https://github.com/microsoft/promptflow/issues"

[tool.poetry.dependencies]
python = "<4.0,>=3.8"
python = "<4.0,>=3.9"
promptflow-tracing = ">=1.0.0,<2.0.0"
"ruamel.yaml" = ">=0.17.10,<1.0.0" # used to generate connection templates with preserved comments
docstring_parser = "*" # used to parse doc string for Assistant user tools
Expand Down
5 changes: 5 additions & 0 deletions src/promptflow-devkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# promptflow-devkit package

## v1.17.0 (2025.1.8)

### Improvements
- Dropped Python 3.8 support for security reasons.

## v1.16.0 (2024.09.30)

## v1.15.0 (2024.08.15)
Expand Down
3 changes: 1 addition & 2 deletions src/promptflow-devkit/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -41,7 +40,7 @@ packages = [
"Bug Reports" = "https://github.com/microsoft/promptflow/issues"

[tool.poetry.dependencies]
python = ">=3.8,<3.9.7 || >3.9.7,<3.13"
python = ">=3.9,<3.9.7 || >3.9.7,<3.13"
promptflow-core = "<2.0.0"
httpx = ">=0.25.1" # used to send http requests asynchronously
sqlalchemy = ">=1.4.48,<3.0.0" # sqlite requirements
Expand Down
4 changes: 2 additions & 2 deletions src/promptflow-devkit/tests/sdk_pfs_test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# ---------------------------------------------------------
import contextlib
import getpass
import importlib.metadata
import json
from typing import Any, Dict, List, Optional
from unittest import mock

import werkzeug
from flask.testing import FlaskClient

from promptflow._sdk._service.utils.utils import encrypt_flow_path
Expand All @@ -34,7 +34,7 @@ def check_activity_end_telemetry(
"first_call": True,
"activity_type": "PublicApi",
"completion_status": "Success",
"user_agent": [f"Werkzeug/{werkzeug.__version__}", f"local_pfs/{VERSION}"],
"user_agent": [f"Werkzeug/{importlib.metadata.version('werkzeug')}", f"local_pfs/{VERSION}"],
}
for i, expected_activity in enumerate(expected_activities):
temp = default_expected_call.copy()
Expand Down
3 changes: 1 addition & 2 deletions src/promptflow-evals/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -38,7 +37,7 @@ packages = [

# dependencies
[tool.poetry.dependencies]
python = "<4.0,>=3.8"
python = "<4.0,>=3.9"
promptflow-devkit = "<2.0.0,>=1.15.0"
promptflow-core = "<2.0.0,>=1.15.0"
websocket-client = ">=1.2.0"
Expand Down
3 changes: 1 addition & 2 deletions src/promptflow-parallel/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -36,7 +35,7 @@ packages = [
"Bug Reports" = "https://github.com/microsoft/promptflow/issues"

[tool.poetry.dependencies]
python = "<4.0,>=3.8"
python = "<4.0,>=3.9"
promptflow-core = "<2.0.0"

[tool.poetry.group.dev.dependencies]
Expand Down
3 changes: 1 addition & 2 deletions src/promptflow-rag/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -32,7 +31,7 @@ packages = [

# dependencies
[tool.poetry.dependencies]
python = "<4.0,>=3.8"
python = "<4.0,>=3.9"
azureml-rag = ">= 0.2.30.2"
azure-search-documents = ">=11.4.0"
langchain = ">=0.0.236,<=0.1.15"
Expand Down
Loading

0 comments on commit ebf1192

Please sign in to comment.