From 9262c9aa42e1b43e20b68900e83956457b02ef24 Mon Sep 17 00:00:00 2001 From: "Kyle D. McCormick" Date: Tue, 7 Jan 2025 10:18:46 -0500 Subject: [PATCH] build: Upgrade django-stubs even further, to fix mypy Rather than constraining django-stubs' major version to our django major version (4.x.x), we are going to go one ahead (5.x.x), as recommended by https://github.com/python/mypy/issues/17958 Also includes an unrelated common_constraints update. --- requirements/constraints.txt | 8 +++++--- requirements/edx/development.txt | 11 ++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/requirements/constraints.txt b/requirements/constraints.txt index a985952c8a3..fcea298aeda 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -61,11 +61,13 @@ django-webpack-loader==0.7.0 djangorestframework<3.15.0 # Date: 2024-07-19 -# Generally speaking, the major version of django-stubs should match the major version of django. -# Specifically, we need to perpetually constrain django-stubs to a compatible version based on: +# Generally speaking, the major version of django-stubs must either match the major version +# of django, or exceed it by 1. So, we will need to perpetually constrain django-stubs and +# update it as we perform django upgrades. For more details, see: # https://github.com/typeddjango/django-stubs?tab=readme-ov-file#version-compatibility +# including the note on "Partial Support". # Issue: https://github.com/openedx/edx-platform/issues/35275 -django-stubs<5 +django-stubs<6 # Date: 2024-07-23 # django-storages==1.14.4 breaks course imports diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index dc9f62fd9f5..c8959e777dd 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -76,6 +76,7 @@ asgiref==3.8.1 # django # django-cors-headers # django-countries + # django-stubs asn1crypto==1.5.1 # via # -r requirements/edx/doc.txt @@ -577,7 +578,7 @@ django-storages==1.14.3 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edxval -django-stubs==4.2.7 +django-stubs==5.1.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/development.in @@ -625,7 +626,7 @@ djangorestframework==3.14.0 # openedx-learning # ora2 # super-csv -djangorestframework-stubs==3.14.5 +djangorestframework-stubs==3.15.2 # via -r requirements/edx/development.in djangorestframework-xml==2.0.0 # via @@ -1293,9 +1294,7 @@ multidict==6.1.0 # aiohttp # yarl mypy==1.14.1 - # via - # -c requirements/edx/../constraints.txt - # -r requirements/edx/development.in + # via -r requirements/edx/development.in mypy-extensions==1.0.0 # via mypy mysqlclient==2.2.6 @@ -2120,8 +2119,6 @@ tqdm==4.67.1 # -r requirements/edx/testing.txt # nltk # openai -types-pytz==2024.2.0.20241221 - # via django-stubs types-pyyaml==6.0.12.20241230 # via # django-stubs