Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ Drop support for Python 3.7, require Python 3.8 or above #10442

Merged
merged 4 commits into from Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.10"
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
cache-dependency-path: pyproject.toml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
pydantic-version: ["pydantic-v1", "pydantic-v2"]
fail-fast: false
steps:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -27,7 +27,7 @@

---

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.

The key features are:

Expand Down Expand Up @@ -120,7 +120,7 @@ If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be

## Requirements

Python 3.7+
Python 3.8+

FastAPI stands on the shoulders of giants:

Expand Down Expand Up @@ -336,7 +336,7 @@ You do that with standard modern Python types.

You don't have to learn a new syntax, the methods or classes of a specific library, etc.

Just standard **Python 3.7+**.
Just standard **Python 3.8+**.

For example, for an `int`:

Expand Down
8 changes: 4 additions & 4 deletions docs/en/docs/how-to/separate-openapi-schemas.md
Expand Up @@ -44,7 +44,7 @@ Let's say you have a Pydantic model with default values, like this one:

</details>

=== "Python 3.7+"
=== "Python 3.8+"

```Python hl_lines="9"
{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-9]!}
Expand Down Expand Up @@ -99,7 +99,7 @@ If you use this model as an input like here:

</details>

=== "Python 3.7+"
=== "Python 3.8+"

```Python hl_lines="16"
{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-17]!}
Expand Down Expand Up @@ -142,7 +142,7 @@ But if you use the same model as an output, like here:
{!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!}
```

=== "Python 3.7+"
=== "Python 3.8+"

```Python hl_lines="21"
{!> ../../../docs_src/separate_openapi_schemas/tutorial001.py!}
Expand Down Expand Up @@ -214,7 +214,7 @@ In that case, you can disable this feature in **FastAPI**, with the parameter `s
{!> ../../../docs_src/separate_openapi_schemas/tutorial002_py39.py!}
```

=== "Python 3.7+"
=== "Python 3.8+"

