From d8beb1509ae1578b5cefde533ab898c5eaeb3ce7 Mon Sep 17 00:00:00 2001 From: Yuzuru Date: Fri, 24 Oct 2025 00:53:20 +0800 Subject: [PATCH] feat(pyproject): migrate to PEP 621 compliance - Updated project metadata to use `[project]` table. - Moved dependencies and development dependencies to PEP 621 format. - Adjusted URLs, authors, and classifiers in line with PEP 621. - Retained `[tool.poetry].packages` for backward compatibility. This migration simplifies compatibility with modern packaging tools. --- pyproject.toml | 95 ++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 46 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f35f019..2f900c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,65 +1,68 @@ -[tool.poetry] +[project] name = "apiexception" version = "0.2.1" description = "Consistent JSON response formatting and exception & error handling for FastAPI applications" -authors = ["Ahmet Kutay URAL "] readme = "README.md" -license = "MIT" +requires-python = ">=3.9" +license = { text = "MIT" } +authors = [{ name = "Ahmet Kutay URAL", email = "ahmetkutayural@gmail.com" }] keywords = ["fastapi", "exception", "error-handling", "json-response"] classifiers = [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Framework :: FastAPI", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Software Development :: Libraries :: Application Frameworks", - "Typing :: Typed", + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Framework :: FastAPI", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Libraries :: Application Frameworks", + "Typing :: Typed", ] - -packages = [ - { include = "api_exception" } +dependencies = [ + "click>=8.0.0", + "fastapi>=0.115.4", + "httpx>=0.27.0", + "pydantic>=2.0.0", + "typing-extensions>=4.0.0", ] -[tool.poetry.urls] -"Documentation" = "https://akutayural.github.io/APIException/" -"Source" = "https://github.com/akutayural/APIException" +[project.urls] +Documentation = "https://akutayural.github.io/APIException/" +Source = "https://github.com/akutayural/APIException" "Bug Tracker" = "https://github.com/akutayural/APIException/issues" -"Changelog" = "https://github.com/akutayural/APIException/blob/main/docs/changelog.md" +Changelog = "https://github.com/akutayural/APIException/blob/main/docs/changelog.md" -[tool.poetry.dependencies] -python = ">=3.9,<4.0" -fastapi = ">=0.115.4" -httpx = ">=0.27.0" -pydantic = ">=2.0.0" -click = ">=8.0.0" -typing-extensions = ">=4.0.0" - -[tool.poetry.group.dev.dependencies] -mkdocs-awesome-pages-plugin = ">=2.10.1" -mkdocs-macros-plugin = ">=1.3.7" -mkdocs-material = ">=9.6.16" -ruff = "==0.12.5" -setuptools = ">=80.9.0" -uvicorn = ">=0.32.0" -mypy = "^1.17.1" -types-requests = "^2.32.4.20250809" -types-click = "^7.1.8" - -[tool.poetry.scripts] +[project.scripts] APIException-info = "api_exception.__main__:main" +[dependency-groups] +dev = [ + "mkdocs-awesome-pages-plugin>=2.10.1", + "mkdocs-macros-plugin>=1.3.7", + "mkdocs-material>=9.6.16", + "ruff==0.12.5", + "setuptools>=80.9.0", + "uvicorn>=0.32.0", + "mypy>=1.17.1,<2.0.0", + "types-requests>=2.32.4.20250809,<3.0.0", + "types-click>=7.1.8,<8.0.0", +] + [build-system] requires = ["poetry-core>=1.9.0"] build-backend = "poetry.core.masonry.api" +[tool.poetry] +packages = [ + { include = "api_exception" } +] + [tool.setuptools.package-data] api_exception = ["py.typed"] @@ -69,4 +72,4 @@ ignore_missing_imports = true strict_optional = true warn_unused_ignores = true warn_redundant_casts = true -warn_unused_configs = true \ No newline at end of file +warn_unused_configs = true