Skip to content

Commit

Permalink
Drop Python3.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani committed Aug 21, 2023
1 parent 2fb2252 commit a3d68ef
Show file tree
Hide file tree
Showing 33 changed files with 476 additions and 853 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/ci.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -96,13 +96,11 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
include:
# no pydantic-core binaries for pypy on windows, so tests take absolute ages
# macos tests with pypy take ages (>10mins) since pypy is very slow
# so we only test pypy on ubuntu
- os: ubuntu
python-version: 'pypy3.7'
- os: ubuntu
python-version: 'pypy3.8'
- os: ubuntu
Expand Down Expand Up @@ -183,8 +181,6 @@ jobs:
mypy-version: ['1.0.1', 'lockfile', '1.2.0', '1.4.1', '1.5.0']
python-version: ['3.10']
include:
- mypy-version: 'lockfile'
python-version: '3.7'
- mypy-version: 'lockfile'
python-version: '3.8'
- mypy-version: 'lockfile'
Expand All @@ -208,10 +204,6 @@ jobs:
- name: install mypy
if: steps.cache.outputs.cache-hit != 'true'
run: |
if [ ${{ matrix.mypy-version }} == '1.5.0' ]; then
# mypy 1.5.0 only supports 3.8 and newer, so adjust pyproject.toml
sed -i "s/requires-python = '>=3.7'/requires-python = '>=3.8'/g" pyproject.toml
fi
if [ ${{ matrix.mypy-version }} != 'lockfile' ]; then
pdm remove -G linting mypy && pdm remove -G mypy mypy && pdm add mypy==${{ matrix.mypy-version }}
fi
Expand Down Expand Up @@ -284,9 +276,6 @@ jobs:
# test the oldest supported version and main
typing-extensions-version: ['4.6.1', 'main']
python-version: ['3.8', '3.9', '3.10', '3.11']
include:
- typing-extensions-version: '4.6.1'
python-version: '3.7'

steps:
- uses: actions/checkout@v3
Expand All @@ -304,8 +293,6 @@ jobs:
- name: install typing-extensions
run: |
if [ ${{ matrix.typing-extensions-version }} == 'main' ]; then
# typing-extensions main only supports 3.8 and newer, so adjust pyproject.toml
sed -i "s/requires-python = '>=3.7'/requires-python = '>=3.8'/g" pyproject.toml
pdm remove typing-extensions && pdm add 'typing-extensions @ git+https://github.com/python/typing_extensions.git'
else
pdm remove typing-extensions && pdm add 'typing-extensions==${{ matrix.typing-extensions-version }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependencies-check.yml
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ['3.7', '3.11']
python-version: ['3.8', '3.11']
PYTHON_DEPENDENCY_CASE: ${{ fromJSON(needs.find_dependency_cases.outputs.PYTHON_DEPENDENCY_CASES) }}

runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -12,7 +12,7 @@
Data validation using Python type hints.

Fast and extensible, Pydantic plays nicely with your linters/IDE/brain.
Define how data should be in pure, canonical Python 3.7+; validate it with Pydantic.
Define how data should be in pure, canonical Python 3.8+; validate it with Pydantic.

## Pydantic Company :rocket:

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.md
Expand Up @@ -45,7 +45,7 @@ Because of this, setting up and running the tests should be very simple.

You'll need the following prerequisites:

- Any Python version between **Python 3.7 and 3.11**
- Any Python version between **Python 3.8 and 3.11**
- **virtualenv** or other virtual environment tool
- **git**
- **make**
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Expand Up @@ -11,7 +11,7 @@

Pydantic is the most widely used data validation library for Python.

Fast and extensible, Pydantic plays nicely with your linters/IDE/brain. Define how data should be in pure, canonical Python 3.7+; validate it with Pydantic.
Fast and extensible, Pydantic plays nicely with your linters/IDE/brain. Define how data should be in pure, canonical Python 3.8+; validate it with Pydantic.

!!! success "Migrating to Pydantic V2"
Using Pydantic V1? See the [Migration Guide](migration.md) for notes on upgrading to Pydantic V2 in your applications!
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Expand Up @@ -10,7 +10,7 @@ Pydantic has a few dependencies:
* [`typing-extensions`](https://pypi.org/project/typing-extensions/): Backport of the standard library `typing` module.
* [`annotated-types`](https://pypi.org/project/annotated-types/): Reusable constraint types to use with `typing.Annotated`.

If you've got Python 3.7+ and `pip` installed, you're good to go.
If you've got Python 3.8+ and `pip` installed, you're good to go.

Pydantic is also available on [conda](https://www.anaconda.com) under the [conda-forge](https://conda-forge.org)
channel:
Expand Down

0 comments on commit a3d68ef

Please sign in to comment.