Skip to content

Commit

Permalink
[MAINTENANCE] Remove Python 3.8 Support (EOL) (#10441)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tyler Hoffman <[email protected]>
  • Loading branch information
3 people authored Oct 3, 2024
1 parent e3e3b32 commit d992e4f
Show file tree
Hide file tree
Showing 34 changed files with 158 additions and 154 deletions.
51 changes: 15 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
cache: "pip"
cache-dependency-path: |
requirements-types.txt
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
- name: Run docs_snippet_checker
run: |
yarn install
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
cache: "pip"
cache-dependency-path: |
reqs/requirements-dev-test.txt
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
cache: "pip"
cache-dependency-path: |
reqs/requirements-dev-test.txt
Expand Down Expand Up @@ -292,7 +292,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
cache: "pip"
cache-dependency-path: reqs/requirements-dev-test.txt
- name: Install dependencies
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
cache-dependency-path: |
reqs/requirements-dev-test.txt
setup.py
Expand Down Expand Up @@ -435,15 +435,13 @@ jobs:
- spark
- spark_connect
- trino
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
# TODO: would like to adopt `actionlint` pre-commit hook
# but false positive here and inability to do an inline ignore
# prevents this https://github.com/rhysd/actionlint/issues/237
- python-version: ${{ github.event_name == 'pull_request' && '3.9' }}
- python-version: ${{ github.event_name == 'pull_request' && '3.10' }}
- python-version: ${{ github.event_name == 'pull_request' && '3.11' }}
- python-version: ${{ github.event_name == 'merge_group' && '3.9' }}
- python-version: ${{ github.event_name == 'merge_group' && '3.10' }}
- python-version: ${{ github.event_name == 'merge_group' && '3.11' }}
- python-version: "3.12" # need sqlalchemy 2.0 support
Expand Down Expand Up @@ -500,24 +498,6 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
flags: "${{ matrix.python-version }} ${{ matrix.markers }}"

py38-min-versions:
needs: [unit-tests, static-analysis]
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: "pip"
cache-dependency-path: reqs/requirements-dev-test.txt
- name: Install dependencies
run: pip install . -c ci/constraints-test/py38-min-install.txt -r reqs/requirements-dev-test.txt
- name: Run the tests
run: invoke ci-tests -m unit --xdist --slowest=10 --timeout=2.0

py39-min-versions:
needs: [unit-tests, static-analysis]
if: github.event.pull_request.draft == false
Expand Down Expand Up @@ -602,7 +582,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
cache: "pip"
cache-dependency-path: reqs/requirements-dev-test.txt
- name: Install dependencies
Expand All @@ -619,7 +599,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
cache: "pip"
cache-dependency-path: requirements.txt
- name: Install dependencies
Expand All @@ -632,11 +612,12 @@ jobs:
needs: [static-analysis]
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
env:
GX_PYTHON_EXPERIMENTAL: true # allow for python 3.12+
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- python-version: ${{ github.event_name == 'pull_request' && '3.9' }}
- python-version: ${{ github.event_name == 'pull_request' && '3.10' }}
steps:
- name: Checkout
Expand All @@ -662,7 +643,6 @@ jobs:
unit-tests,
cloud-tests,
marker-tests,
py38-min-versions,
py39-min-versions,
py310-min-versions,
py311-min-versions,
Expand All @@ -681,10 +661,10 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install Twine and Wheel, and prepare packaging
Expand All @@ -711,7 +691,6 @@ jobs:
unit-tests,
cloud-tests,
marker-tests,
py38-min-versions,
py39-min-versions,
py310-min-versions,
py311-min-versions,
Expand Down
6 changes: 3 additions & 3 deletions ci/azure-pipelines-cloud-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ stages:
- job: bigquery_performance_test
timeoutInMinutes: 30 # this should be more than sufficient since the performance typically runs < 5 min
variables:
python.version: "3.8"
python.version: "3.9"

strategy:
matrix:
Expand Down Expand Up @@ -67,7 +67,7 @@ stages:
- job: bigquery_expectations_test
timeoutInMinutes: 150 # Each stage runs in about 60 min and 30 min respectively.
variables:
python.version: "3.8"
python.version: "3.9"

strategy:
matrix:
Expand Down Expand Up @@ -114,7 +114,7 @@ stages:
- job: snowflake_expectations_test
timeoutInMinutes: 45 # snowflake tests will run in about 30 min
variables:
python.version: "3.8"
python.version: "3.9"

steps:
- task: UsePythonVersion@0
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-pipelines-contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ variables:
contrib_major: 0
contrib_minor: 1
isDevelop: $[eq(variables['Build.SourceBranch'], 'refs/heads/develop')]
python.version: "3.8"
python.version: "3.9"

name: $(Date:yyyyMMdd)$(Rev:rrr)

Expand Down
4 changes: 2 additions & 2 deletions ci/azure-pipelines-docs-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ stages:
timeoutInMinutes: 30
condition: and(or(eq(variables.isDevelop, true), eq(variables.isManual, true)), ne(variables['SYSTEM.PULLREQUEST.ISFORK'], true))
variables:
python.version: "3.8"
python.version: "3.9"
spark.version: "3.3.2"
matching_aws_java_sdk_bundle_version: "1.11.1026"

Expand Down Expand Up @@ -61,7 +61,7 @@ stages:
timeoutInMinutes: 30
condition: or(eq(variables.isDevelop, true), eq(variables.isManual, true))
variables:
python.version: "3.8"
python.version: "3.9"

steps:
- task: UsePythonVersion@0
Expand Down
8 changes: 4 additions & 4 deletions ci/azure-pipelines-os-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ stages:
mysql: mysql

variables:
python.version: "3.8"
python.version: "3.9"

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -170,7 +170,7 @@ stages:
mssql: mssql

variables:
python.version: "3.8"
python.version: "3.9"

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -201,7 +201,7 @@ stages:
postgres: postgres

variables:
python.version: "3.8"
python.version: "3.9"

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -229,7 +229,7 @@ stages:
trino: trino

variables:
python.version: "3.8"
python.version: "3.9"

steps:
- task: UsePythonVersion@0
Expand Down
22 changes: 14 additions & 8 deletions ci/azure-pipelines-sqlalchemy-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: 3.8
displayName: "Use Python 3.8"
versionSpec: 3.9
displayName: "Use Python 3.9"

- script: |
pip install $(grep -E '^(black|invoke|ruff)' reqs/requirements-dev-contrib.txt)
Expand All @@ -92,8 +92,8 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.8"
displayName: "Use Python 3.8"
versionSpec: "3.9"
displayName: "Use Python 3.9"

- script: |
pip install .
Expand Down Expand Up @@ -128,8 +128,8 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.8"
displayName: "Use Python 3.8"
versionSpec: "3.9"
displayName: "Use Python 3.9"

- bash: python -m pip install --upgrade pip
displayName: "Update pip"
Expand All @@ -139,6 +139,9 @@ stages:
echo "SQLAlchemy$(comparison)2.0.0" >> constraints-dev-temp.txt
echo "pandas$(comparison)2.0.0" >> constraints-dev-temp.txt
# Constrain numpy to prevent running into a number of DeprecationWarnings
echo "numpy<1.25" >> constraints-dev-temp.txt
pip install --constraint constraints-dev-temp.txt ".[test, postgresql]" pytest-azurepipelines
displayName: "Install dependencies using SQLAlchemy base version $(sqlalchemy_base_version)"
Expand Down Expand Up @@ -182,8 +185,8 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.8"
displayName: "Use Python 3.8"
versionSpec: "3.9"
displayName: "Use Python 3.9"

- bash: python -m pip install --upgrade pip
displayName: "Update pip"
Expand All @@ -196,6 +199,9 @@ stages:
echo "SQLAlchemy$(comparison)2.0.0" >> constraints-dev-temp.txt
echo "pandas$(comparison)2.0.0" >> constraints-dev-temp.txt
# Constrain numpy to prevent running into a number of DeprecationWarnings
echo "numpy<1.25" >> constraints-dev-temp.txt
pip install --constraint constraints-dev-temp.txt ".[test, mssql]" pytest-azurepipelines
displayName: "Install dependencies using SQLAlchemy base version $(sqlalchemy_base_version)"
Expand Down
2 changes: 0 additions & 2 deletions ci/constraints-test/py37-min-install.txt

This file was deleted.

3 changes: 0 additions & 3 deletions ci/constraints-test/py38-min-install.txt

This file was deleted.

2 changes: 1 addition & 1 deletion ci/dev-install-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
vmImage: "" # Must be specified in primary YAML
pythonVersion: ["3.8", "3.9", "3.10", "3.11"]
pythonVersion: ["3.9", "3.10", "3.11"]

jobs:
- ${{ each pythonVersion in parameters.pythonVersion }}:
Expand Down
2 changes: 1 addition & 1 deletion ci/user-install-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
vmImage: "" # Must be specified in primary YAML
pythonVersion: ["3.8", "3.9", "3.10", "3.11"]
pythonVersion: ["3.9", "3.10", "3.11"]

jobs:
- ${{ each pythonVersion in parameters.pythonVersion }}:
Expand Down
4 changes: 2 additions & 2 deletions contrib/experimental/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"Topic :: Software Development :: Testing",
"License :: OSI Approved :: Apache Software License",
"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",
],
}

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PYTHON_VERSION in ["3.7", "3.8", "3.9", "3.10"]
ARG PYTHON_VERSION=3.8
# PYTHON_VERSION in ["3.9", "3.10"]
ARG PYTHON_VERSION=3.9
# SOURCE in ["local", "github"]
ARG SOURCE=local

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To use Great Expectations (GX) you need to install Python and the GX Core Python
You should receive a response similar to the following:

```shell title="Terminal output"
Python 3.8.6
Python 3.9.19
```

## Optional. Create a virtual environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stages:
condition: eq(variables.isManual, true)
timeoutInMinutes: 15
variables:
python.version: "3.8"
python.version: "3.9"

steps:
- task: UsePythonVersion@0
Expand Down
7 changes: 3 additions & 4 deletions great_expectations/compatibility/typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
from typing import Any, Callable, TypeVar

try:
from typing import ( # type: ignore[attr-defined] # only exists in some python versions
Annotated,
)
except ImportError:
# default to the typing_extensions version if available as it contains bug fixes & improvements
from typing_extensions import Annotated
except ImportError:
from typing import Annotated # type: ignore[assignment]

try:
from typing_extensions import override
Expand Down
Loading

0 comments on commit d992e4f

Please sign in to comment.