Skip to content

Commit b6b6509

Browse files
authored
Clean up setup.py to remove old version restrictions (#36731)
1 parent 83673d8 commit b6b6509

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

sdks/python/setup.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,7 @@ def cythonize(*args, **kwargs):
166166
'embeddings',
167167
'onnxruntime',
168168
'langchain',
169-
# sentence-transformers 3.0+ requires transformers 4.34+
170-
# which uses Python 3.10+ union syntax
171-
# Use 2.x versions for Python 3.9 compatibility with transformers <4.55.0
172-
'sentence-transformers>=2.2.2,<3.0.0; python_version < "3.10"',
173-
'sentence-transformers>=2.2.2; python_version >= "3.10"',
169+
'sentence-transformers>=2.2.2',
174170
'skl2onnx',
175171
'pillow',
176172
'pyod',
@@ -297,7 +293,7 @@ def get_portability_package_data():
297293
return files
298294

299295

300-
python_requires = '>=3.9'
296+
python_requires = '>=3.10'
301297

302298
if sys.version_info.major == 3 and sys.version_info.minor >= 14:
303299
warnings.warn(
@@ -457,8 +453,7 @@ def get_portability_package_data():
457453
'pytest-timeout>=2.1.0,<3',
458454
'scikit-learn>=0.20.0',
459455
'sqlalchemy>=1.3,<3.0',
460-
'psycopg2-binary>=2.8.5,<2.9.10; python_version <= "3.9"',
461-
'psycopg2-binary>=2.8.5,<3.0; python_version >= "3.10"',
456+
'psycopg2-binary>=2.8.5,<3.0',
462457
'testcontainers[mysql,kafka,milvus]>=4.0.0,<5.0.0',
463458
'cryptography>=41.0.2',
464459
'hypothesis>5.0.0,<7.0.0',
@@ -585,19 +580,14 @@ def get_portability_package_data():
585580
'torch': ['torch>=1.9.0,<2.8.0'],
586581
'tensorflow': ['tensorflow>=2.12rc1,<2.21'],
587582
'transformers': [
588-
# Restrict transformers to <4.55.0 for Python 3.9 compatibility
589-
# Versions 4.55.0+ use Python 3.10+ union syntax (int | None)
590-
# which causes TypeError on Python 3.9
591-
'transformers>=4.28.0,<4.55.0; python_version < "3.10"',
592-
'transformers>=4.28.0,<4.56.0; python_version >= "3.10"',
583+
'transformers>=4.28.0,<4.56.0',
593584
'tensorflow>=2.12.0',
594585
'torch>=1.9.0'
595586
],
596587
'ml_cpu': [
597588
'tensorflow>=2.12.0',
598589
'torch==2.8.0+cpu',
599-
'transformers>=4.28.0,<4.55.0; python_version < "3.10"',
600-
'transformers>=4.28.0,<4.56.0; python_version >= "3.10"'
590+
'transformers>=4.28.0,<4.56.0'
601591
],
602592
'tft': [
603593
'tensorflow_transform>=1.14.0,<1.15.0'

0 commit comments

Comments
 (0)