```Python hl_lines="12"
{!> ../../../docs_src/separate_openapi_schemas/tutorial002.py!}
Expand Down
6 changes: 3 additions & 3 deletions docs/en/docs/index.md
Expand Up @@ -27,7 +27,7 @@

---

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.

The key features are:

Expand Down Expand Up @@ -115,7 +115,7 @@ If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be

## Requirements

Python 3.7+
Python 3.8+

FastAPI stands on the shoulders of giants:

Expand Down Expand Up @@ -331,7 +331,7 @@ You do that with standard modern Python types.

You don't have to learn a new syntax, the methods or classes of a specific library, etc.

Just standard **Python 3.7+**.
Just standard **Python 3.8+**.

For example, for an `int`:

Expand Down
2 changes: 1 addition & 1 deletion docs/es/docs/index.md
Expand Up @@ -106,7 +106,7 @@ Si estás construyendo un app de <abbr title="Interfaz de línea de comandos en

## Requisitos

Python 3.7+
Python 3.8+

FastAPI está sobre los hombros de gigantes:

Expand Down
6 changes: 3 additions & 3 deletions docs/fr/docs/index.md
Expand Up @@ -27,7 +27,7 @@

---

FastAPI est un framework web moderne et rapide (haute performance) pour la création d'API avec Python 3.7+, basé sur les annotations de type standard de Python.
FastAPI est un framework web moderne et rapide (haute performance) pour la création d'API avec Python 3.8+, basé sur les annotations de type standard de Python.

Les principales fonctionnalités sont :

Expand Down Expand Up @@ -115,7 +115,7 @@ Si vous souhaitez construire une application <abbr title="Command Line Interface

## Prérequis

Python 3.7+
Python 3.8+

FastAPI repose sur les épaules de géants :

Expand Down Expand Up @@ -331,7 +331,7 @@ Vous faites cela avec les types Python standard modernes.

Vous n'avez pas à apprendre une nouvelle syntaxe, les méthodes ou les classes d'une bibliothèque spécifique, etc.

Juste du **Python 3.7+** standard.
Juste du **Python 3.8+** standard.

Par exemple, pour un `int`:

Expand Down
2 changes: 1 addition & 1 deletion docs/ja/docs/index.md
Expand Up @@ -107,7 +107,7 @@ FastAPI は、Pythonの標準である型ヒントに基づいてPython 3.6 以

## 必要条件

Python 3.7+
Python 3.8+

FastAPI は巨人の肩の上に立っています。

Expand Down
2 changes: 1 addition & 1 deletion docs/ko/docs/index.md
Expand Up @@ -107,7 +107,7 @@ FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트

## 요구사항

Python 3.7+
Python 3.8+

FastAPI는 거인들의 어깨 위에 서 있습니다:

Expand Down
2 changes: 1 addition & 1 deletion docs/pl/docs/index.md
Expand Up @@ -106,7 +106,7 @@ Jeżeli tworzysz aplikacje <abbr title="aplikacja z interfejsem konsolowym">CLI<

## Wymagania

Python 3.7+
Python 3.8+

FastAPI oparty jest na:

Expand Down
2 changes: 1 addition & 1 deletion docs/pt/docs/index.md
Expand Up @@ -100,7 +100,7 @@ Se você estiver construindo uma aplicação <abbr title="Command Line Interface

## Requisitos

Python 3.7+
Python 3.8+

FastAPI está nos ombros de gigantes:

Expand Down
2 changes: 1 addition & 1 deletion docs/ru/docs/index.md
Expand Up @@ -109,7 +109,7 @@ FastAPI — это современный, быстрый (высокопрои

## Зависимости

Python 3.7+
Python 3.8+

FastAPI стоит на плечах гигантов:

Expand Down
2 changes: 1 addition & 1 deletion docs/tr/docs/index.md
Expand Up @@ -115,7 +115,7 @@ Eğer API yerine <abbr title="Command Line Interface">komut satırı uygulaması

## Gereksinimler

Python 3.7+
Python 3.8+

FastAPI iki devin omuzları üstünde duruyor:

Expand Down
6 changes: 3 additions & 3 deletions docs/vi/docs/index.md
Expand Up @@ -27,7 +27,7 @@

---

FastAPI là một web framework hiện đại, hiệu năng cao để xây dựng web APIs với Python 3.7+ dựa trên tiêu chuẩn Python type hints.
FastAPI là một web framework hiện đại, hiệu năng cao để xây dựng web APIs với Python 3.8+ dựa trên tiêu chuẩn Python type hints.

Những tính năng như:

Expand Down Expand Up @@ -116,7 +116,7 @@ Nếu bạn đang xây dựng một <abbr title="Giao diện dòng lệnh">CLI</

## Yêu cầu

Python 3.7+
Python 3.8+

FastAPI đứng trên vai những người khổng lồ:

Expand Down Expand Up @@ -332,7 +332,7 @@ Bạn định nghĩa bằng cách sử dụng các kiểu dữ liệu chuẩn c

Bạn không phải học một cú pháp mới, các phương thức và class của một thư viện cụ thể nào.

Chỉ cần sử dụng các chuẩn của **Python 3.7+**.
Chỉ cần sử dụng các chuẩn của **Python 3.8+**.

Ví dụ, với một tham số kiểu `int`:

Expand Down
6 changes: 3 additions & 3 deletions docs/yo/docs/index.md
Expand Up @@ -27,7 +27,7 @@

---

FastAPI jẹ́ ìgbàlódé, tí ó yára (iṣẹ-giga), ìlànà wẹ́ẹ́bù fún kikọ àwọn API pẹ̀lú Python 3.7+ èyí tí ó da lori àwọn ìtọ́kasí àmì irúfẹ́ Python.
FastAPI jẹ́ ìgbàlódé, tí ó yára (iṣẹ-giga), ìlànà wẹ́ẹ́bù fún kikọ àwọn API pẹ̀lú Python 3.8+ èyí tí ó da lori àwọn ìtọ́kasí àmì irúfẹ́ Python.

Àwọn ẹya pàtàkì ni:

Expand Down Expand Up @@ -115,7 +115,7 @@ Ti o ba n kọ ohun èlò <abbr title="Command Line Interface">CLI</abbr> láti

## Èròjà

Python 3.7+
Python 3.8+

FastAPI dúró lórí àwọn èjìká tí àwọn òmíràn:

Expand Down Expand Up @@ -331,7 +331,7 @@ O ṣe ìyẹn pẹ̀lú irúfẹ́ àmì ìtọ́kasí ìgbàlódé Python.

O ò nílò láti kọ́ síńtáàsì tuntun, ìlànà tàbí ọ̀wọ́ kíláàsì kan pàtó, abbl (i.e. àti bẹbẹ lọ).

Ìtọ́kasí **Python 3.7+**
Ìtọ́kasí **Python 3.8+**

Fún àpẹẹrẹ, fún `int`:

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
name = "fastapi"
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
license = "MIT"
authors = [
{ name = "Sebastián Ramírez", email = "tiangolo@gmail.com" },
Expand All @@ -32,7 +32,6 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"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