Skip to content

Commit

Permalink
drop Python 3.7, and PyPy 3.7 and 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Dec 21, 2023
1 parent d706aa4 commit a196e90
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,11 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- 'pypy3.7'
- 'pypy3.8'
- 'pypy3.9'
- 'pypy3.10'

Expand Down Expand Up @@ -385,19 +382,19 @@ jobs:
- os: linux
manylinux: auto
target: armv7
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.8 3.9 3.10 3.11 3.12
- os: linux
manylinux: auto
target: ppc64le
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.8 3.9 3.10 3.11 3.12
- os: linux
manylinux: auto
target: s390x
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.8 3.9 3.10 3.11 3.12
- os: linux
manylinux: auto
target: x86_64
interpreter: pypy3.7 pypy3.8 pypy3.9 pypy3.10
interpreter: pypy3.9 pypy3.10

# musllinux
- os: linux
Expand All @@ -414,19 +411,19 @@ jobs:
target: x86_64
- os: macos
target: aarch64
interpreter: 3.7 3.8 3.9 pypy3.8 pypy3.9 pypy3.10
interpreter: 3.8 3.9 pypy3.9 pypy3.10

# windows;
# x86_64 pypy builds are not PGO optimized
# i686 not supported by pypy
# aarch64 only 3.11 and up, also not PGO optimized
- os: windows
target: x86_64
interpreter: pypy3.8 pypy3.9 pypy3.10
interpreter: pypy3.9 pypy3.10
- os: windows
target: i686
python-architecture: x86
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.8 3.9 3.10 3.11 3.12
- os: windows
target: aarch64
interpreter: 3.11 3.12
Expand All @@ -451,7 +448,7 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux == 'manylinux' && 'auto' || matrix.manylinux }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.7 3.8 3.9 3.10 3.11 3.12 pypy3.7 pypy3.8 pypy3.9 pypy3.10' }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 pypy3.9 pypy3.10' }}
rust-toolchain: stable
docker-options: -e CI

Expand All @@ -472,7 +469,7 @@ jobs:
fail-fast: false
matrix:
os: [linux, windows, macos]
interpreter: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
interpreter: ['3.8', '3.9', '3.10', '3.11', '3.12']
include:
# standard runners with override for macos arm
- os: linux
Expand All @@ -484,8 +481,6 @@ jobs:
runs-on: macos-latest-xlarge
exclude:
# macos arm only supported from 3.10 and up
- os: macos
interpreter: '3.7'
- os: macos
interpreter: '3.8'
- os: macos
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ except ValidationError as e:

You'll need rust stable [installed](https://rustup.rs/), or rust nightly if you want to generate accurate coverage.

With rust and python 3.7+ installed, compiling pydantic-core should be possible with roughly the following:
With rust and python 3.8+ installed, compiling pydantic-core should be possible with roughly the following:

```bash
# clone this repo or your fork
Expand Down
6 changes: 1 addition & 5 deletions generate_self_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,7 @@ def all_literal_values(type_: type[core_schema.Literal]) -> list[any]:


def eval_forward_ref(type_: Any) -> Any:
try:
return type_._evaluate(core_schema.__dict__, None, set())
except TypeError:
# for older python (3.7 at least)
return type_._evaluate(core_schema.__dict__, None)
return type_._evaluate(core_schema.__dict__, None, set())


def main() -> None:
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = 'maturin'

[project]
name = 'pydantic_core'
requires-python = '>=3.7'
requires-python = '>=3.8'
authors = [
{name = 'Samuel Colvin', email = 's@muelcolvin.com'}
]
Expand All @@ -16,7 +16,6 @@ classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
Expand Down

0 comments on commit a196e90

Please sign in to comment.