Skip to content

pyproject.toml simplification and version updates#275

Open
z-a-f wants to merge 3 commits intoandrewyng:mainfrom
z-a-f:version-update
Open

pyproject.toml simplification and version updates#275
z-a-f wants to merge 3 commits intoandrewyng:mainfrom
z-a-f:version-update

Conversation

@z-a-f
Copy link

@z-a-f z-a-f commented Feb 26, 2026

This removes poetry-specific syntax, and pins dependency versions (see individual commits)

  1. Python version is constrained to 310 - 312. This is deliberate, as only these versions are tested
  2. Dependencies are pinned to make sure there are no conflicts
  3. Structure of the TOML is changed. This will allow for easier migration and version management

Fixes andrewyng#273

`chromadb` only specifies minimum version for `onnxruntime`.
This causes conflicts with Python 3.10.

This conditionally pins `onnxruntime` to 1.23.0 for Python 3.10 and 1.24.0 for Python 3.11+.
This commit DOES NOT introduce behavioral changes,
but rewrites the format and the schema of the pyproject.toml.

# Motivation

1. Better readability
2. Easier version management
3. Easier migration to different tools

# Nogoals

1. No semantic changes
2. No version pinning
3. No fixes for existing dependencies

# Local Tests

```shell
========================================================================== test session starts ===========================================================================
platform linux -- Python 3.12.3, pytest-8.4.2, pluggy-1.6.0
rootdir: /home/zatoichi/Desktop/Git/aisuite
configfile: pyproject.toml
testpaths: tests
plugins: cov-6.3.0, anyio-4.12.1, asyncio-0.24.0
asyncio: mode=Mode.STRICT, default_loop_scope=None
collected 274 items / 76 deselected / 198 selected

tests/client/test_client.py ..............................                                                                                                         [ 15%]
tests/framework/test_asr_models.py .......                                                                                                                         [ 18%]
tests/framework/test_asr_params.py ...............................................                                                                                 [ 42%]
tests/providers/test_anthropic_converter.py .......                                                                                                                [ 45%]
tests/providers/test_asr_parameter_passthrough.py ........                                                                                                         [ 50%]
tests/providers/test_aws_converter.py ....                                                                                                                         [ 52%]
tests/providers/test_azure_provider.py ....                                                                                                                        [ 54%]
tests/providers/test_cerebras_provider.py ..                                                                                                                       [ 55%]
tests/providers/test_cohere_provider.py .                                                                                                                          [ 55%]
tests/providers/test_deepgram_provider.py .........                                                                                                                [ 60%]
tests/providers/test_deepseek_provider.py ..                                                                                                                       [ 61%]
tests/providers/test_google_converter.py .....                                                                                                                     [ 63%]
tests/providers/test_google_provider.py ............                                                                                                               [ 69%]
tests/providers/test_groq_provider.py ..                                                                                                                           [ 70%]
tests/providers/test_huggingface_provider.py ..........                                                                                                            [ 75%]
tests/providers/test_inception_provider.py .                                                                                                                       [ 76%]
tests/providers/test_lmstudio_provider.py .                                                                                                                        [ 76%]
tests/providers/test_mistral_provider.py ..                                                                                                                        [ 77%]
tests/providers/test_nebius_provider.py .                                                                                                                          [ 78%]
tests/providers/test_ollama_provider.py .                                                                                                                          [ 78%]
tests/providers/test_openai_provider.py ..........                                                                                                                 [ 83%]
tests/providers/test_sambanova_provider.py ..                                                                                                                      [ 84%]
tests/providers/test_watsonx_provider.py s                                                                                                                         [ 85%]
tests/test_provider.py ........                                                                                                                                    [ 89%]
tests/utils/test_mcp_memory_integration.py ...                                                                                                                     [ 90%]
tests/utils/test_tool_manager.py ......                                                                                                                            [ 93%]
tests/utils/test_tools_mcp_schema.py ............                                                                                                                  [100%]

============================================================================ warnings summary ============================================================================
../../../.cache/pypoetry/virtualenvs/aisuite-H335D-c1-py3.12/lib/python3.12/site-packages/docstring_parser/attrdoc.py:17
  /home/zatoichi/.cache/pypoetry/virtualenvs/aisuite-H335D-c1-py3.12/lib/python3.12/site-packages/docstring_parser/attrdoc.py:17: DeprecationWarning: ast.NameConstant is deprecated and will be removed in Python 3.14; use ast.Constant instead
    ast.NameConstant: "value",

../../../.cache/pypoetry/virtualenvs/aisuite-H335D-c1-py3.12/lib/python3.12/site-packages/docstring_parser/attrdoc.py:18
  /home/zatoichi/.cache/pypoetry/virtualenvs/aisuite-H335D-c1-py3.12/lib/python3.12/site-packages/docstring_parser/attrdoc.py:18: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    ast.Num: "n",

../../../.cache/pypoetry/virtualenvs/aisuite-H335D-c1-py3.12/lib/python3.12/site-packages/docstring_parser/attrdoc.py:19
  /home/zatoichi/.cache/pypoetry/virtualenvs/aisuite-H335D-c1-py3.12/lib/python3.12/site-packages/docstring_parser/attrdoc.py:19: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    ast.Str: "s",

tests/providers/test_deepgram_provider.py::TestDeepgramProvider::test_provider_initialization
  /home/zatoichi/.cache/pypoetry/virtualenvs/aisuite-H335D-c1-py3.12/lib/python3.12/site-packages/websockets/legacy/__init__.py:6: DeprecationWarning: websockets.legacy is deprecated; see https://websockets.readthedocs.io/en/stable/howto/upgrade.html for upgrade instructions
    warnings.warn(  # deprecated in 14.0 - 2024-11-09

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================= 197 passed, 1 skipped, 76 deselected, 4 warnings in 6.23s ========================================================
````
@z-a-f
Copy link
Author

z-a-f commented Feb 26, 2026

@rohitprasad15 Note that this limits the python dependencies to 3.10 - 3.12. Because there are no unittests for 3.13+, it is safer to be explicit about it

cerebras_cloud_sdk = "^1.19.0"
[tool.poetry.group.dev]
optional = true
include-groups = []
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include-groups is not needed for poetry 2.2+. However, because the poetry-core was not pinned before, this is included for backwards compatibility

cc @rohitprasad15

It is often a better idea to pin to equivalent versions
rather than using the minimum version.
We also don't want to pin to a specific version,
as this might become too restrictive in the future.

This also updates all of the dependencies to the latest supported versions

In addition to that, we make sure we are only supporting tested python versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant