Skip to content

Commit 5436190

Browse files
committed
Pin protobuf in tests below 3.18.0.
The 3.18.0 release brought a new py2.py3 wheel that has Python 3 syntax code in it; so avoid this release in tests. See: protocolbuffers/protobuf#8984
1 parent f90db45 commit 5436190

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/integration/test_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,8 @@ def test_requirement_file_from_url(tmpdir):
16281628

16291629
constraints = os.path.join(str(tmpdir), "constraints.txt")
16301630
with open(constraints, "w") as fp:
1631-
fp.write("translate>=3.2.1,<3.6.0")
1631+
print("translate>=3.2.1,<3.6.0", file=fp)
1632+
print("protobuf<=3.17.3", file=fp)
16321633

16331634
pex_file = os.path.join(str(tmpdir), "pex")
16341635

tests/integration/test_issue_729.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

4+
from __future__ import print_function
5+
46
import os
57
from textwrap import dedent
68

@@ -38,7 +40,8 @@ def test_undeclared_setuptools_import_on_pex_path(tmpdir):
3840
# compilation terminated.
3941
constraints = os.path.join(str(tmpdir), "constraints.txt")
4042
with open(constraints, "w") as fp:
41-
fp.write("google-crc32c==1.1.2")
43+
print("google-crc32c==1.1.2", file=fp)
44+
print("protobuf<=3.17.3", file=fp)
4245

4346
bigquery_pex = os.path.join(str(tmpdir), "bigquery.pex")
4447
run_pex_command(

0 commit comments

Comments
 (0)