Skip to content

Fix side effects on params instance variables. #9929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

junkmd
Copy link

@junkmd junkmd commented Apr 12, 2025

Fix side effects on params instance variables.

Relevant issues

#9928

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on (make test-unit)[https://docs.litellm.ai/docs/extras/contributing_code]
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix
🧹 Refactoring
✅ Test

Changes

See files.

Results of added tests.

$ poetry run pytest tests/litellm/test_main.py::Test_Chat
=================================================================================================== test session starts ===================================================================================================
platform linux -- Python 3.11.11, pytest-7.4.4, pluggy-1.5.0
rootdir: /workspaces/litellm
plugins: respx-0.22.0, anyio-4.5.2, asyncio-0.21.2, mock-3.14.0
asyncio: mode=Mode.STRICT
collected 4 items                                                                                                                                                                                                         

tests/litellm/test_main.py ....                                                                                                                                                                                     [100%]

==================================================================================================== warnings summary =====================================================================================================
.venv/lib/python3.11/site-packages/pydantic/_internal/_config.py:295
  /workspaces/litellm/.venv/lib/python3.11/site-packages/pydantic/_internal/_config.py:295: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/
    warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)

litellm/utils.py:183
  /workspaces/litellm/litellm/utils.py:183: DeprecationWarning: open_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    with resources.open_text(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================================== 4 passed, 2 warnings in 0.76s ==============================================================================================

Copy link

vercel bot commented Apr 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 12, 2025 0:41am

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