Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uv-resolution:
- highest
include:
- python-version: "3.10"
- python-version: "3.11"
os: ubuntu-latest
uv-resolution: lowest-direct
- python-version: "3.11"
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10
3.11
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Run and manage FastAPI apps from the command line with FastAPI CL
authors = [
{name = "Sebastián Ramírez", email = "tiangolo@gmail.com"},
]
requires-python = ">=3.10"
requires-python = ">=3.11"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
Expand All @@ -24,7 +24,6 @@ classifiers = [
"Framework :: FastAPI",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand All @@ -35,7 +34,6 @@ dependencies = [
"typer >= 0.26.1",
"uvicorn[standard] >= 0.15.0",
"rich-toolkit >= 0.14.8",
"tomli >= 2.0.0; python_version < '3.11'"
]

[project.optional-dependencies]
Expand Down Expand Up @@ -67,7 +65,7 @@ github-actions = [
"smokeshow>=0.5.0",
]
tests = [
"coverage[toml]>=6.2,<8.0",
"coverage[toml]>=7.9,<8.0",
"fastapi>=0.128.0",
"mypy==2.4.0",
"pytest>=7.4.0,<10.0.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/prepare_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import re
from datetime import date
from enum import Enum
from enum import StrEnum
from pathlib import Path
from typing import Annotated

Expand All @@ -14,7 +14,7 @@
LATEST_CHANGES_HEADER = "## Latest Changes"


class BumpType(str, Enum):
class BumpType(StrEnum):
major = "major"
minor = "minor"
patch = "patch"
Expand Down
13 changes: 1 addition & 12 deletions src/fastapi_cli/config.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import logging
import tomllib
from pathlib import Path
from typing import Any

from pydantic import BaseModel, StrictStr

logger = logging.getLogger(__name__)


class FastAPIConfig(BaseModel):
entrypoint: StrictStr | None = None
Expand All @@ -19,15 +17,6 @@ def _read_pyproject_toml(cls) -> dict[str, Any]:
if not pyproject_path.exists():
return {}

try:
import tomllib # type: ignore[import-not-found, unused-ignore] # ty: ignore[unresolved-import]
except ImportError:
try:
import tomli as tomllib # type: ignore[no-redef, import-not-found, unused-ignore]
except ImportError: # pragma: no cover
logger.debug("tomli not available, skipping pyproject.toml")
return {}

with open(pyproject_path, "rb") as f:
data = tomllib.load(f)

Expand Down
Loading
Loading