Skip to content

Commit 92a7b46

Browse files
committed
Switch from Poetry to PDM
I prefer PDM and intend to use it for all my projects.
1 parent 6cb9c5c commit 92a7b46

4 files changed

Lines changed: 39 additions & 41 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
python-version: 3.12
1515

1616
- run: |
17-
pip install poetry
18-
poetry build
17+
pip install pdm
18+
pdm build
1919
- uses: actions/upload-artifact@v3
2020
with:
2121
path: ./dist

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ docs/_build/
1212
docs/reference/source/
1313
dist/
1414
.coverage
15-
poetry.lock
15+
pdm.lock
1616
.idea/
1717
.DS_Store

pyproject.toml

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
[tool.poetry]
1+
[project]
22
name = "Hypercorn"
33
version = "0.17.3"
44
description = "A ASGI Server based on Hyper libraries and inspired by Gunicorn"
5-
authors = ["pgjones <philip.graham.jones@googlemail.com>"]
5+
authors = [
6+
{name = "pgjones", email = "philip.graham.jones@googlemail.com"},
7+
]
68
classifiers = [
79
"Development Status :: 4 - Beta",
810
"Environment :: Web Environment",
@@ -20,45 +22,42 @@ classifiers = [
2022
"Topic :: Software Development :: Libraries :: Python Modules",
2123
]
2224
include = ["src/hypercorn/py.typed"]
23-
license = "MIT"
25+
license = {text = "MIT"}
2426
readme = "README.rst"
2527
repository = "https://github.com/pgjones/hypercorn/"
28+
dependencies = [
29+
"exceptiongroup >= 1.1.0; python_version < '3.11'",
30+
"h11",
31+
"h2 >= 3.1.0",
32+
"priority",
33+
"taskgroup; python_version < '3.11'",
34+
"tomli; python_version < '3.11'",
35+
"typing_extensions; python_version < '3.11'",
36+
"wsproto >= 0.14.0"
37+
]
2638
documentation = "https://hypercorn.readthedocs.io"
39+
requires-python = ">=3.8"
2740

28-
[tool.poetry.dependencies]
29-
python = ">=3.8"
30-
aioquic = { version = ">= 0.9.0, < 1.0", optional = true }
31-
exceptiongroup = { version = ">= 1.1.0", python = "<3.11" }
32-
h11 = "*"
33-
h2 = ">=3.1.0"
34-
priority = "*"
35-
pydata_sphinx_theme = { version = "*", optional = true }
36-
sphinxcontrib_mermaid = { version = "*", optional = true }
37-
taskgroup = { version = "*", python = "<3.11", allow-prereleases = true }
38-
tomli = { version = "*", python = "<3.11" }
39-
trio = { version = ">=0.22.0", optional = true }
40-
typing_extensions = { version = "*", python = "<3.11" }
41-
uvloop = { version = ">=0.18", markers = "platform_system != 'Windows'", optional = true }
42-
wsproto = ">=0.14.0"
43-
44-
[tool.poetry.dev-dependencies]
45-
httpx = "*"
46-
hypothesis = "*"
47-
mock = "*"
48-
pytest = "*"
49-
pytest-asyncio = "*"
50-
pytest-trio = "*"
51-
trio = "*"
52-
53-
[tool.poetry.scripts]
54-
hypercorn = "hypercorn.__main__:main"
55-
56-
[tool.poetry.extras]
41+
[project.optional-dependencies]
5742
docs = ["pydata_sphinx_theme", "sphinxcontrib_mermaid"]
58-
h3 = ["aioquic"]
43+
h3 = ["aioquic >= 0.9.0"]
5944
trio = ["trio"]
6045
uvloop = ["uvloop"]
6146

47+
[dependency-groups]
48+
dev = [
49+
"httpx",
50+
"hypothesis",
51+
"mock",
52+
"pytest",
53+
"pytest-asyncio",
54+
"pytest-trio",
55+
"trio"
56+
]
57+
58+
[project.scripts]
59+
hypercorn = "hypercorn.__main__:main"
60+
6261
[tool.black]
6362
line-length = 100
6463
target-version = ["py38"]
@@ -108,5 +107,5 @@ asyncio_mode = "strict"
108107
testpaths = ["tests"]
109108

110109
[build-system]
111-
requires = ["poetry-core>=1.0.0"]
112-
build-backend = "poetry.core.masonry.api"
110+
requires = ["pdm-backend"]
111+
build-backend = "pdm.backend"

tox.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ isolated_build = true
55

66
[testenv]
77
deps =
8-
py37: mock
98
httpx
109
hypothesis
1110
pytest
@@ -56,8 +55,8 @@ commands =
5655
[testenv:package]
5756
basepython = python3.12
5857
deps =
59-
poetry
58+
pdm
6059
twine
6160
commands =
62-
poetry build
61+
pdm build
6362
twine check dist/*

0 commit comments

Comments
 (0)