Conversation
Alfus
approved these changes
May 6, 2025
added 3 commits
May 7, 2025 11:15
Alfus
approved these changes
May 7, 2025
Contributor
Author
|
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. |
| pytest = "*" | ||
| mypy = "*" | ||
| ruff = "*" | ||
| types-protobuf = "*" |
Member
There was a problem hiding this comment.
@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 1for when we want context in the future.
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the install of
pipenvfrom 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-expressionandlicense-file.