Skip to content

Commit

Permalink
Update metadata to use PEP 621 (#654)
Browse files Browse the repository at this point in the history
* Drop python version 3.8 support
* Add python 3.13 support in CI
  • Loading branch information
jameshilliard authored Jan 14, 2025
1 parent 36b5fd1 commit f33a42b
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 161 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [Ubuntu, MacOS, Windows]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
name: Check code/doc formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v2.0.3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install poetry
run: python -m pip install poetry
- name: Build package
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- toml

- repo: /~https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.10.0
rev: v2.14.0
hooks:
- id: pretty-format-java
args: [--autofix, --aosp]
Expand Down
370 changes: 224 additions & 146 deletions poetry.lock

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
[tool.poetry]
[project]
name = "betterproto"
version = "2.0.0b7"
description = "A better Protobuf / gRPC generator & library"
authors = ["Daniel G. Taylor <danielgtaylor@gmail.com>"]
authors = [
{name = "Daniel G. Taylor", email = "danielgtaylor@gmail.com"}
]
readme = "README.md"
repository = "/~https://github.com/danielgtaylor/python-betterproto"
keywords = ["protobuf", "gRPC"]
license = "MIT"
packages = [
{ include = "betterproto", from = "src" }
]
requires-python = ">=3.9,<4.0"
dynamic = ["dependencies"]

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

[tool.poetry.scripts]
[project.scripts]
protoc-gen-python_betterproto = "betterproto.plugin:main"

[tool.poetry.extras]
[project.optional-dependencies]
compiler = ["ruff", "jinja2"]
rust-codec = ["betterproto-rust-codec"]

Expand Down Expand Up @@ -162,5 +165,5 @@ require_poetry = true
"""

[build-system]
requires = ["poetry-core>=1.0.0,<2"]
requires = ["poetry-core>=2.0.0,<3"]
build-backend = "poetry.core.masonry.api"
2 changes: 1 addition & 1 deletion tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def test_version():
with PROJECT_TOML.open() as toml_file:
project_config = tomlkit.loads(toml_file.read())
assert (
__version__ == project_config["tool"]["poetry"]["version"]
__version__ == project_config["project"]["version"]
), "Project version should match in package and package config"

0 comments on commit f33a42b

Please sign in to comment.