Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Add Python 3.10 support (#15)
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Marie Lemetayer <[email protected]>
  • Loading branch information
jmlemetayer committed Jun 11, 2024
1 parent b67b606 commit a020528
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
9 changes: 8 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@

## New Features

<!-- Here goes the main new features and examples or instructions on how to use them -->
- *Partial support* of Python 3.10:

The python package can be used as is. But for testing purposes,
dependencies must be installed using `--ignore-requires-python`.

```bash
python -m pip install --ignore-requires-python -e .[dev]
```

## Bug Fixes

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ classifiers = [
"Topic :: Software Development :: Libraries",
"Typing :: Typed",
]
requires-python = ">= 3.11, < 4"
requires-python = ">= 3.10, < 4"
dependencies = [
"betterproto[compiler] == 2.0.0b6",
"grpcio-tools >= 1.59.0, < 2",
"setuptools >= 67.6.0",
"typing-extensions >= 4.5.0, < 5",
"tomli >= 2.0.1, < 3; python_version < '3.11'",
]
dynamic = ["version"]

Expand Down
11 changes: 9 additions & 2 deletions src/setuptools_betterproto/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@
import dataclasses
import logging
import pathlib
import tomllib
import sys
from collections.abc import Sequence
from typing import Any, Self
from typing import Any

from typing_extensions import Self

if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib

_logger = logging.getLogger(__name__)

Expand Down

0 comments on commit a020528

Please sign in to comment.