Skip to content

Conversation

@smaye81
Copy link
Contributor

@smaye81 smaye81 commented May 6, 2025

This removes the install of pipenv from the Makefile. Instead, mandating that users should install it on their own system-wide.

In addition , it fixes the pyproject.toml to use the new metadata for license-expression and license-file.

@smaye81 smaye81 requested review from a user and Alfus May 6, 2025 21:34
@smaye81 smaye81 changed the title Override matches function with re2 implementation Remove pipenv install from Makefile May 7, 2025
@smaye81 smaye81 requested a review from Alfus May 7, 2025 15:22
@smaye81
Copy link
Contributor Author

smaye81 commented May 7, 2025

We decided to remove re2 for now because there are no built wheels for Python 3.13 for some reason (issue). Will reassess in the future.

@smaye81 smaye81 merged commit 1d4f02e into main May 7, 2025
15 checks passed
@smaye81 smaye81 deleted the sayers/re2 branch May 7, 2025 15:24
pytest = "*"
mypy = "*"
ruff = "*"
types-protobuf = "*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smaye81 did we have a reason for pinning to this version? Wasn't sure if we needed this for something or if newer types-protobuf versions were borked in some way.

I'm guessing it's because unpinning results in:

$ make lint
pipenv --python python3 sync --dev
Loading .env environment variables...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Installing dependencies from Pipfile.lock (8a53a8)...
Installing dependencies from Pipfile.lock (8a53a8)...
All dependencies are now up-to-date!
pipenv run ruff format --check --diff protovalidate tests
Loading .env environment variables...
16 files already formatted
pipenv run mypy protovalidate
Loading .env environment variables...
protovalidate/internal/rules.py:69: error: Incompatible types in assignment (expression has type "google.protobuf.descriptor.Descriptor | google._upb._message.Descriptor", variable has type "google.protobuf.descriptor.Descriptor")  [assignment]
protovalidate/validator.py:88: error: Argument 1 to "get" of "RuleFactory" has incompatible type "google.protobuf.descriptor.Descriptor | google._upb._message.Descriptor"; expected "google.protobuf.descriptor.Descriptor"  [arg-type]
Found 2 errors in 2 files (checked 9 source files)
make: *** [lint] Error 1

for when we want context in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's why it's pinned. For some reason, that version is out of sync with the protobuf library and expects descriptors to be a union type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants