Skip to content

Commit

Permalink
Drop Python3.7 support (#7188)
Browse files Browse the repository at this point in the history
Co-authored-by: sydney-runkle <sydneymarierunkle@gmail.com>
  • Loading branch information
hramezani and sydney-runkle committed Nov 14, 2023
1 parent 9a9ad40 commit 0564c0d
Show file tree
Hide file tree
Showing 34 changed files with 721 additions and 928 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', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

This comment has been minimized.

Copy link
@Dheeruvaii

Dheeruvaii Dec 1, 2023

{
"1",
}

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -99,13 +99,11 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
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 @@ -217,8 +215,6 @@ jobs:
mypy-version: ['1.0.1', 'lockfile', '1.2.0', '1.4.1', '1.5.1']
python-version: ['3.10']
include:
- mypy-version: 'lockfile'
python-version: '3.7'
- mypy-version: 'lockfile'
python-version: '3.8'
- mypy-version: 'lockfile'
Expand Down Expand Up @@ -246,10 +242,6 @@ jobs:
- name: install mypy
if: steps.cache.outputs.cache-hit != 'true'
run: |
if [ ${{ matrix.mypy-version }} == '1.5.1' ]; 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 @@ -322,9 +314,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', '3.12']
include:
- typing-extensions-version: '4.6.1'
python-version: '3.7'

steps:
- uses: actions/checkout@v4
Expand All @@ -343,8 +332,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
4 changes: 2 additions & 2 deletions mkdocs.yml
Expand Up @@ -142,8 +142,8 @@ markdown_extensions:
pygments_lang_class: true
- pymdownx.extra
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.tabbed:
alternate_style: true

Expand Down

0 comments on commit 0564c0d

Please sign in to comment.