Skip to content

Commit ff8a42b

Browse files
iindyktfx-copybara
authored andcommitted
Depend on protobuf 3.20.3 for Python 3.9 and 3.10 and on 4.25.2 for Python 3.11.
PiperOrigin-RevId: 611585502
1 parent dceb4ab commit ff8a42b

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

RELEASE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
* Enable passing `tf.saved_model.SaveOptions` to model saving functionality.
1717
* Census and sentiment examples updated to only use Keras instead of
1818
estimator.
19-
* Depends on `apache-beam>=2.53,<3`.
20-
* Depends on `protobuf>=4.25.2,<5`.
19+
* Depends on `apache-beam[gcp]>=2.53.0,<3` for Python 3.11 and on
20+
`apache-beam[gcp]>=2.47.0,<3` for 3.9 and 3.10.
21+
* Depends on `protobuf>=4.25.2,<5` for Python 3.11 and on `protobuf>3.20.3,<5`
22+
for 3.9 and 3.10.
2123

2224
## Breaking Changes
2325

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@
1313
# limitations under the License.
1414
"""Package Setup script for tf.Transform."""
1515
import os
16+
import sys
1617

1718
from setuptools import find_packages
1819
from setuptools import setup
1920

2021

22+
_IS_PY311 = sys.version_info >= (3, 11)
23+
24+
2125
def select_constraint(default, nightly=None, git_master=None):
2226
"""Select dependency constraint based on TFX_DEPENDENCY_SELECTOR env var."""
2327
selector = os.environ.get('TFX_DEPENDENCY_SELECTOR')
@@ -43,9 +47,9 @@ def _make_required_install_packages():
4347
# protobuf) with TF and pyarrow version with tfx-bsl.
4448
return [
4549
'absl-py>=0.9,<2.0.0',
46-
'apache-beam[gcp]>=2.53,<3',
50+
f'apache-beam[gcp]>={"2.53" if _IS_PY311 else "2.47"},<3',
4751
'numpy>=1.22.0',
48-
'protobuf>=4.25.2,<5',
52+
f'protobuf>={"4.25.2" if _IS_PY311 else "3.20.3"},<5',
4953
'pyarrow>=10,<11',
5054
'pydot>=1.2,<2',
5155
'tensorflow>=2.15,<3',

0 commit comments

Comments
 (0)