Skip to content

test(databricks): drop empty __init__.py in responses test dir to avoid package collision - #30288

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/ci-autofix-automation-64c0
Closed

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/ci-autofix-automation-64c0

Conversation

@cursor

@cursor cursor Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Relevant issues

Surfaces as a collection-time ModuleNotFoundError whenever another provider also ships an __init__.py under a responses/ test subdirectory without an __init__.py in its parent provider directory (most recently, PR #30286 adding tests/test_litellm/llms/dashscope/responses/__init__.py).

Linear ticket

n/a (CI autofix)

Pre-Submission checklist

  • I have added meaningful tests
  • 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
  • I have requested a Greptile review

CI (LiteLLM team)

  • Branch creation CI run
  • CI run for the last commit
  • Merge / cherry-pick CI run

Screenshots / Proof of Fix

Reproduced the collection-time collision locally and confirmed the fix:

$ pytest reprodir/llms/databricks/responses/test_databricks_responses_transformation.py \
         reprodir/llms/dashscope/responses/test_dashscope_responses_transformation.py
...
E   ModuleNotFoundError: No module named 'responses.test_dashscope_responses_transformation'
ERROR reprodir/llms/dashscope/responses/test_dashscope_responses_transformation.py

# after removing databricks/responses/__init__.py
$ pytest reprodir/llms/databricks/responses/test_databricks_responses_transformation.py \
         reprodir/llms/dashscope/responses/test_dashscope_responses_transformation.py
.. 2 passed in 0.01s

The failing job before this change: https://github.com/BerriAI/litellm/actions/runs/27407926986/job/81001703014

Type

🐛 Bug Fix
✅ Test

Changes

Deletes the empty tests/test_litellm/llms/databricks/responses/__init__.py. With pytest's default prepend import mode and no __init__.py chain back to a rooted package (there is none under tests/test_litellm/llms/databricks/), that file caused pytest to register the test module under the top-level responses package name. Any other provider whose responses/ test directory also has an __init__.py (but whose own provider dir does not) ends up claiming the same responses package, and whichever module pytest imports second fails with ModuleNotFoundError: No module named 'responses.<other_module>'. Removing this empty marker makes the databricks test align with sibling databricks/chat/ (which has no __init__.py) and lets pytest discover it via rootdir without polluting the global responses namespace.

Open in Web View Automation 

…id package collision

Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions Bot added the stale label Sep 11, 2026
@yuneng-berri
yuneng-berri deleted the branch main September 13, 2026 04:24
@yuneng-berri yuneng-berri reopened this Sep 13, 2026
@github-actions github-actions Bot removed the stale label Sep 14, 2026
@devin-ai-integration
devin-ai-integration Bot changed the base branch from litellm_internal_staging to main September 23, 2026 16:04
@mateo-berri

Copy link
Copy Markdown
Contributor

Closing this since main already has the same change from #43191. Thanks for contributing, and please reopen if anything is missing

@mateo-berri mateo-berri closed this Nov 9, 2026
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.

4 participants