Skip to content

Commit

Permalink
Depend on protobuf 3.20.3 for Python 3.9 and 3.10 and on 4.25.2 for P…
Browse files Browse the repository at this point in the history
…ython 3.11.

PiperOrigin-RevId: 612672251
  • Loading branch information
ml-metadata-team authored and tfx-copybara committed Mar 5, 2024
1 parent 385be2c commit de555f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
## Bug Fixed and Other Changes

* Depends on `attrs>=20.3,<24`.
* Depends on `protobuf>=3.13,<5`.
* Depends on `protobuf>=4.25.2,<5` for Python 3.11 and on `protobuf>3.20.3,<5`
for 3.9 and 3.10.

# Version 1.14.0

Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import platform
import shutil
import subprocess
import sys

import setuptools
from setuptools import find_packages
Expand All @@ -30,6 +31,8 @@
from distutils.command import build
# pylint: enable=g-bad-import-order

_IS_PY311 = sys.version_info >= (3, 11)


class _BuildCommand(build.build):
"""Build everything that is needed to install.
Expand Down Expand Up @@ -160,7 +163,7 @@ def run(self):
'absl-py>=0.9,<2.0.0',
'attrs>=20.3,<24',
'grpcio>=1.8.6,<2',
'protobuf>=3.13,<5',
f'protobuf>={"4.25.2" if _IS_PY311 else "3.20.3"},<5',
'six>=1.10,<2',
],
python_requires='>=3.9,<4',
Expand Down

0 comments on commit de555f3

Please sign in to comment.