Skip to content

Commit a0ad0e5

Browse files
Use uv for dependencies and packaging
1 parent e315fbf commit a0ad0e5

File tree

6 files changed

+1608
-59
lines changed

6 files changed

+1608
-59
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jobs:
4343
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4444

4545
- name: Set up Python
46-
id: setup-python
4746
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4847
with:
4948
python-version: ${{ matrix.python-version }}
@@ -52,10 +51,8 @@ jobs:
5251
- name: Install Poetry
5352
run: pipx install poetry
5453

55-
- name: Install dependencies
56-
run: |
57-
poetry env use ${{ steps.setup-python.outputs.python-path }}
58-
poetry install
54+
- name: Install uv
55+
uses: astral-sh/setup-uv@d9e0f98d3fc6adb07d1e3d37f3043649ddad06a1 # v6.5.0
5956

6057
- name: Run tests
61-
run: poetry run pytest
58+
run: uvx --with tox-uv tox ${{ matrix.python-version }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ build/
77
dist/
88
.cache/
99
*.egg-info
10-
poetry.lock
1110
.vscode
1211
.python-version
12+
.tox/

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- Use `inspect.iscoroutinefunction` instead of `asyncio.iscoroutinefunction` to avoid Python 3.14 deprecation warning https://github.com/python-backoff/backoff/pull/3
6+
- Use uv for dependencies and packaging https://github.com/python-backoff/backoff/pull/7
7+
38
## [v2.2.1] - 2022-10-05
49

510
- Fix type hint for wait generators https://github.com/litl/backoff/issues/177

pyproject.toml

Lines changed: 71 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,81 @@
1-
[tool.poetry]
1+
[project]
22
name = "backoff"
33
version = "2.2.1"
44
description = "Function decoration for backoff and retry"
5-
authors = ["Bob Green <[email protected]>"]
5+
authors = [{ name = "Bob Green", email = "[email protected]" }]
6+
requires-python = ">=3.7"
67
readme = "README.rst"
7-
repository = "https://github.com/litl/backoff"
88
license = "MIT"
9-
keywords = ["retry", "backoff", "decorators"]
10-
classifiers = ['Development Status :: 5 - Production/Stable',
11-
'Intended Audience :: Developers',
12-
'Programming Language :: Python',
13-
'License :: OSI Approved :: MIT License',
14-
'Natural Language :: English',
15-
'Operating System :: OS Independent',
16-
'Programming Language :: Python',
17-
'Programming Language :: Python :: 3',
18-
'Programming Language :: Python :: 3.7',
19-
'Programming Language :: Python :: 3.8',
20-
'Programming Language :: Python :: 3.9',
21-
'Programming Language :: Python :: 3.10',
22-
'Programming Language :: Python :: 3.11',
23-
'Programming Language :: Python :: 3.12',
24-
'Programming Language :: Python :: 3.13',
25-
'Programming Language :: Python :: 3.14',
26-
'Topic :: Internet :: WWW/HTTP',
27-
'Topic :: Software Development :: Libraries :: Python Modules',
28-
'Topic :: Utilities']
29-
packages = [
30-
{ include = "backoff" },
9+
keywords = [
10+
"retry",
11+
"backoff",
12+
"decorators",
3113
]
14+
classifiers = [
15+
"Development Status :: 5 - Production/Stable",
16+
"Intended Audience :: Developers",
17+
"Programming Language :: Python",
18+
"License :: OSI Approved :: MIT License",
19+
"Natural Language :: English",
20+
"Operating System :: OS Independent",
21+
"Programming Language :: Python",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.7",
24+
"Programming Language :: Python :: 3.8",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
28+
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
30+
"Programming Language :: Python :: 3.14",
31+
"Topic :: Internet :: WWW/HTTP",
32+
"Topic :: Software Development :: Libraries :: Python Modules",
33+
"Topic :: Utilities",
34+
]
35+
36+
[project.urls]
37+
Repository = "https://github.com/litl/backoff"
38+
39+
[dependency-groups]
40+
dev = [
41+
{ include-group = "tests" },
42+
"flake8>=4.0.1",
43+
"mypy>=0.942",
44+
"types-requests>=2.27.20",
45+
]
46+
tests = [
47+
"pytest>=7.1.2",
48+
"pytest-asyncio>=0.18.3",
49+
"pytest-cov>=3.0.0",
50+
"requests>=2.26.0",
51+
"responses>=0.20.0",
52+
]
53+
54+
[tool.hatch.build.targets.sdist]
55+
include = ["backoff"]
3256

33-
[tool.poetry.dependencies]
34-
python = ">=3.7"
57+
[tool.hatch.build.targets.wheel]
58+
include = ["backoff"]
59+
60+
[tool.tox]
61+
min_version = "4.22"
62+
requires = [ "tox", "tox-uv" ]
63+
env_list = [
64+
"3.7",
65+
"3.8",
66+
"3.9",
67+
"3.10",
68+
"3.11",
69+
"3.12",
70+
"3.13",
71+
"3.14",
72+
]
3573

36-
[tool.poetry.group.dev.dependencies]
37-
flake8 = "^4.0.1"
38-
mypy = "^0.942"
39-
pytest = "^7.1.2"
40-
pytest-asyncio = "^0.18.3"
41-
pytest-cov = "^3.0.0"
42-
requests = "^2.26.0"
43-
responses = "^0.20.0"
44-
types-requests = "^2.27.20"
74+
[tool.tox.env_run_base]
75+
description = "run unit tests"
76+
dependency_groups = [ "tests" ]
77+
commands = [ [ "pytest", { replace = "posargs", default = [ "tests" ], extend = true } ] ]
4578

4679
[build-system]
47-
requires = ["poetry-core>=1.0.0"]
48-
build-backend = "poetry.core.masonry.api"
80+
requires = ["hatchling"]
81+
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)