# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ # https://packaging.python.org/en/latest/specifications/pyproject-toml/ [build-system] requires = ["setuptools>=82", "wheel>=0.46.3"] build-backend = "setuptools.build_meta" [project] name = "hyperframe" description = "Pure-Python HTTP/2 framing" readme = { file = "README.rst", content-type = "text/x-rst" } license = { file = "LICENSE" } authors = [ { name = "Cory Benfield", email = "cory@lukasa.co.uk" } ] maintainers = [ { name = "Thomas Kriechbaumer", email = "thomas@kriechbaumer.name" }, ] requires-python = ">=3.10" dependencies = [] dynamic = ["version"] # For a list of valid classifiers, see https://pypi.org/classifiers/ classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", ] [project.urls] "Homepage" = "https://github.com/python-hyper/hyperframe/" "Bug Reports" = "https://github.com/python-hyper/hyperframe/issues" "Source" = "https://github.com/python-hyper/hyperframe/" "Documentation" = "https://python-hyper.org/" [dependency-groups] dev = [ { include-group = "testing" }, { include-group = "linting" }, { include-group = "packaging" }, { include-group = "docs" }, ] testing = [ "pytest>=8.3.3,<9", "pytest-cov>=6.0.0,<7", "pytest-xdist>=3.6.1,<4", ] linting = [ "ruff>=0.8.0,<1", "mypy>=1.13.0,<2", ] packaging = [ "check-manifest==0.51", "build>=1.4.2,<2", "twine>=6.2.0,<7", "wheel>=0.46.3,<1", ] docs = [ "sphinx>=9.1.0,<10", ] [tool.setuptools.packages.find] where = [ "src" ] [tool.setuptools.package-data] hyperframe = [ "py.typed" ] [tool.setuptools.dynamic] version = { attr = "hyperframe.__version__" } [tool.check-manifest] ignore = [ "Makefile", "tests/http2-frame-test-case", ] [tool.ruff] line-length = 150 target-version = "py314" format.preview = true format.docstring-code-line-length = 100 format.docstring-code-format = true lint.select = [ "ALL", ] lint.ignore = [ "ANN401", # kwargs with typing.Any "CPY", # not required "D101", # docs readability "D102", # docs readability "D105", # docs readability "D107", # docs readability "D200", # docs readability "D205", # docs readability "D205", # docs readability "D203", # docs readability "D212", # docs readability "D400", # docs readability "D401", # docs readability "D415", # docs readability "PLR2004", # readability "SIM108", # readability "RUF012", # readability "FBT001", # readability "FBT002", # readability "PGH003", # readability ] lint.isort.required-imports = [ "from __future__ import annotations" ] [tool.mypy] show_error_codes = true strict = true [tool.coverage.run] branch = true source = [ "hyperframe" ] [tool.coverage.report] fail_under = 100 show_missing = true exclude_lines = [ "pragma: no cover", "raise NotImplementedError", ] [tool.coverage.paths] source = [ "src/", ".tox/**/site-packages/", ] [tool.tox] min_version = "4.23.2" env_list = [ "py310", "py311", "py312", "py313", "py314", "lint", "docs", "packaging" ] [tool.tox.gh-actions] python = """ 3.10: py310, h2spec, lint, packaging 3.11: py311 3.12: py312 3.13: py313, docs 3.14: py314 """ [tool.tox.env_run_base] pass_env = [ "GITHUB_*", ] dependency_groups = ["testing"] commands = [ ["pytest", "--cov-report=xml", "--cov-report=term", "--cov=hyperframe", { replace = "posargs", extend = true }] ] [tool.tox.env.lint] dependency_groups = ["linting"] commands = [ ["ruff", "check", "src/"], ["mypy", "src/"], ] [tool.tox.env.docs] dependency_groups = ["docs"] allowlist_externals = ["make"] changedir = "{toxinidir}/docs" commands = [ ["make", "clean"], ["make", "html"], ] [tool.tox.env.packaging] base_python = ["python3.10"] dependency_groups = ["packaging"] allowlist_externals = ["rm"] commands = [ ["rm", "-rf", "dist/"], ["check-manifest"], ["python", "-m", "build", "--outdir", "dist/"], ["twine", "check", "dist/*"], ] [tool.tox.env.publish] base_python = ["python3.10"] dependency_groups = ["packaging"] allowlist_externals = ["twine"] commands = [ ["twine", "upload", "dist/*"], ]