Uh oh!
There was an error while loading. Please reload this page.
fix(django-spanner): declare django dependency in setup.py - #18044
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the CI script ci/run_single_test.sh to install django~=5.2 as a peer dependency when testing the django-google-spanner package. The reviewer points out that hardcoding Django 5.2 can cause installation failures on Python versions older than 3.10, and suggests relaxing the constraint to just django so that pip can automatically resolve the latest compatible version.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| if pip install -e . ; then | ||
| # Install framework peer dependencies for packages that omit them from install_requires | ||
| if [ "${PACKAGE_NAME}" = "django-google-spanner" ]; then | ||
| pip install "django" |
There was a problem hiding this comment.
Can we add the required dependency instead?
There was a problem hiding this comment.
I updated packages/django-google-spanner/setup.py to declare "django >= 5.2, < 5.3" in dependencies and reverted the CI script workaround.
Uh oh!
There was an error while loading. Please reload this page.
Description
Declares
"django >= 5.2, < 5.3"ininstall_requires(dependencies) fordjango-google-spanner.Motivation
django_spannerimports and requiresdjangodirectly at top-level import time and explicitly checks for Django 5.2 compatibility indjango_spanner/__init__.py.Without
djangolisted insetup.py, installingdjango-google-spannerin a clean environment (such as during theimport-profilerpresubmit check) caused imports to fail with: ModuleNotFoundError: No module named 'django'Tracking issue for Django 6.0 support: #18053