Skip to content

Commit

Permalink
modernize everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Nov 22, 2024
1 parent 48965e0 commit 0b85069
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "test/http2-frame-test-case"]
path = test/http2-frame-test-case
path = tests/http2-frame-test-case
url = https://github.com/http2jp/http2-frame-test-case.git
6 changes: 2 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ dev
- Support for Python 3.11 has been added.
- Support for Python 3.12 has been added.
- Support for Python 3.13 has been added.

**Bugfixes**

-
- Improved type hints.
- Updated packaging and testing infrastructure.

6.0.1 (2021-04-17)
------------------
Expand Down
9 changes: 6 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
graft src/hyperframe
graft docs
graft test
graft tests

prune docs/build
prune test/http2-frame-test-case
include README.rst LICENSE CHANGELOG.rst CONTRIBUTORS.rst tox.ini .gitmodules
prune tests/http2-frame-test-case

include README.rst LICENSE CHANGELOG.rst CONTRIBUTORS.rst pyproject.toml tox.ini .gitmodules

global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store
101 changes: 101 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
# https://packaging.python.org/en/latest/specifications/pyproject-toml/

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "hyperframe"
description = "HTTP/2 framing layer for Python"
readme = { file = "README.rst", content-type = "text/x-rst" }
license = { file = "LICENSE" }

authors = [
{ name = "Cory Benfield", email = "[email protected]" }
]
maintainers = [
{ name = "Thomas Kriechbaumer", email = "[email protected]" },
]

requires-python = ">=3.9"
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.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]

[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]
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.50",
"readme-renderer==44.0",
"build>=1.2.2,<2",
"twine>=5.1.1,<6",
"wheel>=0.45.0,<1",
]

docs = [
"sphinx>=7.4.7,<9",
]

[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 = 140
target-version = "py39"

[tool.coverage.run]
branch = true
source = [ "hyperframe" ]

[tool.coverage.report]
fail_under = 100
show_missing = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError()",
]
27 changes: 0 additions & 27 deletions setup.cfg

This file was deleted.

50 changes: 0 additions & 50 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 9 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ python =
[testenv]
passenv =
GITHUB_*
deps =
pytest>=6.0.1,<7
pytest-cov>=2.10.1,<3
pytest-xdist>=2.2.1,<3
dependency_groups = testing
commands =
pytest --cov-report=xml --cov-report=term --cov=hyperframe {posargs}

Expand All @@ -25,16 +22,16 @@ commands =
commands = pytest {posargs}

[testenv:lint]
deps =
flake8>=7.1.1,<8
mypy>=1.13.0,<2
dependency_groups = linting
allowlist_externals =
ruff
mypy
commands =
flake8 src/ test/
ruff check src/ tests/
mypy --strict src/

[testenv:docs]
deps =
sphinx>=7.4.7,<9
dependency_groups = docs
allowlist_externals = make
changedir = {toxinidir}/docs
commands =
Expand All @@ -43,15 +40,12 @@ commands =

[testenv:packaging]
basepython = python3.9
deps =
check-manifest==0.50
readme-renderer==44.0
twine>=5.1.1,<6
dependency_groups = packaging
allowlist_externals = rm
commands =
rm -rf dist/
check-manifest
python setup.py sdist bdist_wheel
python -m build --outdir dist/
twine check dist/*

[testenv:publish]
Expand Down

0 comments on commit 0b85069

Please sign in to comment.