Skip to content

Commit

Permalink
build: pin drf<3.15
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveagent57 committed Mar 26, 2024
1 parent 73e0a29 commit c08d23f
Show file tree
Hide file tree
Showing 13 changed files with 304 additions and 267 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt fi
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
# Make sure to compile files after any other files they include!
sed -i.tmp 's/Django<4.0//g' requirements/common_constraints.txt
sed 's/Django<4.0//g' requirements/common_constraints.txt > tmp_con; cat tmp_con > requirements/common_constraints.txt; rm tmp_con
pip-compile --allow-unsafe --rebuild --upgrade -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
Expand Down
44 changes: 23 additions & 21 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ amqp==5.2.0
# via kombu
analytics-python==1.4.post1
# via -r requirements/base.in
asgiref==3.7.2
asgiref==3.8.1
# via
# django
# django-cors-headers
# django-simple-history
async-timeout==4.0.3
# via redis
attrs==23.2.0
Expand Down Expand Up @@ -48,7 +49,7 @@ click==8.1.7
# click-plugins
# click-repl
# edx-django-utils
click-didyoumean==0.3.0
click-didyoumean==0.3.1
# via celery
click-plugins==1.1.1
# via celery
Expand All @@ -62,16 +63,17 @@ coreapi==2.3.3
# openapi-codec
coreschema==0.0.4
# via coreapi
cryptography==42.0.2
cryptography==42.0.5
# via
# pyjwt
# social-auth-core
defusedxml==0.8.0rc2
# via
# python3-openid
# social-auth-core
django==4.2.10
django==4.2.11
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
# django-celery-results
# django-cors-headers
Expand Down Expand Up @@ -107,7 +109,7 @@ django-crum==0.7.9
# edx-rbac
django-extensions==3.2.3
# via -r requirements/base.in
django-filter==23.5
django-filter==24.1
# via -r requirements/base.in
django-log-request-id==2.1.0
# via -r requirements/base.in
Expand All @@ -117,7 +119,7 @@ django-model-utils==4.4.0
# edx-rbac
django-rest-swagger==2.2.0
# via -r requirements/base.in
django-simple-history==3.4.0
django-simple-history==3.5.0
# via -r requirements/base.in
django-waffle==4.1.0
# via
Expand All @@ -128,6 +130,7 @@ djangoql==0.18.1
# via -r requirements/base.in
djangorestframework==3.14.0
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# django-rest-swagger
# drf-jwt
Expand All @@ -151,7 +154,7 @@ edx-celeryutils==1.2.5
# via -r requirements/base.in
edx-django-release-util==1.3.0
# via -r requirements/base.in
edx-django-utils==5.10.1
edx-django-utils==5.11.0
# via
# -r requirements/base.in
# edx-drf-extensions
Expand All @@ -161,7 +164,7 @@ edx-drf-extensions==10.2.0
# via
# -r requirements/base.in
# edx-rbac
edx-enterprise-subsidy-client==0.4.1
edx-enterprise-subsidy-client==0.4.2
# via -r requirements/base.in
edx-opaque-keys[django]==2.5.1
# via
Expand All @@ -179,7 +182,7 @@ fastavro==1.9.4
# openedx-events
idna==3.6
# via requests
importlib-resources==6.1.1
importlib-resources==6.4.0
# via
# jsonschema
# jsonschema-specifications
Expand Down Expand Up @@ -207,17 +210,17 @@ monotonic==1.6
# via analytics-python
mysqlclient==2.2.4
# via -r requirements/base.in
newrelic==9.6.0
newrelic==9.7.1
# via edx-django-utils
oauthlib==3.2.2
# via
# requests-oauthlib
# social-auth-core
openapi-codec==1.3.2
# via django-rest-swagger
openedx-events==9.5.1
openedx-events==9.5.2
# via -r requirements/base.in
packaging==23.2
packaging==24.0
# via drf-yasg
pbr==6.0.0
# via stevedore
Expand All @@ -239,15 +242,14 @@ pyjwt[crypto]==2.8.0
# edx-auth-backends
# edx-drf-extensions
# edx-rest-api-client
# pyjwt
# social-auth-core
pymemcache==4.0.0
# via -r requirements/base.in
pymongo==3.13.0
# via edx-opaque-keys
pynacl==1.5.0
# via edx-django-utils
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via
# analytics-python
# celery
Expand All @@ -263,9 +265,9 @@ pyyaml==6.0.1
# drf-spectacular
# drf-yasg
# edx-django-release-util
redis==5.0.1
redis==5.0.3
# via -r requirements/base.in
referencing==0.33.0
referencing==0.34.0
# via
# jsonschema
# jsonschema-specifications
Expand All @@ -278,7 +280,7 @@ requests==2.31.0
# requests-oauthlib
# slumber
# social-auth-core
requests-oauthlib==1.3.1
requests-oauthlib==2.0.0
# via social-auth-core
rpds-py==0.18.0
# via
Expand Down Expand Up @@ -307,11 +309,11 @@ social-auth-core==4.5.3
# social-auth-app-django
sqlparse==0.4.4
# via django
stevedore==5.1.0
stevedore==5.2.0
# via
# edx-django-utils
# edx-opaque-keys
typing-extensions==4.9.0
typing-extensions==4.10.0
# via
# asgiref
# drf-spectacular
Expand All @@ -326,7 +328,7 @@ uritemplate==4.1.1
# coreapi
# drf-spectacular
# drf-yasg
urllib3==2.2.0
urllib3==2.2.1
# via requests
vine==5.1.0
# via
Expand All @@ -335,5 +337,5 @@ vine==5.1.0
# kombu
wcwidth==0.2.13
# via prompt-toolkit
zipp==3.17.0
zipp==3.18.1
# via importlib-resources
11 changes: 10 additions & 1 deletion requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,20 @@


# using LTS django version

Django<5.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected


# opentelemetry requires version 6.x at the moment:
# https://github.com/open-telemetry/opentelemetry-python/issues/3570
# Normally this could be added as a constraint in edx-django-utils, where we're
# adding the opentelemetry dependency. However, when we compile pip-tools.txt,
# that uses version 7.x, and then there's no undoing that when compiling base.txt.
# So we need to pin it globally, for now.
# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407
importlib-metadata<7
4 changes: 4 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
# Common constraints for edx repos
-c common_constraints.txt

# DRF 3.15.0 is providing some backwards-compatibility issues for us
# around default model fields vs. the serializer field defs,
# and the discontinued use of OrderedDict in serializers.
djangorestframework<3.15
Loading

0 comments on commit c08d23f

Please sign in to comment.