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

Refactor project configuration files from setup.cfg to pyproject.toml PEP-518 #995

Merged
merged 3 commits into from
Oct 7, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ __pycache__/
# Distribution / packaging
.Python
env/
.venv/
build/
develop-eggs/
dist/
Expand Down
127 changes: 111 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,130 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
]

[tool.coverage.run]
parallel = true
branch = true
source = ["jwt"]
[project]
authors = [
{ email = "hello@jpadilla.com", name = "Jose Padilla" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"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 :: Utilities",
]
description = "JSON Web Token implementation in Python"
dynamic = [
"version",
]
keywords = [
"json",
"jwt",
"security",
"signing",
"token",
"web",
]
name = "PyJWT"
requires-python = ">=3.8"

[project.license]
text = "MIT"

[project.optional-dependencies]
crypto = [
"cryptography>=3.4.0",
]
dev = [
"coverage[toml]==5.0.4",
"cryptography>=3.4.0",
"pre-commit",
"pytest>=6.0.0,<7.0.0",
"sphinx",
"sphinx-rtd-theme",
"zope.interface",
]
docs = [
"sphinx",
"sphinx-rtd-theme",
"zope.interface",
]
tests = [
"coverage[toml]==5.0.4",
"pytest>=6.0.0,<7.0.0",
]

[project.readme]
content-type = "text/x-rst"
file = "README.rst"

[project.urls]
Homepage = "https://github.com/jpadilla/pyjwt"

[tool.coverage.paths]
source = ["jwt", ".tox/*/site-packages"]
source = [
".tox/*/site-packages",
"jwt",
]

[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING:",
"pragma: no cover",
]
show_missing = true
exclude_lines = ["if TYPE_CHECKING:", "pragma: no cover"]

[tool.coverage.run]
branch = true
parallel = true
source = [
"jwt",
]

[tool.isort]
profile = "black"
atomic = true
combine_as_imports = true
profile = "black"

[tool.mypy]
python_version = 3.11
allow_incomplete_defs = true
allow_untyped_defs = true
ignore_missing_imports = true
warn_unused_ignores = true
no_implicit_optional = true
overrides = [
{ disallow_untyped_calls = false, module = "tests.*" },
]
python_version = 3.11
strict = true
# TODO: remove these strict loosenings when possible
allow_incomplete_defs = true
allow_untyped_defs = true
warn_return_any = false
warn_unused_ignores = true

[tool.setuptools]
include-package-data = true
zip-safe = false

[tool.setuptools.dynamic.version]
attr = "jwt.__version__"

[tool.setuptools.package-data]
"*" = [
"py.typed",
]

[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_calls = false
[tool.setuptools.packages.find]
exclude = [
"tests",
"tests.*",
]
namespaces = false
68 changes: 0 additions & 68 deletions setup.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions setup.py

This file was deleted.

4 changes: 4 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[flake8]
min_python_version = 3.8
ignore= E501, E203, W503, E704

[pytest]
addopts = -ra
testpaths = tests
Expand Down
Loading