Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ jobs:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
services:
postgres:
image: postgres:14-alpine
image: postgres:alpine
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Avoid floating DB image tags; pin Postgres to a major (or digest).

postgres:alpine is mutable and risks flaky CI. Pin to a stable major like postgres:16-alpine (or the project’s required version).

-        image: postgres:alpine
+        image: postgres:16-alpine
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
image: postgres:alpine
image: postgres:16-alpine
🤖 Prompt for AI Agents
.github/workflows/django.yml around line 25: the workflow uses the floating
image tag "postgres:alpine", which is mutable and can cause flaky CI; update the
image to a pinned, stable tag such as "postgres:16-alpine" (or the project's
required major version) or pin to a specific digest; replace the image value
with the chosen pinned tag/digest everywhere it’s used in the workflow to ensure
reproducible builds.

env:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
Expand Down
16 changes: 9 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[tox]
envlist =
py{310,311,312}-django51-{sqlite,mysql,postgresql}
py{310,311,312}-django50-{sqlite,mysql,postgresql}
py{38,39,310,311,312}-django42-{sqlite,mysql,postgresql}
py{38,39,310,311}-django41-{sqlite,mysql,postgresql}
py{38,39,310}-django40-{sqlite,mysql,postgresql}
py{38,39,310}-django32-{sqlite,mysql,postgresql}
py{310,311,312, 313}-django52-{sqlite,mysql,postgresql}
py{310,311,312, 313}-django51-{sqlite,mysql,postgresql}
py{310,311,312, 313}-django50-{sqlite,mysql,postgresql}
py{38,39,310,311,312, 313}-django42-{sqlite,mysql,postgresql}
py{38,39,310,311, 313}-django41-{sqlite,mysql,postgresql}
py{38,39,310, 313}-django40-{sqlite,mysql,postgresql}
py{38,39,310, 313}-django32-{sqlite,mysql,postgresql}
Comment on lines +3 to +9
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix unsupported Python/Django combos that will break CI.

  • py313 must not be paired with Django 3.2/4.0/4.1/4.2/5.0.
  • py313 is supported by Django 5.2, and by Django 5.1 starting from 5.1.3. (docs.djangoproject.com)

Apply:

-    py{310,311,312, 313}-django52-{sqlite,mysql,postgresql}
-    py{310,311,312, 313}-django51-{sqlite,mysql,postgresql}
-    py{310,311,312, 313}-django50-{sqlite,mysql,postgresql}
-    py{38,39,310,311,312, 313}-django42-{sqlite,mysql,postgresql}
-    py{38,39,310,311, 313}-django41-{sqlite,mysql,postgresql}
-    py{38,39,310, 313}-django40-{sqlite,mysql,postgresql}
-    py{38,39,310, 313}-django32-{sqlite,mysql,postgresql}
+    py{310,311,312,313}-django52-{sqlite,mysql,postgresql}
+    py{310,311,312,313}-django51-{sqlite,mysql,postgresql}
+    py{310,311,312}-django50-{sqlite,mysql,postgresql}
+    py{38,39,310,311,312}-django42-{sqlite,mysql,postgresql}
+    py{38,39,310,311}-django41-{sqlite,mysql,postgresql}
+    py{38,39,310}-django40-{sqlite,mysql,postgresql}
+    py{38,39,310}-django32-{sqlite,mysql,postgresql}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
py{310,311,312, 313}-django52-{sqlite,mysql,postgresql}
py{310,311,312, 313}-django51-{sqlite,mysql,postgresql}
py{310,311,312, 313}-django50-{sqlite,mysql,postgresql}
py{38,39,310,311,312, 313}-django42-{sqlite,mysql,postgresql}
py{38,39,310,311, 313}-django41-{sqlite,mysql,postgresql}
py{38,39,310, 313}-django40-{sqlite,mysql,postgresql}
py{38,39,310, 313}-django32-{sqlite,mysql,postgresql}
py{310,311,312,313}-django52-{sqlite,mysql,postgresql}
py{310,311,312,313}-django51-{sqlite,mysql,postgresql}
py{310,311,312}-django50-{sqlite,mysql,postgresql}
py{38,39,310,311,312}-django42-{sqlite,mysql,postgresql}
py{38,39,310,311}-django41-{sqlite,mysql,postgresql}
py{38,39,310}-django40-{sqlite,mysql,postgresql}
py{38,39,310}-django32-{sqlite,mysql,postgresql}
🤖 Prompt for AI Agents
In tox.ini lines 3-9, py313 is incorrectly paired with unsupported Django
versions (3.2, 4.0, 4.1, 4.2, 5.0) which will break CI; remove py313 from the
django32, django40, django41, django42 and django50 envlists and ensure py313
only appears in the django52 envlist (and in django51 only if your project pins
Django>=5.1.3 — otherwise remove it from django51 too); update the envlist
entries accordingly so py313 is only used with supported Django versions.

checkqa
pylint
docs
Expand All @@ -19,7 +20,7 @@ python =
3.10: py310
3.11: py311
3.12: py312

3.13: py313
[base]
deps =
# recommended django version and other dependencies
Expand Down Expand Up @@ -67,6 +68,7 @@ deps =
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2
django52: Django>=5.2,<5.3
postgresql: psycopg2-binary==2.9.9
mysql: mysqlclient
setenv =
Expand Down
Loading