Skip to content

Commit

Permalink
Remove support for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
luigiw committed Dec 19, 2024
1 parent e8641e6 commit f8dd7c2
Show file tree
Hide file tree
Showing 29 changed files with 39 additions and 53 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 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
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
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
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
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
10 changes: 3 additions & 7 deletions src/promptflow-rag/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

def parse_requirements(file_name: str) -> List[str]:
with open(file_name) as f:
return [
require.strip() for require in f
if require.strip() and not require.startswith('#')
]
return [require.strip() for require in f if require.strip() and not require.startswith("#")]


# Version extraction inspired from 'requests'
Expand Down Expand Up @@ -49,16 +46,15 @@ def parse_requirements(file_name: str) -> List[str]:
"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",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires="<4.0,>=3.8",
install_requires=parse_requirements('requirements.txt'),
python_requires="<4.0,>=3.9",
install_requires=parse_requirements("requirements.txt"),
packages=find_namespace_packages(include=[f"{PACKAGE_FOLDER_PATH}.*"]),
include_package_data=True,
project_urls={
Expand Down
3 changes: 1 addition & 2 deletions src/promptflow-recording/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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 @@ -35,7 +34,7 @@ packages = [
"Bug Reports" = "https://github.com/microsoft/promptflow/issues"

[tool.poetry.dependencies]
python = "<4.0,>=3.8"
python = "<4.0,>=3.9"
vcrpy = ">=6.0.1"
filelock = "*"
promptflow-tracing = ">=0.1.0b1, <2.0.0"
Expand Down
3 changes: 1 addition & 2 deletions src/promptflow-tools/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ def parse_requirements(file_name: str) -> List[str]:
"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",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires="<4.0,>=3.8",
python_requires="<4.0,>=3.9",
install_requires=parse_requirements('requirements.txt'),
extras_require={
"azure": [
Expand Down
3 changes: 1 addition & 2 deletions src/promptflow-tracing/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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 @@ -35,7 +34,7 @@ packages = [

# dependencies
[tool.poetry.dependencies]
python = "<4.0,>=3.8"
python = "<4.0,>=3.9"
openai = "*" # API injector for OpenAI traces
opentelemetry-sdk = ">=1.22.0,<2.0.0" # Open Telemetry dependency
tiktoken = ">=0.4.0" # get OpenAI token count for streaming scenario
Expand Down
Loading

0 comments on commit f8dd7c2

Please sign in to comment.