Skip to content

Commit 1a75a25

Browse files
authored
Loosen protobuf version constraint and add protobuf v4/5/6 to the test matrix (#1080)
* Loosen protobuf version constraint * tests: Add Tox envs for testing various protobuf versions
1 parent 90014e0 commit 1a75a25

File tree

10 files changed

+29
-23
lines changed

10 files changed

+29
-23
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ InstrumentStudio and automated testing in TestStand.
3838

3939
## Dependencies
4040

41-
- Python >= 3.8 [(3.9 recommended)](https://www.python.org/downloads/release/python-3913/)
41+
- [Python >= 3.9](https://www.python.org/downloads/release/python-3913/)
4242
- [grpcio >= 1.49.1, < 2.x](https://pypi.org/project/grpcio/1.49.1/)
43-
- [protobuf >= 4.21, < 5.x](https://pypi.org/project/protobuf/4.21.0/)
43+
- [protobuf >= 4.21](https://pypi.org/project/protobuf/4.21.0/)
4444
- [pywin32 >= 303 (Only for Windows)](https://pypi.org/project/pywin32/303/)
4545

4646
---

examples/game_of_life/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ click = ">=7.1.2, !=8.1.4" # mypy fails with click 8.1.4: https://github.com/pal
1414
ni-python-styleguide = ">=0.4.1"
1515
mypy = ">=1.0"
1616
grpc-stubs = "^1.53"
17-
types-protobuf = "^4.21"
17+
types-protobuf = ">=4.21"
1818
# Uncomment to use prerelease dependencies.
1919
# ni-measurement-plugin-sdk-service = {path = "../../packages/service", develop = true}
2020

examples/sample_measurement/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mypy = ">=1.0"
1616
grpc-stubs = "^1.53"
1717
grpcio-tools = "1.49.1"
1818
mypy-protobuf = "^3.6.0"
19-
types-protobuf = "^4.21"
19+
types-protobuf = ">=4.21"
2020
# Uncomment to use prerelease dependencies.
2121
ni-measurement-plugin-sdk-service = {path = "../../packages/service", develop = true}
2222

packages/generator/poetry.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/generator/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ python = "^3.9"
2323
Mako = "^1.2.1"
2424
click = ">=8.1.3"
2525
grpcio = "^1.49.1"
26-
protobuf = "^4.21"
26+
protobuf = ">=4.21"
2727
black = ">=24.8.0"
2828
click-option-group = ">=0.5.6"
2929
ni-measurement-plugin-sdk-service = {version = "^2.2.0"}
@@ -34,7 +34,7 @@ pytest-cov = ">=3.0.0"
3434
ni-python-styleguide = ">=0.4.1"
3535
mypy = ">=1.0"
3636
mypy-protobuf = ">=3.4"
37-
types-protobuf = "^4.21"
37+
types-protobuf = ">=4.21"
3838
grpc-stubs = "^1.53"
3939
# During development, use file paths to reference the latest source for packages
4040
# in the same Git repository.

packages/generator/tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[tox]
77
isolated_build = true
8-
envlist = clean, py{39,310,311,312}
8+
envlist = clean, py{39,310,311,312}, py39-{pb4,pb5,pb6}
99

1010
[testenv]
1111
skip_install = true
@@ -14,6 +14,9 @@ passenv = RUNNER_NAME
1414
commands =
1515
poetry run python --version
1616
poetry install -v
17+
pb4: poetry run pip install protobuf==4.25.6
18+
pb5: poetry run pip install protobuf==5.29.3
19+
pb6: poetry run pip install protobuf==6.30.0
1720
poetry run pytest -v --cov=ni_measurement_plugin_sdk_generator --cov-append --cov-report= --junitxml=test_results/nimg-{env:RUNNER_NAME}-{envname}.xml
1821

1922
[testenv:clean]

packages/sdk/poetry.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/service/poetry.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/service/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ python = "^3.9"
3131
# below. Please keep the minimum grpcio version in sync with the grpcio-tools version. Otherwise,
3232
# the generated gRPC stubs may not work with the minimum grpcio version.
3333
grpcio = "^1.49.1"
34-
protobuf = "^4.21"
34+
protobuf = ">=4.21"
3535
pywin32 = {version = ">=303", platform = "win32"}
3636
deprecation = ">=2.1"
3737
traceloggingdynamic = {version = ">=1.0", platform = "win32"}
@@ -68,7 +68,7 @@ pytest-mock = ">=3.0"
6868
tox = ">=4.0"
6969
mypy = ">=1.0"
7070
mypy-protobuf = ">=3.4"
71-
types-protobuf = "^4.21"
71+
types-protobuf = ">=4.21"
7272
types-setuptools = "*"
7373
types-pywin32 = ">=304"
7474
grpc-stubs = "^1.53"

packages/service/tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[tox]
77
isolated_build = true
8-
envlist = clean, py{39,310,311,312}-all-extras
8+
envlist = clean, py{39,310,311,312}-all-extras, py39-{pb4,pb5,pb6}
99

1010
[testenv]
1111
skip_install = true
@@ -14,6 +14,9 @@ passenv = RUNNER_NAME
1414
commands =
1515
poetry run python --version
1616
poetry install -v --all-extras
17+
pb4: poetry run pip install protobuf==4.25.6
18+
pb5: poetry run pip install protobuf==5.29.3
19+
pb6: poetry run pip install protobuf==6.30.0
1720
poetry run pytest -v --cov=ni_measurement_plugin_sdk_service --cov-append --cov-report= --junitxml=test_results/nims-{env:RUNNER_NAME}-{envname}.xml
1821

1922
[testenv:clean]

0 commit comments

Comments
 (0)