Skip to content

Commit f33a42b

Browse files
Update metadata to use PEP 621 (#654)
* Drop python version 3.8 support * Add python 3.13 support in CI
1 parent 36b5fd1 commit f33a42b

File tree

7 files changed

+242
-161
lines changed

7 files changed

+242
-161
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [Ubuntu, MacOS, Windows]
19-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
19+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
2020
steps:
2121
- uses: actions/checkout@v4
2222

.github/workflows/code-quality.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
name: Check code/doc formatting
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-python@v4
18-
- uses: pre-commit/action@v2.0.3
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
18+
- uses: pre-commit/action@v3.0.1

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v3
19-
- name: Set up Python 3.8
19+
- name: Set up Python 3.9
2020
uses: actions/setup-python@v4
2121
with:
22-
python-version: 3.8
22+
python-version: 3.9
2323
- name: Install poetry
2424
run: python -m pip install poetry
2525
- name: Build package

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- toml
1919

2020
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
21-
rev: v2.10.0
21+
rev: v2.14.0
2222
hooks:
2323
- id: pretty-format-java
2424
args: [--autofix, --aosp]

poetry.lock

Lines changed: 224 additions & 146 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
[tool.poetry]
1+
[project]
22
name = "betterproto"
33
version = "2.0.0b7"
44
description = "A better Protobuf / gRPC generator & library"
5-
authors = ["Daniel G. Taylor <[email protected]>"]
5+
authors = [
6+
{name = "Daniel G. Taylor", email = "[email protected]"}
7+
]
68
readme = "README.md"
79
repository = "https://github.com/danielgtaylor/python-betterproto"
810
keywords = ["protobuf", "gRPC"]
911
license = "MIT"
1012
packages = [
1113
{ include = "betterproto", from = "src" }
1214
]
15+
requires-python = ">=3.9,<4.0"
16+
dynamic = ["dependencies"]
1317

1418
[tool.poetry.dependencies]
15-
python = "^3.8"
1619
# The Ruff version is pinned. To update it, also update it in .pre-commit-config.yaml
1720
ruff = { version = "~0.7.4", optional = true }
1821
grpclib = "^0.4.1"
@@ -39,14 +42,14 @@ pytest-asyncio = "^0.12.0"
3942
pytest-cov = "^2.9.0"
4043
pytest-mock = "^3.1.1"
4144
pydantic = ">=2.0,<3"
42-
protobuf = "^4"
45+
protobuf = "^5"
4346
cachelib = "^0.10.2"
4447
tomlkit = ">=0.7.0"
4548

46-
[tool.poetry.scripts]
49+
[project.scripts]
4750
protoc-gen-python_betterproto = "betterproto.plugin:main"
4851

49-
[tool.poetry.extras]
52+
[project.optional-dependencies]
5053
compiler = ["ruff", "jinja2"]
5154
rust-codec = ["betterproto-rust-codec"]
5255

@@ -162,5 +165,5 @@ require_poetry = true
162165
"""
163166

164167
[build-system]
165-
requires = ["poetry-core>=1.0.0,<2"]
168+
requires = ["poetry-core>=2.0.0,<3"]
166169
build-backend = "poetry.core.masonry.api"

tests/test_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ def test_version():
1212
with PROJECT_TOML.open() as toml_file:
1313
project_config = tomlkit.loads(toml_file.read())
1414
assert (
15-
__version__ == project_config["tool"]["poetry"]["version"]
15+
__version__ == project_config["project"]["version"]
1616
), "Project version should match in package and package config"

0 commit comments

Comments
 (0)