From 182d1abf4008bdded791df6de71e80635973128d Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 May 2025 12:04:25 -0400 Subject: [PATCH 01/12] re2 --- protovalidate/internal/extra_func.py | 13 +++++++++++-- tests/matches_test.py | 13 +++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 tests/matches_test.py diff --git a/protovalidate/internal/extra_func.py b/protovalidate/internal/extra_func.py index ae2b02c0..53ae03a7 100644 --- a/protovalidate/internal/extra_func.py +++ b/protovalidate/internal/extra_func.py @@ -13,18 +13,18 @@ # limitations under the License. import math -import re import typing from urllib import parse as urlparse import celpy +import re2 from celpy import celtypes from protovalidate.internal import string_format from protovalidate.internal.rules import MessageType, field_to_cel # See https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address -_email_regex = re.compile( +_email_regex = re2.compile( r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$" ) @@ -1553,6 +1553,14 @@ def __peek(self, char: str) -> bool: return self._index < len(self._string) and self._string[self._index] == char +def matches(text: str, pattern: str) -> celpy.Result: + try: + m = re2.search(pattern, text) + except re2.error as ex: + return celpy.CELEvalError("match error", ex.__class__, ex.args) + return celtypes.BoolType(m is not None) + + def make_extra_funcs(locale: str) -> dict[str, celpy.CELFunction]: # TODO(#257): Fix types and add tests for StringFormat. # For now, ignoring the type. @@ -1560,6 +1568,7 @@ def make_extra_funcs(locale: str) -> dict[str, celpy.CELFunction]: return { # Missing standard functions "format": string_fmt.format, + "matches": matches, # protovalidate specific functions "getField": cel_get_field, "isNan": cel_is_nan, diff --git a/tests/matches_test.py b/tests/matches_test.py new file mode 100644 index 00000000..1c23345b --- /dev/null +++ b/tests/matches_test.py @@ -0,0 +1,13 @@ +# Copyright 2023-2025 Buf Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. From 4a3be8097a655e6ac00e81197b4e2e1260bc7f18 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 May 2025 15:53:13 -0400 Subject: [PATCH 02/12] Override matches with re2 implementation --- .github/CONTRIBUTING.md | 8 +++- Makefile | 1 - Pipfile | 1 + Pipfile.lock | 60 +++++++++++++++++++++++++++- protovalidate/internal/extra_func.py | 23 ++++++----- pyproject.toml | 6 +-- tests/matches_test.py | 18 +++++++++ 7 files changed, 101 insertions(+), 16 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 627d9519..7184dfc9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -19,8 +19,12 @@ git clone git@github.com:bufbuild/protovalidate-python.git cd protovalidate-python ``` -Then, make any changes you'd like. We use a Makefile to test and lint our code, -so you'll need a few non-Python tools: +Next, install dependencies. You will need: + +* Python >=v3.9 +* [Pipenv](https://pipenv.pypa.io/en/latest/index.html) + +We use a Makefile to test and lint our code, so you'll also need a few non-Python tools: * GNU Make (to use the Makefile): part of the `build-essential` package on Debian-derived Linux distributions (including Ubuntu), and part of diff --git a/Makefile b/Makefile index a96320b9..f5bc54e5 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,6 @@ lint: install ## Lint code .PHONY: install install: ## Install dependencies - $(PYTHON) -m pip install --upgrade pip pipenv pipenv --python $(PYTHON) sync --dev .PHONY: checkgenerate diff --git a/Pipfile b/Pipfile index 0163de0e..619b5edb 100644 --- a/Pipfile +++ b/Pipfile @@ -6,6 +6,7 @@ name = "pypi" [packages] cel-python = "==0.2.*" protobuf = "==6.*" +google-re2 = "*" [dev-packages] pytest = "*" diff --git a/Pipfile.lock b/Pipfile.lock index a92ddd16..22e4d6e6 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "2244230d5507f6a004047e0856c65eea89ab850a6932e9a2e96f63511b32a3ff" + "sha256": "ac8481b9739a0ce0abf3835047989831f1fab5d0fcc293f1815a3dc9f654890b" }, "pipfile-spec": 6, "requires": { @@ -25,6 +25,64 @@ "markers": "python_version >= '3.8' and python_version < '4.0'", "version": "==0.2.0" }, + "google-re2": { + "hashes": [ + "sha256:00dcb09b15f92b490ae52f328cca229de2a157c8748f10df94dfea7637d32617", + "sha256:05f5683e1bcfac8adcc0dbfe3ecb0866cec6eea2c7d419271dfd72930b368ce4", + "sha256:16bd5389baeb98936fb05926e6a38826c473206c13f1f789f7643a29dcccccc3", + "sha256:1950f499b277789267afee1755394cd959898d0b192b7052bb3186000aff27de", + "sha256:22217d7c8f57bb6c5e74e171a510b12cdde4eddc2528f89aa0f50e3fc10fe17e", + "sha256:2269ff8c2e1de0ee77736bd9f65b5c9f7cd43544eff825dc7b4ab2bf1f1901e4", + "sha256:2ffc6fbe70ccf9fb66d0ab16ccad0f661031ceb0eec3d73d170cd782a93d62d5", + "sha256:304ed3f740541742e7ef5c162b36619efdac7345f1429ab6d70aefaae9a5658d", + "sha256:386d2a8c4b10daaeda03adc7f65c457f67ee8cb18b4f9b4178a44ed62ab291df", + "sha256:39c642041428efaa48f35adf4475a014ce272f87a453c6dff68f2b05793d516f", + "sha256:3c8d2c0a03e9fd24f78b624cf7e40ac32aaf4837fda7339e2c22ca42e3dca512", + "sha256:40568559b0a10240c10377fb5cdd46c9115da8a627c567db68c4dc29103a2ce9", + "sha256:42c2c39b7378e928d197e4fdf4a23c9338f29cad6d4c5c5c06a2ad7c8c2a3ebc", + "sha256:449ae8286d644d24af8a6eb81eeba6995388581739920b80d9e4b063eefe0322", + "sha256:46e7ed614ffaafccae017542d68e9bbf664c8c1e5ca37046adee640bbee4846e", + "sha256:4b920c1b0356f0359b35a0e6d0b5ff12fba9067d3c455a9811952fbc9a213268", + "sha256:4e13241b8df4096d840f98993f39c62cff0cdab9d06c86b156d2944cfb3f0814", + "sha256:56c2a97d3d38345939fb3ff02d154f5c6ec929e0765723cfd390720f581d2581", + "sha256:5e35c8db1bf58ddf1ac28782d6dca5894a0331fc0d33b2a2ce6eb59234d74312", + "sha256:652e517b6db6cbf7403bab370940718208b15e811fefe7635d4e78a8037f096b", + "sha256:6887fe9c291ad42003ad84e11c0a6fac0169adbda9cbc898b8657610512e4ce5", + "sha256:69f9b156de6f93ea00844f6cd4f2ed5124f9f01692da7ae0fe9a9516df6c63c2", + "sha256:71a71d7f9e616d3067e913a1432111593ee41aab2e0ed21ecbcf039451b9d899", + "sha256:7388c5aadcc5489291d2804ecc384c2e3bb64832e1b46afd44d7bca6c948b615", + "sha256:7480309b133c39f2afb19ff28bc30d27b364cbc56b5d46918d1b4f1fb2e13183", + "sha256:757cbefbe9f998c274c94afd8bf2a4789b983287f33d4f975389c1027ed686c6", + "sha256:7bc4fa65ecec3d63ea6048ecaf8784560bbfb31191c02ffaa87771e4a2f813e1", + "sha256:7d3d1e58f374510101273cda1b6c2b45c178eb94f4c1bd17f7f750cea8d1c85a", + "sha256:7e1d36bd20ce04c1198fe482b6f3ce7dd699e1276946a9a2cf31b2e53026a370", + "sha256:7e4a2b88516b4140891a014c6e5b774f57db90c8bd0ccf0554e9f9b99ee1e942", + "sha256:7fee39772aa2e1fe91b7694acc48888ac6fa0ca51f8805464272a2089b362c96", + "sha256:8139df33d61aac335726b6f32108e763ba2932569c63d2b3ebf6e36a40449223", + "sha256:82824fa71f51a269cd9bad653d53e6ba5bee9095da059455ee1c6cc7e4ba014b", + "sha256:8788db69f6c93cb229df62c74b2d9aa8e64bf754e9495700f85812afa32efd2b", + "sha256:974ac711ade3171004e9552d9e069cbe1a8de02c5e45a56101f8396f69a3e3c2", + "sha256:9802a5a5ec585048300d5a8ec522b15057b8f758fe9f8b0ec65ac2927a36a1aa", + "sha256:a7e3129d31e12d51397d603adf45bd696135a5d9d61bc33643bc5d2e4366070b", + "sha256:a7f0d950ba9508ac1b2d89837f4a4c74092ae3af015a9797b80570ee87b7d7d5", + "sha256:ad3dc0084cad59a298ffa52c9def2f1b5332d396d76f3828237ac7141b6e7e7d", + "sha256:b2bcf1a43853cee5a088f40c75fe48a6e3ec7addae1d3f3d47ce679e2bb8936b", + "sha256:bb6b2e456cd0002700ad58c3474fc9e342853ff2ef9f95a1f6606c819ffaf3d9", + "sha256:bc2f853ace690fb475f68b82b61e3b0ffe2a8603f052853eb21587ac7dcca537", + "sha256:c6e218b831dfc89f5004c1bb7ae9182ec5ddc4d46e6035f636ba96344d5b7478", + "sha256:cb20853af1104b5180eb2daea66a481723553aa66bf5a5c4c58420c7369364cb", + "sha256:cde1453681c2ab1648b9e7aed3861ccedce52c85b24873edd1ec1e92b4b3d7d4", + "sha256:d7fd6b6be4f86d4b6503689b492970920f4b50a8ac02427bc975c73bcedda374", + "sha256:d95b1e06298299b28e23288a6bfd3c6f13e0f7a01c1f2e86e74073928676cf88", + "sha256:dfe657979ab96da72f55b03ecdede5467a7193266ce7a0b85013819f052d231f", + "sha256:f70db559ad768ad68a4d9897cb19fd13f7761e60208f475eb8a69b8aa4b6df20", + "sha256:f853c3c68bed0d127e6ef8b29ee85461d9d0a4fa407e3f97e41ecd6803d24d88", + "sha256:fb025d4bcd1a3032546da048a6dcb39359967f4df6b3514e76e983256235f694" + ], + "index": "pypi", + "markers": "python_version ~= '3.8'", + "version": "==1.1.20240702" + }, "jmespath": { "hashes": [ "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", diff --git a/protovalidate/internal/extra_func.py b/protovalidate/internal/extra_func.py index 53ae03a7..0d1b6eaf 100644 --- a/protovalidate/internal/extra_func.py +++ b/protovalidate/internal/extra_func.py @@ -29,6 +29,19 @@ ) +# Currently cel-python does not support re2. So we are overriding their `matches` +# function with our own that leverages re2. Note there is a PR in cel-python to +# add re2 support. See https://github.com/cloud-custodian/cel-python/pull/67. +# Once that lands, this `matches` override can be removed. +def cel_matches(text: str, pattern: str) -> celpy.Result: + try: + m = re2.search(pattern, text) + except re2.error as ex: + msg = "match error" + raise celpy.CELEvalError(msg, ex.__class__, ex.args) from ex + return celtypes.BoolType(m is not None) + + def cel_get_field(message: celtypes.Value, field_name: celtypes.Value) -> celpy.Result: if not isinstance(message, MessageType): msg = "invalid argument, expected message" @@ -1553,14 +1566,6 @@ def __peek(self, char: str) -> bool: return self._index < len(self._string) and self._string[self._index] == char -def matches(text: str, pattern: str) -> celpy.Result: - try: - m = re2.search(pattern, text) - except re2.error as ex: - return celpy.CELEvalError("match error", ex.__class__, ex.args) - return celtypes.BoolType(m is not None) - - def make_extra_funcs(locale: str) -> dict[str, celpy.CELFunction]: # TODO(#257): Fix types and add tests for StringFormat. # For now, ignoring the type. @@ -1568,7 +1573,7 @@ def make_extra_funcs(locale: str) -> dict[str, celpy.CELFunction]: return { # Missing standard functions "format": string_fmt.format, - "matches": matches, + "matches": cel_matches, # protovalidate specific functions "getField": cel_get_field, "isNan": cel_is_nan, diff --git a/pyproject.toml b/pyproject.toml index ac8554a9..0545f009 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,8 @@ build-backend = "hatchling.build" name = "protovalidate" description = "Protocol Buffer Validation for Python" readme = "README.md" -license = { file = "LICENSE" } +license-expression = "Apache 2.0" +license-file = "LICENSE" keywords = ["validate", "protobuf", "protocol buffer"] requires-python = ">=3.9" classifiers = [ @@ -15,12 +16,11 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Typing :: Typed", ] dynamic = ["version"] -dependencies = ["protobuf", "cel-python"] +dependencies = ["protobuf", "cel-python", "google-re2"] [project.urls] Homepage = "https://github.com/bufbuild/protovalidate-python" diff --git a/tests/matches_test.py b/tests/matches_test.py index 1c23345b..a8639219 100644 --- a/tests/matches_test.py +++ b/tests/matches_test.py @@ -11,3 +11,21 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +import unittest + +import pytest +from celpy import CELEvalError, celtypes + +from protovalidate.internal.extra_func import cel_matches + + +class TestMatches(unittest.TestCase): + def test_re2_end_of_string(self): + empty_string = celtypes.StringType("") + self.assertTrue(cel_matches(empty_string, "^\\z")) + + def test_re2_invalid_end_of_string(self): + empty_string = celtypes.StringType("") + with pytest.raises(CELEvalError): + self.assertTrue(cel_matches(empty_string, "^\\Z")) From 5a56dc1c9c8d52723fae52bc7844177a2ca68128 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 May 2025 16:14:23 -0400 Subject: [PATCH 03/12] pipenv --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e1c012d5..2674a96e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,6 +32,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: "pipenv" + - name: Install pipenv + run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python - name: Execute tests run: make test PYTHON=${{ steps.python.outputs.python-path }} - name: Lint From 9d9669aa1293f1a3a448ac5fe985171e9a088105 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 May 2025 16:18:35 -0400 Subject: [PATCH 04/12] pipenv --- .github/workflows/ci.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2674a96e..e33e4332 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,8 +33,10 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: "pipenv" - - name: Install pipenv - run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python + - name: Run image + uses: tiagovrtr/actions-pipenv@v1 + with: + pipenv-version: latest - name: Execute tests run: make test PYTHON=${{ steps.python.outputs.python-path }} - name: Lint From 8b4fd17692096f716ea924658104ad8a89f0ae8f Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 May 2025 16:21:14 -0400 Subject: [PATCH 05/12] pipenv --- .github/workflows/ci.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e33e4332..8bca0e08 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,8 +35,6 @@ jobs: cache: "pipenv" - name: Run image uses: tiagovrtr/actions-pipenv@v1 - with: - pipenv-version: latest - name: Execute tests run: make test PYTHON=${{ steps.python.outputs.python-path }} - name: Lint From 6522bbd0348374ff2cc8a7efd06097d10965de3f Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 May 2025 16:26:15 -0400 Subject: [PATCH 06/12] Stubs --- Pipfile | 1 + Pipfile.lock | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 619b5edb..d7657ff5 100644 --- a/Pipfile +++ b/Pipfile @@ -9,6 +9,7 @@ protobuf = "==6.*" google-re2 = "*" [dev-packages] +google-re2-stubs = "*" pytest = "*" mypy = "*" ruff = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 22e4d6e6..1cee358e 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "ac8481b9739a0ce0abf3835047989831f1fab5d0fcc293f1815a3dc9f654890b" + "sha256": "f288505987604547a6d842e56df202be919d3ddfd5b40286dc07e36cf27d4bfd" }, "pipfile-spec": 6, "requires": { @@ -83,6 +83,15 @@ "markers": "python_version ~= '3.8'", "version": "==1.1.20240702" }, + "google-re2-stubs": { + "hashes": [ + "sha256:a82eb6c3accd20879d711cd38151583d8a154fcca755f43a5595143a484c8118", + "sha256:f5ebef2f4188957bf980a5ad88ab266589638e5090329e6a0fde99f6bb684657" + ], + "index": "pypi", + "markers": "python_full_version >= '3.8.0' and python_full_version < '4.0.0'", + "version": "==0.1.1" + }, "jmespath": { "hashes": [ "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", From f9f1fb9f2d5c01a6b82321d661837e363d090109 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 May 2025 16:40:22 -0400 Subject: [PATCH 07/12] Stubs --- Pipfile | 2 +- Pipfile.lock | 114 ++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 87 insertions(+), 29 deletions(-) diff --git a/Pipfile b/Pipfile index d7657ff5..6615bcf6 100644 --- a/Pipfile +++ b/Pipfile @@ -13,7 +13,7 @@ google-re2-stubs = "*" pytest = "*" mypy = "*" ruff = "*" -types-protobuf = "*" +types-protobuf = "==6.30.2.20250503" exceptiongroup = "*" tomli = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 1cee358e..157e6e3e 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "f288505987604547a6d842e56df202be919d3ddfd5b40286dc07e36cf27d4bfd" + "sha256": "5b5abe67ebc93c94a979fd136352346711005517d0854c686b84390ec0b64d93" }, "pipfile-spec": 6, "requires": { @@ -83,15 +83,6 @@ "markers": "python_version ~= '3.8'", "version": "==1.1.20240702" }, - "google-re2-stubs": { - "hashes": [ - "sha256:a82eb6c3accd20879d711cd38151583d8a154fcca755f43a5595143a484c8118", - "sha256:f5ebef2f4188957bf980a5ad88ab266589638e5090329e6a0fde99f6bb684657" - ], - "index": "pypi", - "markers": "python_full_version >= '3.8.0' and python_full_version < '4.0.0'", - "version": "==0.1.1" - }, "jmespath": { "hashes": [ "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", @@ -208,11 +199,11 @@ }, "types-pyyaml": { "hashes": [ - "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c", - "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6" + "sha256:652348fa9e7a203d4b0d21066dfb00760d3cbd5a15ebb7cf8d33c88a49546681", + "sha256:d7c13c3e6d335b6af4b0122a01ff1d270aba84ab96d1a1a1063ecba3e13ec075" ], - "markers": "python_version >= '3.8'", - "version": "==6.0.12.20241230" + "markers": "python_version >= '3.9'", + "version": "==6.0.12.20250402" } }, "develop": { @@ -225,13 +216,80 @@ "markers": "python_version >= '3.7'", "version": "==1.2.2" }, + "google-re2": { + "hashes": [ + "sha256:00dcb09b15f92b490ae52f328cca229de2a157c8748f10df94dfea7637d32617", + "sha256:05f5683e1bcfac8adcc0dbfe3ecb0866cec6eea2c7d419271dfd72930b368ce4", + "sha256:16bd5389baeb98936fb05926e6a38826c473206c13f1f789f7643a29dcccccc3", + "sha256:1950f499b277789267afee1755394cd959898d0b192b7052bb3186000aff27de", + "sha256:22217d7c8f57bb6c5e74e171a510b12cdde4eddc2528f89aa0f50e3fc10fe17e", + "sha256:2269ff8c2e1de0ee77736bd9f65b5c9f7cd43544eff825dc7b4ab2bf1f1901e4", + "sha256:2ffc6fbe70ccf9fb66d0ab16ccad0f661031ceb0eec3d73d170cd782a93d62d5", + "sha256:304ed3f740541742e7ef5c162b36619efdac7345f1429ab6d70aefaae9a5658d", + "sha256:386d2a8c4b10daaeda03adc7f65c457f67ee8cb18b4f9b4178a44ed62ab291df", + "sha256:39c642041428efaa48f35adf4475a014ce272f87a453c6dff68f2b05793d516f", + "sha256:3c8d2c0a03e9fd24f78b624cf7e40ac32aaf4837fda7339e2c22ca42e3dca512", + "sha256:40568559b0a10240c10377fb5cdd46c9115da8a627c567db68c4dc29103a2ce9", + "sha256:42c2c39b7378e928d197e4fdf4a23c9338f29cad6d4c5c5c06a2ad7c8c2a3ebc", + "sha256:449ae8286d644d24af8a6eb81eeba6995388581739920b80d9e4b063eefe0322", + "sha256:46e7ed614ffaafccae017542d68e9bbf664c8c1e5ca37046adee640bbee4846e", + "sha256:4b920c1b0356f0359b35a0e6d0b5ff12fba9067d3c455a9811952fbc9a213268", + "sha256:4e13241b8df4096d840f98993f39c62cff0cdab9d06c86b156d2944cfb3f0814", + "sha256:56c2a97d3d38345939fb3ff02d154f5c6ec929e0765723cfd390720f581d2581", + "sha256:5e35c8db1bf58ddf1ac28782d6dca5894a0331fc0d33b2a2ce6eb59234d74312", + "sha256:652e517b6db6cbf7403bab370940718208b15e811fefe7635d4e78a8037f096b", + "sha256:6887fe9c291ad42003ad84e11c0a6fac0169adbda9cbc898b8657610512e4ce5", + "sha256:69f9b156de6f93ea00844f6cd4f2ed5124f9f01692da7ae0fe9a9516df6c63c2", + "sha256:71a71d7f9e616d3067e913a1432111593ee41aab2e0ed21ecbcf039451b9d899", + "sha256:7388c5aadcc5489291d2804ecc384c2e3bb64832e1b46afd44d7bca6c948b615", + "sha256:7480309b133c39f2afb19ff28bc30d27b364cbc56b5d46918d1b4f1fb2e13183", + "sha256:757cbefbe9f998c274c94afd8bf2a4789b983287f33d4f975389c1027ed686c6", + "sha256:7bc4fa65ecec3d63ea6048ecaf8784560bbfb31191c02ffaa87771e4a2f813e1", + "sha256:7d3d1e58f374510101273cda1b6c2b45c178eb94f4c1bd17f7f750cea8d1c85a", + "sha256:7e1d36bd20ce04c1198fe482b6f3ce7dd699e1276946a9a2cf31b2e53026a370", + "sha256:7e4a2b88516b4140891a014c6e5b774f57db90c8bd0ccf0554e9f9b99ee1e942", + "sha256:7fee39772aa2e1fe91b7694acc48888ac6fa0ca51f8805464272a2089b362c96", + "sha256:8139df33d61aac335726b6f32108e763ba2932569c63d2b3ebf6e36a40449223", + "sha256:82824fa71f51a269cd9bad653d53e6ba5bee9095da059455ee1c6cc7e4ba014b", + "sha256:8788db69f6c93cb229df62c74b2d9aa8e64bf754e9495700f85812afa32efd2b", + "sha256:974ac711ade3171004e9552d9e069cbe1a8de02c5e45a56101f8396f69a3e3c2", + "sha256:9802a5a5ec585048300d5a8ec522b15057b8f758fe9f8b0ec65ac2927a36a1aa", + "sha256:a7e3129d31e12d51397d603adf45bd696135a5d9d61bc33643bc5d2e4366070b", + "sha256:a7f0d950ba9508ac1b2d89837f4a4c74092ae3af015a9797b80570ee87b7d7d5", + "sha256:ad3dc0084cad59a298ffa52c9def2f1b5332d396d76f3828237ac7141b6e7e7d", + "sha256:b2bcf1a43853cee5a088f40c75fe48a6e3ec7addae1d3f3d47ce679e2bb8936b", + "sha256:bb6b2e456cd0002700ad58c3474fc9e342853ff2ef9f95a1f6606c819ffaf3d9", + "sha256:bc2f853ace690fb475f68b82b61e3b0ffe2a8603f052853eb21587ac7dcca537", + "sha256:c6e218b831dfc89f5004c1bb7ae9182ec5ddc4d46e6035f636ba96344d5b7478", + "sha256:cb20853af1104b5180eb2daea66a481723553aa66bf5a5c4c58420c7369364cb", + "sha256:cde1453681c2ab1648b9e7aed3861ccedce52c85b24873edd1ec1e92b4b3d7d4", + "sha256:d7fd6b6be4f86d4b6503689b492970920f4b50a8ac02427bc975c73bcedda374", + "sha256:d95b1e06298299b28e23288a6bfd3c6f13e0f7a01c1f2e86e74073928676cf88", + "sha256:dfe657979ab96da72f55b03ecdede5467a7193266ce7a0b85013819f052d231f", + "sha256:f70db559ad768ad68a4d9897cb19fd13f7761e60208f475eb8a69b8aa4b6df20", + "sha256:f853c3c68bed0d127e6ef8b29ee85461d9d0a4fa407e3f97e41ecd6803d24d88", + "sha256:fb025d4bcd1a3032546da048a6dcb39359967f4df6b3514e76e983256235f694" + ], + "index": "pypi", + "markers": "python_version ~= '3.8'", + "version": "==1.1.20240702" + }, + "google-re2-stubs": { + "hashes": [ + "sha256:a82eb6c3accd20879d711cd38151583d8a154fcca755f43a5595143a484c8118", + "sha256:f5ebef2f4188957bf980a5ad88ab266589638e5090329e6a0fde99f6bb684657" + ], + "index": "pypi", + "markers": "python_full_version >= '3.8.0' and python_full_version < '4.0.0'", + "version": "==0.1.1" + }, "iniconfig": { "hashes": [ - "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", - "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374" + "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", + "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760" ], - "markers": "python_version >= '3.7'", - "version": "==2.0.0" + "markers": "python_version >= '3.8'", + "version": "==2.1.0" }, "mypy": { "hashes": [ @@ -274,19 +332,19 @@ }, "mypy-extensions": { "hashes": [ - "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", - "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", + "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" ], - "markers": "python_version >= '3.5'", - "version": "==1.0.0" + "markers": "python_version >= '3.8'", + "version": "==1.1.0" }, "packaging": { "hashes": [ - "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", - "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f" + "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", + "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" ], "markers": "python_version >= '3.8'", - "version": "==24.2" + "version": "==25.0" }, "pluggy": { "hashes": [ @@ -380,11 +438,11 @@ }, "typing-extensions": { "hashes": [ - "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", - "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", + "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef" ], "markers": "python_version >= '3.8'", - "version": "==4.12.2" + "version": "==4.13.2" } } } From f946b5a0930dfeff060eab809b10af8e0c366383 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 May 2025 17:15:37 -0400 Subject: [PATCH 08/12] Install pip and pipenv --- .github/workflows/ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8bca0e08..8dd4a7c6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,8 +33,7 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: "pipenv" - - name: Run image - uses: tiagovrtr/actions-pipenv@v1 + - run: ${{steps.python.outputs.python-path}} -m pip install --upgrade pip pipenv - name: Execute tests run: make test PYTHON=${{ steps.python.outputs.python-path }} - name: Lint From ae3e3dfb44b3d01b40252f2440d3f8a8bf4fb7c3 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 6 May 2025 17:27:03 -0400 Subject: [PATCH 09/12] Update --- .github/workflows/ci.yaml | 4 +++- .github/workflows/conformance.yaml | 6 +++++- .github/workflows/release.yaml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8dd4a7c6..92042a0a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,7 +17,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + # Note we can't test above v3.12 because google-re2 does not have a + # built wheel beyond 3.12 on PyPI + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/conformance.yaml b/.github/workflows/conformance.yaml index e6f2178c..6d748a9b 100644 --- a/.github/workflows/conformance.yaml +++ b/.github/workflows/conformance.yaml @@ -17,7 +17,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + # Note we can't test above v3.12 because google-re2 does not have a + # built wheel beyond 3.12 on PyPI + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout code uses: actions/checkout@v4 @@ -32,5 +34,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: "pipenv" + - run: ${{steps.python.outputs.python-path}} -m pip install --upgrade pip pipenv - name: Test conformance run: make conformance PYTHON=${{ steps.python.outputs.python-path }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b16bba76..0e6909d5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,7 +22,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.12" - name: Install pypa/build run: | python -m pip install build From 84622a6eac213cee968e1c8660cf726d56344c83 Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Wed, 7 May 2025 11:15:06 -0400 Subject: [PATCH 10/12] Remove re2 --- .github/workflows/ci.yaml | 4 +- .github/workflows/conformance.yaml | 4 +- .github/workflows/release.yaml | 2 +- Pipfile | 2 - Pipfile.lock | 60 +--------------------------- protovalidate/internal/extra_func.py | 18 +-------- tests/matches_test.py | 31 -------------- 7 files changed, 6 insertions(+), 115 deletions(-) delete mode 100644 tests/matches_test.py diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 92042a0a..8dd4a7c6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,9 +17,7 @@ jobs: strategy: fail-fast: false matrix: - # Note we can't test above v3.12 because google-re2 does not have a - # built wheel beyond 3.12 on PyPI - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/conformance.yaml b/.github/workflows/conformance.yaml index 6d748a9b..61020761 100644 --- a/.github/workflows/conformance.yaml +++ b/.github/workflows/conformance.yaml @@ -17,9 +17,7 @@ jobs: strategy: fail-fast: false matrix: - # Note we can't test above v3.12 because google-re2 does not have a - # built wheel beyond 3.12 on PyPI - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0e6909d5..b16bba76 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,7 +22,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install pypa/build run: | python -m pip install build diff --git a/Pipfile b/Pipfile index 6615bcf6..e8d48843 100644 --- a/Pipfile +++ b/Pipfile @@ -6,10 +6,8 @@ name = "pypi" [packages] cel-python = "==0.2.*" protobuf = "==6.*" -google-re2 = "*" [dev-packages] -google-re2-stubs = "*" pytest = "*" mypy = "*" ruff = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 157e6e3e..dbe79cb2 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "5b5abe67ebc93c94a979fd136352346711005517d0854c686b84390ec0b64d93" + "sha256": "bad5a114ee3ab81520d3200def2615509c00514b2fec2626aed4f4b9b8617d3e" }, "pipfile-spec": 6, "requires": { @@ -25,64 +25,6 @@ "markers": "python_version >= '3.8' and python_version < '4.0'", "version": "==0.2.0" }, - "google-re2": { - "hashes": [ - "sha256:00dcb09b15f92b490ae52f328cca229de2a157c8748f10df94dfea7637d32617", - "sha256:05f5683e1bcfac8adcc0dbfe3ecb0866cec6eea2c7d419271dfd72930b368ce4", - "sha256:16bd5389baeb98936fb05926e6a38826c473206c13f1f789f7643a29dcccccc3", - "sha256:1950f499b277789267afee1755394cd959898d0b192b7052bb3186000aff27de", - "sha256:22217d7c8f57bb6c5e74e171a510b12cdde4eddc2528f89aa0f50e3fc10fe17e", - "sha256:2269ff8c2e1de0ee77736bd9f65b5c9f7cd43544eff825dc7b4ab2bf1f1901e4", - "sha256:2ffc6fbe70ccf9fb66d0ab16ccad0f661031ceb0eec3d73d170cd782a93d62d5", - "sha256:304ed3f740541742e7ef5c162b36619efdac7345f1429ab6d70aefaae9a5658d", - "sha256:386d2a8c4b10daaeda03adc7f65c457f67ee8cb18b4f9b4178a44ed62ab291df", - "sha256:39c642041428efaa48f35adf4475a014ce272f87a453c6dff68f2b05793d516f", - "sha256:3c8d2c0a03e9fd24f78b624cf7e40ac32aaf4837fda7339e2c22ca42e3dca512", - "sha256:40568559b0a10240c10377fb5cdd46c9115da8a627c567db68c4dc29103a2ce9", - "sha256:42c2c39b7378e928d197e4fdf4a23c9338f29cad6d4c5c5c06a2ad7c8c2a3ebc", - "sha256:449ae8286d644d24af8a6eb81eeba6995388581739920b80d9e4b063eefe0322", - "sha256:46e7ed614ffaafccae017542d68e9bbf664c8c1e5ca37046adee640bbee4846e", - "sha256:4b920c1b0356f0359b35a0e6d0b5ff12fba9067d3c455a9811952fbc9a213268", - "sha256:4e13241b8df4096d840f98993f39c62cff0cdab9d06c86b156d2944cfb3f0814", - "sha256:56c2a97d3d38345939fb3ff02d154f5c6ec929e0765723cfd390720f581d2581", - "sha256:5e35c8db1bf58ddf1ac28782d6dca5894a0331fc0d33b2a2ce6eb59234d74312", - "sha256:652e517b6db6cbf7403bab370940718208b15e811fefe7635d4e78a8037f096b", - "sha256:6887fe9c291ad42003ad84e11c0a6fac0169adbda9cbc898b8657610512e4ce5", - "sha256:69f9b156de6f93ea00844f6cd4f2ed5124f9f01692da7ae0fe9a9516df6c63c2", - "sha256:71a71d7f9e616d3067e913a1432111593ee41aab2e0ed21ecbcf039451b9d899", - "sha256:7388c5aadcc5489291d2804ecc384c2e3bb64832e1b46afd44d7bca6c948b615", - "sha256:7480309b133c39f2afb19ff28bc30d27b364cbc56b5d46918d1b4f1fb2e13183", - "sha256:757cbefbe9f998c274c94afd8bf2a4789b983287f33d4f975389c1027ed686c6", - "sha256:7bc4fa65ecec3d63ea6048ecaf8784560bbfb31191c02ffaa87771e4a2f813e1", - "sha256:7d3d1e58f374510101273cda1b6c2b45c178eb94f4c1bd17f7f750cea8d1c85a", - "sha256:7e1d36bd20ce04c1198fe482b6f3ce7dd699e1276946a9a2cf31b2e53026a370", - "sha256:7e4a2b88516b4140891a014c6e5b774f57db90c8bd0ccf0554e9f9b99ee1e942", - "sha256:7fee39772aa2e1fe91b7694acc48888ac6fa0ca51f8805464272a2089b362c96", - "sha256:8139df33d61aac335726b6f32108e763ba2932569c63d2b3ebf6e36a40449223", - "sha256:82824fa71f51a269cd9bad653d53e6ba5bee9095da059455ee1c6cc7e4ba014b", - "sha256:8788db69f6c93cb229df62c74b2d9aa8e64bf754e9495700f85812afa32efd2b", - "sha256:974ac711ade3171004e9552d9e069cbe1a8de02c5e45a56101f8396f69a3e3c2", - "sha256:9802a5a5ec585048300d5a8ec522b15057b8f758fe9f8b0ec65ac2927a36a1aa", - "sha256:a7e3129d31e12d51397d603adf45bd696135a5d9d61bc33643bc5d2e4366070b", - "sha256:a7f0d950ba9508ac1b2d89837f4a4c74092ae3af015a9797b80570ee87b7d7d5", - "sha256:ad3dc0084cad59a298ffa52c9def2f1b5332d396d76f3828237ac7141b6e7e7d", - "sha256:b2bcf1a43853cee5a088f40c75fe48a6e3ec7addae1d3f3d47ce679e2bb8936b", - "sha256:bb6b2e456cd0002700ad58c3474fc9e342853ff2ef9f95a1f6606c819ffaf3d9", - "sha256:bc2f853ace690fb475f68b82b61e3b0ffe2a8603f052853eb21587ac7dcca537", - "sha256:c6e218b831dfc89f5004c1bb7ae9182ec5ddc4d46e6035f636ba96344d5b7478", - "sha256:cb20853af1104b5180eb2daea66a481723553aa66bf5a5c4c58420c7369364cb", - "sha256:cde1453681c2ab1648b9e7aed3861ccedce52c85b24873edd1ec1e92b4b3d7d4", - "sha256:d7fd6b6be4f86d4b6503689b492970920f4b50a8ac02427bc975c73bcedda374", - "sha256:d95b1e06298299b28e23288a6bfd3c6f13e0f7a01c1f2e86e74073928676cf88", - "sha256:dfe657979ab96da72f55b03ecdede5467a7193266ce7a0b85013819f052d231f", - "sha256:f70db559ad768ad68a4d9897cb19fd13f7761e60208f475eb8a69b8aa4b6df20", - "sha256:f853c3c68bed0d127e6ef8b29ee85461d9d0a4fa407e3f97e41ecd6803d24d88", - "sha256:fb025d4bcd1a3032546da048a6dcb39359967f4df6b3514e76e983256235f694" - ], - "index": "pypi", - "markers": "python_version ~= '3.8'", - "version": "==1.1.20240702" - }, "jmespath": { "hashes": [ "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", diff --git a/protovalidate/internal/extra_func.py b/protovalidate/internal/extra_func.py index 0d1b6eaf..ae2b02c0 100644 --- a/protovalidate/internal/extra_func.py +++ b/protovalidate/internal/extra_func.py @@ -13,35 +13,22 @@ # limitations under the License. import math +import re import typing from urllib import parse as urlparse import celpy -import re2 from celpy import celtypes from protovalidate.internal import string_format from protovalidate.internal.rules import MessageType, field_to_cel # See https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address -_email_regex = re2.compile( +_email_regex = re.compile( r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$" ) -# Currently cel-python does not support re2. So we are overriding their `matches` -# function with our own that leverages re2. Note there is a PR in cel-python to -# add re2 support. See https://github.com/cloud-custodian/cel-python/pull/67. -# Once that lands, this `matches` override can be removed. -def cel_matches(text: str, pattern: str) -> celpy.Result: - try: - m = re2.search(pattern, text) - except re2.error as ex: - msg = "match error" - raise celpy.CELEvalError(msg, ex.__class__, ex.args) from ex - return celtypes.BoolType(m is not None) - - def cel_get_field(message: celtypes.Value, field_name: celtypes.Value) -> celpy.Result: if not isinstance(message, MessageType): msg = "invalid argument, expected message" @@ -1573,7 +1560,6 @@ def make_extra_funcs(locale: str) -> dict[str, celpy.CELFunction]: return { # Missing standard functions "format": string_fmt.format, - "matches": cel_matches, # protovalidate specific functions "getField": cel_get_field, "isNan": cel_is_nan, diff --git a/tests/matches_test.py b/tests/matches_test.py deleted file mode 100644 index a8639219..00000000 --- a/tests/matches_test.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2023-2025 Buf Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import unittest - -import pytest -from celpy import CELEvalError, celtypes - -from protovalidate.internal.extra_func import cel_matches - - -class TestMatches(unittest.TestCase): - def test_re2_end_of_string(self): - empty_string = celtypes.StringType("") - self.assertTrue(cel_matches(empty_string, "^\\z")) - - def test_re2_invalid_end_of_string(self): - empty_string = celtypes.StringType("") - with pytest.raises(CELEvalError): - self.assertTrue(cel_matches(empty_string, "^\\Z")) From d0e9b08151549b077e618f062d3de2663dc779bd Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Wed, 7 May 2025 11:17:01 -0400 Subject: [PATCH 11/12] sync --- Pipfile.lock | 69 +--------------------------------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index dbe79cb2..1f812aac 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "bad5a114ee3ab81520d3200def2615509c00514b2fec2626aed4f4b9b8617d3e" + "sha256": "f546975999f17cdad6eecce592ae22a1710abe4959bc3757e67e3fdd581548ae" }, "pipfile-spec": 6, "requires": { @@ -158,73 +158,6 @@ "markers": "python_version >= '3.7'", "version": "==1.2.2" }, - "google-re2": { - "hashes": [ - "sha256:00dcb09b15f92b490ae52f328cca229de2a157c8748f10df94dfea7637d32617", - "sha256:05f5683e1bcfac8adcc0dbfe3ecb0866cec6eea2c7d419271dfd72930b368ce4", - "sha256:16bd5389baeb98936fb05926e6a38826c473206c13f1f789f7643a29dcccccc3", - "sha256:1950f499b277789267afee1755394cd959898d0b192b7052bb3186000aff27de", - "sha256:22217d7c8f57bb6c5e74e171a510b12cdde4eddc2528f89aa0f50e3fc10fe17e", - "sha256:2269ff8c2e1de0ee77736bd9f65b5c9f7cd43544eff825dc7b4ab2bf1f1901e4", - "sha256:2ffc6fbe70ccf9fb66d0ab16ccad0f661031ceb0eec3d73d170cd782a93d62d5", - "sha256:304ed3f740541742e7ef5c162b36619efdac7345f1429ab6d70aefaae9a5658d", - "sha256:386d2a8c4b10daaeda03adc7f65c457f67ee8cb18b4f9b4178a44ed62ab291df", - "sha256:39c642041428efaa48f35adf4475a014ce272f87a453c6dff68f2b05793d516f", - "sha256:3c8d2c0a03e9fd24f78b624cf7e40ac32aaf4837fda7339e2c22ca42e3dca512", - "sha256:40568559b0a10240c10377fb5cdd46c9115da8a627c567db68c4dc29103a2ce9", - "sha256:42c2c39b7378e928d197e4fdf4a23c9338f29cad6d4c5c5c06a2ad7c8c2a3ebc", - "sha256:449ae8286d644d24af8a6eb81eeba6995388581739920b80d9e4b063eefe0322", - "sha256:46e7ed614ffaafccae017542d68e9bbf664c8c1e5ca37046adee640bbee4846e", - "sha256:4b920c1b0356f0359b35a0e6d0b5ff12fba9067d3c455a9811952fbc9a213268", - "sha256:4e13241b8df4096d840f98993f39c62cff0cdab9d06c86b156d2944cfb3f0814", - "sha256:56c2a97d3d38345939fb3ff02d154f5c6ec929e0765723cfd390720f581d2581", - "sha256:5e35c8db1bf58ddf1ac28782d6dca5894a0331fc0d33b2a2ce6eb59234d74312", - "sha256:652e517b6db6cbf7403bab370940718208b15e811fefe7635d4e78a8037f096b", - "sha256:6887fe9c291ad42003ad84e11c0a6fac0169adbda9cbc898b8657610512e4ce5", - "sha256:69f9b156de6f93ea00844f6cd4f2ed5124f9f01692da7ae0fe9a9516df6c63c2", - "sha256:71a71d7f9e616d3067e913a1432111593ee41aab2e0ed21ecbcf039451b9d899", - "sha256:7388c5aadcc5489291d2804ecc384c2e3bb64832e1b46afd44d7bca6c948b615", - "sha256:7480309b133c39f2afb19ff28bc30d27b364cbc56b5d46918d1b4f1fb2e13183", - "sha256:757cbefbe9f998c274c94afd8bf2a4789b983287f33d4f975389c1027ed686c6", - "sha256:7bc4fa65ecec3d63ea6048ecaf8784560bbfb31191c02ffaa87771e4a2f813e1", - "sha256:7d3d1e58f374510101273cda1b6c2b45c178eb94f4c1bd17f7f750cea8d1c85a", - "sha256:7e1d36bd20ce04c1198fe482b6f3ce7dd699e1276946a9a2cf31b2e53026a370", - "sha256:7e4a2b88516b4140891a014c6e5b774f57db90c8bd0ccf0554e9f9b99ee1e942", - "sha256:7fee39772aa2e1fe91b7694acc48888ac6fa0ca51f8805464272a2089b362c96", - "sha256:8139df33d61aac335726b6f32108e763ba2932569c63d2b3ebf6e36a40449223", - "sha256:82824fa71f51a269cd9bad653d53e6ba5bee9095da059455ee1c6cc7e4ba014b", - "sha256:8788db69f6c93cb229df62c74b2d9aa8e64bf754e9495700f85812afa32efd2b", - "sha256:974ac711ade3171004e9552d9e069cbe1a8de02c5e45a56101f8396f69a3e3c2", - "sha256:9802a5a5ec585048300d5a8ec522b15057b8f758fe9f8b0ec65ac2927a36a1aa", - "sha256:a7e3129d31e12d51397d603adf45bd696135a5d9d61bc33643bc5d2e4366070b", - "sha256:a7f0d950ba9508ac1b2d89837f4a4c74092ae3af015a9797b80570ee87b7d7d5", - "sha256:ad3dc0084cad59a298ffa52c9def2f1b5332d396d76f3828237ac7141b6e7e7d", - "sha256:b2bcf1a43853cee5a088f40c75fe48a6e3ec7addae1d3f3d47ce679e2bb8936b", - "sha256:bb6b2e456cd0002700ad58c3474fc9e342853ff2ef9f95a1f6606c819ffaf3d9", - "sha256:bc2f853ace690fb475f68b82b61e3b0ffe2a8603f052853eb21587ac7dcca537", - "sha256:c6e218b831dfc89f5004c1bb7ae9182ec5ddc4d46e6035f636ba96344d5b7478", - "sha256:cb20853af1104b5180eb2daea66a481723553aa66bf5a5c4c58420c7369364cb", - "sha256:cde1453681c2ab1648b9e7aed3861ccedce52c85b24873edd1ec1e92b4b3d7d4", - "sha256:d7fd6b6be4f86d4b6503689b492970920f4b50a8ac02427bc975c73bcedda374", - "sha256:d95b1e06298299b28e23288a6bfd3c6f13e0f7a01c1f2e86e74073928676cf88", - "sha256:dfe657979ab96da72f55b03ecdede5467a7193266ce7a0b85013819f052d231f", - "sha256:f70db559ad768ad68a4d9897cb19fd13f7761e60208f475eb8a69b8aa4b6df20", - "sha256:f853c3c68bed0d127e6ef8b29ee85461d9d0a4fa407e3f97e41ecd6803d24d88", - "sha256:fb025d4bcd1a3032546da048a6dcb39359967f4df6b3514e76e983256235f694" - ], - "index": "pypi", - "markers": "python_version ~= '3.8'", - "version": "==1.1.20240702" - }, - "google-re2-stubs": { - "hashes": [ - "sha256:a82eb6c3accd20879d711cd38151583d8a154fcca755f43a5595143a484c8118", - "sha256:f5ebef2f4188957bf980a5ad88ab266589638e5090329e6a0fde99f6bb684657" - ], - "index": "pypi", - "markers": "python_full_version >= '3.8.0' and python_full_version < '4.0.0'", - "version": "==0.1.1" - }, "iniconfig": { "hashes": [ "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", From b0214bcead5fe3e1c64363bbfb94494dbea87a1d Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Wed, 7 May 2025 11:20:33 -0400 Subject: [PATCH 12/12] toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0545f009..883d40ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ "Typing :: Typed", ] dynamic = ["version"] -dependencies = ["protobuf", "cel-python", "google-re2"] +dependencies = ["protobuf", "cel-python"] [project.urls] Homepage = "https://github.com/bufbuild/protovalidate-python"