Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Upgrade django-stubs even further, to fix mypy
Browse files Browse the repository at this point in the history
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 python/mypy#17958

Also includes an unrelated common_constraints update.
kdmccormick committed Jan 7, 2025
1 parent 41c25cf commit e04fe7e
Showing 9 changed files with 22 additions and 11 deletions.
4 changes: 4 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -28,3 +28,7 @@ elasticsearch<7.14.0
# Cause: https://github.com/openedx/edx-lint/issues/458
# This can be unpinned once https://github.com/openedx/edx-lint/issues/459 has been resolved.
pip<24.3

# Cause: https://github.com/openedx/edx-lint/issues/475
# This can be unpinned once https://github.com/openedx/edx-lint/issues/476 has been resolved.
urllib3<2.3.0
8 changes: 5 additions & 3 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
@@ -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 either match the major version
# of django, or exceed it by 1. So, we will need toperpetually 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
1 change: 1 addition & 0 deletions requirements/edx/base.txt
Original file line number Diff line number Diff line change
@@ -1212,6 +1212,7 @@ uritemplate==4.1.1
# google-api-python-client
urllib3==2.2.3
# via
# -c requirements/edx/../common_constraints.txt
# botocore
# elasticsearch
# py2neo
12 changes: 5 additions & 7 deletions requirements/edx/development.txt
Original file line number Diff line number Diff line change
@@ -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
@@ -1292,9 +1293,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
@@ -2118,8 +2117,6 @@ tqdm==4.67.1
# -r requirements/edx/testing.txt
# nltk
# openai
types-pytz==2024.2.0.20241003
# via django-stubs
types-pyyaml==6.0.12.20240917
# via
# django-stubs
@@ -2170,6 +2167,7 @@ uritemplate==4.1.1
# google-api-python-client
urllib3==2.2.3
# via
# -c requirements/edx/../common_constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# botocore
1 change: 1 addition & 0 deletions requirements/edx/doc.txt
Original file line number Diff line number Diff line change
@@ -1526,6 +1526,7 @@ uritemplate==4.1.1
# google-api-python-client
urllib3==2.2.3
# via
# -c requirements/edx/../common_constraints.txt
# -r requirements/edx/base.txt
# botocore
# elasticsearch
1 change: 1 addition & 0 deletions requirements/edx/semgrep.txt
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@ typing-extensions==4.12.2
# semgrep
urllib3==2.2.3
# via
# -c requirements/edx/../common_constraints.txt
# requests
# semgrep
wcmatch==8.5.2
1 change: 1 addition & 0 deletions requirements/edx/testing.txt
Original file line number Diff line number Diff line change
@@ -1612,6 +1612,7 @@ uritemplate==4.1.1
# google-api-python-client
urllib3==2.2.3
# via
# -c requirements/edx/../common_constraints.txt
# -r requirements/edx/base.txt
# botocore
# elasticsearch
1 change: 1 addition & 0 deletions scripts/user_retirement/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -158,6 +158,7 @@ uritemplate==4.1.1
# via google-api-python-client
urllib3==1.26.20
# via
# -c scripts/user_retirement/requirements/../../../requirements/common_constraints.txt
# -r scripts/user_retirement/requirements/base.in
# botocore
# requests
4 changes: 3 additions & 1 deletion scripts/xblock/requirements.txt
Original file line number Diff line number Diff line change
@@ -15,4 +15,6 @@ idna==3.10
requests==2.32.3
# via -r scripts/xblock/requirements.in
urllib3==2.2.3
# via requests
# via
# -c scripts/xblock/../../requirements/common_constraints.txt
# requests

0 comments on commit e04fe7e

Please sign in to comment.