From baa9ed71454bbce69f38dc513fd35810596b1347 Mon Sep 17 00:00:00 2001 From: Ryan Brush Date: Mon, 23 Oct 2023 23:32:30 -0700 Subject: [PATCH] Bump Python protobuf dependency to 4.x PiperOrigin-RevId: 576034997 --- .github/workflows/pytest.yml | 9 ++++++--- google-fhir-core/setup.py | 3 +-- google-fhir-r4/setup.py | 3 +-- google-fhir-views/setup.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 7687b1b..6284194 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -7,6 +7,12 @@ jobs: matrix: python-version: ["3.8", "3.10", "3.11"] steps: + # Use 25.x for protobuf 4 compatibility: https://protobuf.dev/support/version-support/#python + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + version: "25.x" + - name: Checkout uses: actions/checkout@v3 @@ -15,8 +21,5 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install protoc - run: sudo apt install -y protobuf-compiler - - name: Test run: ./run_tests.sh diff --git a/google-fhir-core/setup.py b/google-fhir-core/setup.py index 70f118d..1fe0afd 100644 --- a/google-fhir-core/setup.py +++ b/google-fhir-core/setup.py @@ -103,8 +103,7 @@ def main(): 'antlr4-python3-runtime~=4.9.3', 'backports.zoneinfo~=0.2.1;python_version<"3.9"', 'immutabledict~=2.2', - # TODO(b/276635321): Fix compatibility issue with protobuf 4.x - 'protobuf~=3.19', + 'protobuf~=4.23', 'python-dateutil~=2.8', 'stringcase==1.2.0', ], diff --git a/google-fhir-r4/setup.py b/google-fhir-r4/setup.py index e6a82d1..f561ac0 100644 --- a/google-fhir-r4/setup.py +++ b/google-fhir-r4/setup.py @@ -123,8 +123,7 @@ def main(): f'google-fhir-core~={version}', 'backports.zoneinfo~=0.2.1;python_version<"3.9"', 'immutabledict~=2.2', - # TODO(b/276635321): Fix compatibility issue with protobuf 4.x - 'protobuf~=3.19', + 'protobuf~=4.23', 'python-dateutil~=2.8', ], package_data={'google.fhir.r4.data': ['*.tgz']}, diff --git a/google-fhir-views/setup.py b/google-fhir-views/setup.py index 12675fa..0f45947 100644 --- a/google-fhir-views/setup.py +++ b/google-fhir-views/setup.py @@ -52,7 +52,7 @@ def main(): # Pin to numpy 1 to avoid binary compatibility changes in numpy 2. 'numpy~=1.24', 'pandas~=1.1', - 'protobuf~=3.19', + 'protobuf~=4.23', 'python-dateutil~=2.8', 'requests~=2.27', 'requests-mock~=1.9',