Skip to content

Update prisma to 0.15.0 #10454

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

Closed
wants to merge 1 commit into from

Conversation

msabramo
Copy link
Contributor

@msabramo msabramo commented May 1, 2025

With older versions of prisma, I get various errors when running make test-unit. For example with prisma 0.11.0, I get:

Screenshot 2025-04-30 at 7 23 27 PM

====================================== short test summary info =======================================
ERROR tests/litellm/proxy/auth/test_auth_exception_handler.py - AttributeError: module 'prisma._types'
  has no attribute 'SortMode'
ERROR tests/litellm/proxy/db/test_exception_handler.py - AttributeError: module 'prisma._types'
  has no attribute 'SortMode'
!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!
=================================== 4 warnings, 2 errors in 2.35s ====================================

Title

Relevant issues

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
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix
✅ Test

Changes

Copy link

vercel bot commented May 1, 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 May 1, 2025 2:33am

With older versions of prisma, I get various errors when running `make
test-unit`. For example with prisma 0.11.0, I get:

```
====================================== short test summary info =======================================
ERROR tests/litellm/proxy/auth/test_auth_exception_handler.py - AttributeError: module 'prisma._types'
  has no attribute 'SortMode'
ERROR tests/litellm/proxy/db/test_exception_handler.py - AttributeError: module 'prisma._types'
  has no attribute 'SortMode'
!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!
=================================== 4 warnings, 2 errors in 2.35s ====================================
```
@krrishdholakia
Copy link
Contributor

Hey @msabramo our github action runs the same test (make test-unit) with the same version (0.11.0) and we can see it passes

could this be a local env issue ?

@msabramo
Copy link
Contributor Author

msabramo commented May 1, 2025

Hey @msabramo our github action runs the same test (make test-unit) with the same version (0.11.0) and we can see it passes

could this be a local env issue ?

Interesting. Yeah that seems likely. I wonder if something is messed up in poetry's cache or something like that.

@msabramo
Copy link
Contributor Author

msabramo commented May 1, 2025

Closing this because I did the following and now it's working:

rm -rf .venv
virtualenv --python=python3.12 .venv
poetry install --all-extras
$ time make test-unit
poetry run pytest tests/litellm/
============================================================= test session starts =============================================================
platform darwin -- Python 3.12.9, pytest-7.4.4, pluggy-1.5.0
rootdir: /Users/abramowi/Code/OpenSource/litellm
plugins: respx-0.22.0, anyio-4.5.2, asyncio-0.21.2, mock-3.14.0, requests-mock-1.12.1
asyncio: mode=Mode.STRICT
collected 593 items

tests/litellm/proxy/test_proxy_server.py .                                                                                              [  0%]
tests/litellm/proxy/db/db_transaction_queue/test_pod_lock_manager.py ...                                                                [  0%]
tests/litellm/proxy/db/db_transaction_queue/test_daily_spend_update_queue.py ..                                                         [  1%]
tests/litellm/proxy/db/db_transaction_queue/test_spend_update_queue.py .
...

@msabramo msabramo closed this May 1, 2025
@msabramo msabramo deleted the upgrade-prisma-to-0.15.0 branch May 1, 2025 20:02
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.

2 participants