mirror of https://github.com/tiangolo/fastapi.git
🔧 Migrate from Hatch to PDM for the internal build (#11498)
This commit is contained in:
parent
bec2ec7e4c
commit
41fcbc7d00
|
|
@ -8,6 +8,12 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
package:
|
||||||
|
- fastapi
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
env:
|
env:
|
||||||
|
|
@ -21,19 +27,14 @@ jobs:
|
||||||
# Issue ref: https://github.com/actions/setup-python/issues/436
|
# Issue ref: https://github.com/actions/setup-python/issues/436
|
||||||
# cache: "pip"
|
# cache: "pip"
|
||||||
# cache-dependency-path: pyproject.toml
|
# cache-dependency-path: pyproject.toml
|
||||||
- uses: actions/cache@v4
|
|
||||||
id: cache
|
|
||||||
with:
|
|
||||||
path: ${{ env.pythonLocation }}
|
|
||||||
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: pip install build
|
run: pip install build
|
||||||
- name: Build distribution
|
- name: Build distribution
|
||||||
|
env:
|
||||||
|
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
|
||||||
run: python -m build
|
run: python -m build
|
||||||
- name: Publish
|
- name: Publish
|
||||||
uses: pypa/gh-action-pypi-publish@v1.8.14
|
uses: pypa/gh-action-pypi-publish@v1.8.14
|
||||||
with:
|
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"""FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
|
"""FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
|
||||||
|
|
||||||
__version__ = "0.110.2"
|
__version__ = "0.110.3.dev2"
|
||||||
|
|
||||||
from starlette import status as status
|
from starlette import status as status
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling >= 1.13.0"]
|
requires = ["pdm-backend"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "pdm.backend"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "fastapi"
|
name = "fastapi"
|
||||||
|
dynamic = ["version"]
|
||||||
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
|
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
license = "MIT"
|
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Sebastián Ramírez", email = "tiangolo@gmail.com" },
|
{ name = "Sebastián Ramírez", email = "tiangolo@gmail.com" },
|
||||||
]
|
]
|
||||||
|
|
@ -45,7 +45,6 @@ dependencies = [
|
||||||
"pydantic>=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0",
|
"pydantic>=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0",
|
||||||
"typing-extensions>=4.8.0",
|
"typing-extensions>=4.8.0",
|
||||||
]
|
]
|
||||||
dynamic = ["version"]
|
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://github.com/tiangolo/fastapi"
|
Homepage = "https://github.com/tiangolo/fastapi"
|
||||||
|
|
@ -53,22 +52,67 @@ Documentation = "https://fastapi.tiangolo.com/"
|
||||||
Repository = "https://github.com/tiangolo/fastapi"
|
Repository = "https://github.com/tiangolo/fastapi"
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
|
|
||||||
|
# standard = [
|
||||||
|
# # For the test client
|
||||||
|
# "httpx >=0.23.0",
|
||||||
|
# # For templates
|
||||||
|
# "jinja2 >=2.11.2",
|
||||||
|
# # For forms and file uploads
|
||||||
|
# "python-multipart >=0.0.7",
|
||||||
|
# # For UJSONResponse
|
||||||
|
# "ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0",
|
||||||
|
# # For ORJSONResponse
|
||||||
|
# "orjson >=3.2.1",
|
||||||
|
# # To validate email fields
|
||||||
|
# "email_validator >=2.0.0",
|
||||||
|
# # Uvicorn with uvloop
|
||||||
|
# "uvicorn[standard] >=0.12.0",
|
||||||
|
# # Settings management
|
||||||
|
# "pydantic-settings >=2.0.0",
|
||||||
|
# # Extra Pydantic data types
|
||||||
|
# "pydantic-extra-types >=2.0.0",
|
||||||
|
# ]
|
||||||
|
|
||||||
all = [
|
all = [
|
||||||
|
# # For the test client
|
||||||
"httpx >=0.23.0",
|
"httpx >=0.23.0",
|
||||||
|
# For templates
|
||||||
"jinja2 >=2.11.2",
|
"jinja2 >=2.11.2",
|
||||||
|
# For forms and file uploads
|
||||||
"python-multipart >=0.0.7",
|
"python-multipart >=0.0.7",
|
||||||
|
# For Starlette's SessionMiddleware, not commonly used with FastAPI
|
||||||
"itsdangerous >=1.1.0",
|
"itsdangerous >=1.1.0",
|
||||||
|
# For Starlette's schema generation, would not be used with FastAPI
|
||||||
"pyyaml >=5.3.1",
|
"pyyaml >=5.3.1",
|
||||||
|
# For UJSONResponse
|
||||||
"ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0",
|
"ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0",
|
||||||
|
# For ORJSONResponse
|
||||||
"orjson >=3.2.1",
|
"orjson >=3.2.1",
|
||||||
|
# To validate email fields
|
||||||
"email_validator >=2.0.0",
|
"email_validator >=2.0.0",
|
||||||
|
# Uvicorn with uvloop
|
||||||
"uvicorn[standard] >=0.12.0",
|
"uvicorn[standard] >=0.12.0",
|
||||||
|
# Settings management
|
||||||
"pydantic-settings >=2.0.0",
|
"pydantic-settings >=2.0.0",
|
||||||
|
# Extra Pydantic data types
|
||||||
"pydantic-extra-types >=2.0.0",
|
"pydantic-extra-types >=2.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.hatch.version]
|
[tool.pdm]
|
||||||
path = "fastapi/__init__.py"
|
version = { source = "file", path = "fastapi/__init__.py" }
|
||||||
|
distribution = true
|
||||||
|
|
||||||
|
[tool.pdm.build]
|
||||||
|
source-includes = [
|
||||||
|
"tests/",
|
||||||
|
"docs_src/",
|
||||||
|
"requirements*.txt",
|
||||||
|
"scripts/",
|
||||||
|
# For a test
|
||||||
|
"docs/en/docs/img/favicon.png",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
strict = true
|
strict = true
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,14 @@
|
||||||
-e .
|
-e .[all]
|
||||||
-r requirements-docs-tests.txt
|
-r requirements-docs-tests.txt
|
||||||
pydantic-settings >=2.0.0
|
|
||||||
pytest >=7.1.3,<8.0.0
|
pytest >=7.1.3,<8.0.0
|
||||||
coverage[toml] >= 6.5.0,< 8.0
|
coverage[toml] >= 6.5.0,< 8.0
|
||||||
mypy ==1.8.0
|
mypy ==1.8.0
|
||||||
ruff ==0.2.0
|
ruff ==0.2.0
|
||||||
email_validator >=1.1.1,<3.0.0
|
|
||||||
dirty-equals ==0.6.0
|
dirty-equals ==0.6.0
|
||||||
# TODO: once removing databases from tutorial, upgrade SQLAlchemy
|
# TODO: once removing databases from tutorial, upgrade SQLAlchemy
|
||||||
# probably when including SQLModel
|
# probably when including SQLModel
|
||||||
sqlalchemy >=1.3.18,<1.4.43
|
sqlalchemy >=1.3.18,<1.4.43
|
||||||
databases[sqlite] >=0.3.2,<0.7.0
|
databases[sqlite] >=0.3.2,<0.7.0
|
||||||
orjson >=3.2.1,<4.0.0
|
|
||||||
ujson >=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0
|
|
||||||
python-multipart >=0.0.7,<0.1.0
|
|
||||||
flask >=1.1.2,<3.0.0
|
flask >=1.1.2,<3.0.0
|
||||||
anyio[trio] >=3.2.1,<4.0.0
|
anyio[trio] >=3.2.1,<4.0.0
|
||||||
python-jose[cryptography] >=3.3.0,<4.0.0
|
python-jose[cryptography] >=3.3.0,<4.0.0
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
-e .[all]
|
-e .[all]
|
||||||
-r requirements-tests.txt
|
-r requirements-tests.txt
|
||||||
-r requirements-docs.txt
|
-r requirements-docs.txt
|
||||||
uvicorn[standard] >=0.12.0,<0.23.0
|
|
||||||
pre-commit >=2.17.0,<4.0.0
|
pre-commit >=2.17.0,<4.0.0
|
||||||
# For generating screenshots
|
# For generating screenshots
|
||||||
playwright
|
playwright
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue