Skip to content

Commit bb5ff02

Browse files
BenjaminKazemicopybara-github
authored andcommitted
fix: Cap sentencepiece below 0.2.3 in the tokenization extras
PiperOrigin-RevId: 1017636656
1 parent 720b112 commit bb5ff02

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎setup.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,12 @@
235235
)
236236
)
237237

238-
tokenization_extra_require = ["sentencepiece >= 0.2.0"]
238+
# sentencepiece 0.2.3 ships protobuf 7.x generated code, which fails to import
239+
# with older protobuf runtimes (e.g. the protobuf <= 5.29.4 used in testing).
240+
tokenization_extra_require = ["sentencepiece >= 0.2.0, < 0.2.3"]
239241
tokenization_testing_extra_require = [
240242
# sentencepiece has no Python 3.15 wheels yet and fails to build from source.
241-
"sentencepiece >= 0.2.0; python_version<'3.15'",
243+
"sentencepiece >= 0.2.0, < 0.2.3; python_version<'3.15'",
242244
"nltk",
243245
]
244246

0 commit comments

Comments
 (0)