|
1 | | -[build-system] |
2 | | -requires = ["hatchling", "hatch-vcs"] |
3 | | -build-backend = "hatchling.build" |
4 | | - |
5 | 1 | [project] |
6 | 2 | name = "protovalidate" |
7 | 3 | description = "Protocol Buffer Validation for Python" |
8 | 4 | readme = "README.md" |
9 | | -license = "Apache-2.0" |
10 | | -license-files = ["LICENSE"] |
11 | | -keywords = ["validate", "protobuf", "protocol buffer"] |
12 | 5 | # Keep our minimum version synced with ./.python-version. |
13 | 6 | requires-python = ">=3.10" |
| 7 | +license = "Apache-2.0" |
| 8 | +license-files = ["LICENSE"] |
| 9 | +keywords = ["protobuf", "protocol buffer", "validate"] |
14 | 10 | classifiers = [ |
| 11 | + "Operating System :: OS Independent", |
15 | 12 | "Programming Language :: Python :: 3.10", |
16 | 13 | "Programming Language :: Python :: 3.11", |
17 | 14 | "Programming Language :: Python :: 3.12", |
18 | 15 | "Programming Language :: Python :: 3.13", |
19 | 16 | "Programming Language :: Python :: 3.14", |
20 | | - "Operating System :: OS Independent", |
21 | 17 | "Typing :: Typed", |
22 | 18 | ] |
23 | | -dynamic = ["version"] |
24 | 19 | dependencies = [ |
25 | | - # We need at least this version, which fixed Python 3.14 compatibility (tp_new metaclass issue). |
26 | | - # The fix was never backported to the 5.x series. |
27 | | - # Ref: https://github.com/protocolbuffers/protobuf/pull/20594 |
28 | | - "protobuf>=6.31.0; python_version >= '3.14'", |
29 | | - "protobuf>=5", |
30 | 20 | "cel-python>=0.5", |
31 | | - # We need at least this version, which started publishing wheels for Python 3.14. |
32 | | - # Ref: https://github.com/google/re2/issues/580 |
33 | | - "google-re2>=1.1.20251105; python_version == '3.14'", |
| 21 | + "google-re2>=1", |
34 | 22 | # We need at least this version, which started publishing wheels for Python 3.13. |
35 | 23 | # Ref: https://github.com/google/re2/issues/516 |
36 | 24 | "google-re2>=1.1.20250722; python_version == '3.13'", |
| 25 | + # We need at least this version, which started publishing wheels for Python 3.14. |
| 26 | + # Ref: https://github.com/google/re2/issues/580 |
| 27 | + "google-re2>=1.1.20251105; python_version == '3.14'", |
37 | 28 | # 1.1 started supporting 3.12. |
38 | 29 | "google-re2>=1.1; python_version == '3.12'", |
39 | | - "google-re2>=1", |
| 30 | + "protobuf>=5", |
| 31 | + # We need at least this version, which fixed Python 3.14 compatibility (tp_new metaclass issue). |
| 32 | + # The fix was never backported to the 5.x series. |
| 33 | + # Ref: https://github.com/protocolbuffers/protobuf/pull/20594 |
| 34 | + "protobuf>=6.31.0; python_version >= '3.14'", |
40 | 35 | ] |
| 36 | +dynamic = ["version"] |
41 | 37 |
|
42 | 38 | [project.urls] |
| 39 | +Documentation = "https://protovalidate.com" |
43 | 40 | Homepage = "https://github.com/bufbuild/protovalidate-python" |
44 | | -Source = "https://github.com/bufbuild/protovalidate-python" |
45 | 41 | Issues = "https://github.com/bufbuild/protovalidate-python/issues" |
46 | | -Documentation = "https://protovalidate.com" |
| 42 | +Source = "https://github.com/bufbuild/protovalidate-python" |
47 | 43 |
|
48 | 44 | [dependency-groups] |
49 | 45 | dev = [ |
50 | 46 | "google-re2-stubs>=0.1.1", |
51 | 47 | "mypy>=1.17.1", |
52 | 48 | "pytest>=9.0.2", |
53 | 49 | "ruff>=0.12.0", |
| 50 | + "tombi>=0.9.12", |
54 | 51 | "types-protobuf>=5.29.1.20250315", |
55 | 52 | ] |
56 | 53 |
|
| 54 | +[build-system] |
| 55 | +requires = ["hatch-vcs", "hatchling"] |
| 56 | +build-backend = "hatchling.build" |
| 57 | + |
57 | 58 | [tool.hatch.version] |
58 | 59 | source = "vcs" |
59 | 60 | raw-options = { fallback_version = "0.0.0" } |
60 | 61 |
|
| 62 | +[tool.mypy] |
| 63 | +mypy_path = "gen" |
| 64 | + |
| 65 | +[tool.pytest] |
| 66 | +# Turn all warnings into errors, |
| 67 | +# except DeprecationWarnings (which we knowingly tolerate due to using old `protobuf` APIs). |
| 68 | +filterwarnings = ["error", "ignore::DeprecationWarning"] |
| 69 | +strict = true |
| 70 | +# restrict testpaths to speed up test discovery |
| 71 | +testpaths = ["test"] |
| 72 | + |
61 | 73 | [tool.ruff] |
62 | 74 | line-length = 120 |
63 | 75 | lint.select = [ |
@@ -107,16 +119,5 @@ ban-relative-imports = "all" |
107 | 119 | # Tests can use assertions. |
108 | 120 | "test/**/*" = ["S101"] |
109 | 121 |
|
110 | | -[tool.pytest] |
111 | | -strict = true |
112 | | -# restrict testpaths to speed up test discovery |
113 | | -testpaths = ["test"] |
114 | | -# Turn all warnings into errors, |
115 | | -# except DeprecationWarnings (which we knowingly tolerate due to using old `protobuf` APIs). |
116 | | -filterwarnings = ["error", "ignore::DeprecationWarning"] |
117 | | - |
118 | | -[tool.mypy] |
119 | | -mypy_path = "gen" |
120 | | - |
121 | 122 | [tool.ty.environment] |
122 | 123 | extra-paths = ["gen"] |
0 commit comments