Skip to content

Commit

Permalink
Allow support for protobuf 5
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
  • Loading branch information
Sovietaced committed May 24, 2024
1 parent 187048a commit 3e24694
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
strategy:
fail-fast: false
matrix:
tox-environment: ["docker-tests-proto3", "docker-tests-proto4", "lint", "spellcheck",
tox-environment: ["docker-tests-proto3", "docker-tests-proto4", "docker-tests-proto5", "lint", "spellcheck",
"docs", "mypy", "mypyinstalled", "tracecontext"]
name: ${{ matrix.tox-environment }}
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-proto/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]
dependencies = [
"protobuf>=3.19, < 5.0",
"protobuf>=3.19",
]

[project.urls]
Expand Down
18 changes: 18 additions & 0 deletions opentelemetry-proto/test-requirements-2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
asgiref==3.7.2
attrs==23.2.0
Deprecated==1.2.14
flaky==3.7.0
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==23.2
pluggy==1.4.0
protobuf==5.27.0
py==1.11.0
py-cpuinfo==9.0.0
pytest==7.1.3
pytest-benchmark==4.0.0
tomli==2.0.1
typing_extensions==4.10.0
wrapt==1.16.0
zipp==3.17.0
-e opentelemetry-proto
12 changes: 8 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ envlist =
; below mean these dependencies are being used:
; 0: protobuf==3.20.3
; 1: protobuf==4.25.3
py3{8,9,10,11}-opentelemetry-protobuf-{0,1}
pypy3-opentelemetry-protobuf-{0,1}
; 2: protobuf==5.27.0
py3{8,9,10,11}-opentelemetry-protobuf-{0,1,2}
pypy3-opentelemetry-protobuf-{0,1,2}

py3{8,9,10,11}-opentelemetry-sdk
pypy3-opentelemetry-sdk
Expand Down Expand Up @@ -86,7 +87,7 @@ envlist =
tracecontext
mypy,mypyinstalled
docs
docker-tests-proto{3,4}
docker-tests-proto{3,4,5}
public-symbols-check

[testenv]
Expand All @@ -102,6 +103,7 @@ deps =
; proto 3 and 4 tests install the respective version of protobuf
proto3: protobuf~=3.19.0
proto4: protobuf~=4.0
proto5: protobuf~=5.27.0


setenv =
Expand All @@ -123,6 +125,7 @@ commands_pre =

protobuf-0: pip install -r {toxinidir}/opentelemetry-proto/test-requirements-0.txt
protobuf-1: pip install -r {toxinidir}/opentelemetry-proto/test-requirements-1.txt
protobuf-2: pip install -r {toxinidir}/opentelemetry-proto/test-requirements-2.txt

getting-started: pip install -r {toxinidir}/docs/getting_started/tests/requirements.txt
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http
Expand Down Expand Up @@ -275,7 +278,7 @@ commands_pre =
commands =
{toxinidir}/scripts/tracecontext-integration-test.sh

[testenv:docker-tests-proto{3,4}]
[testenv:docker-tests-proto{3,4,5}]
deps =
pytest==7.1.3
# Pinning PyYAML for issue: https://github.com/yaml/pyyaml/issues/724
Expand All @@ -288,6 +291,7 @@ deps =
; proto 3 and 4 tests install the respective version of protobuf
proto3: protobuf~=3.19.0
proto4: protobuf~=4.0
proto5: protobuf~=5.26.0

changedir =
tests/opentelemetry-docker-tests/tests
Expand Down

0 comments on commit 3e24694

Please sign in to comment.