Skip to content

Commit

Permalink
fix: add common constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq committed Oct 5, 2023
1 parent d3f3814 commit 52504e9
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ $(COMMON_CONSTRAINTS_TXT):
echo "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: piptools ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
# This is a temporary solution to override the real common_constraints.txt
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
# See BOM-271 for more details.
Expand Down
9 changes: 5 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#
asgiref==3.7.2
# via django
backports-zoneinfo==0.2.1
# via django
certifi==2023.7.22
# via
# elasticsearch
Expand All @@ -20,9 +22,9 @@ click==8.1.7
# via edx-django-utils
cryptography==41.0.4
# via pyjwt
django==3.2.22
django==4.2.6
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.in
# django-cors-headers
# django-crum
Expand Down Expand Up @@ -74,7 +76,7 @@ edx-opaque-keys==2.5.1
# via edx-drf-extensions
elasticsearch==7.13.4
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.in
# django-elasticsearch-dsl-drf
Expand Down Expand Up @@ -129,7 +131,6 @@ python-dateutil==2.4.0
# elasticsearch-dsl
pytz==2023.3.post1
# via
# django
# djangorestframework
# drf-yasg
pyyaml==6.0.1
Expand Down
32 changes: 32 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This is a temporary solution to override the real common_constraints.txt
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
# See BOM-2721 for more details.
# Below is the copied and edited version of common_constraints

# A central location for most common version constraints
# (across edx repos) for pip-installation.
#
# Similar to other constraint files this file doesn't install any packages.
# It specifies version constraints that will be applied if a package is needed.
# When pinning something here, please provide an explanation of why it is a good
# idea to pin this package across all edx repos, Ideally, link to other information
# that will help people in the future to remove the pin when possible.
# Writing an issue against the offending project and linking to it here is good.
#
# Note: Changes to this file will automatically be used by other repos, referencing
# this file from Github directly. It does not require packaging in edx-lint.


# using LTS django version


# 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
django-simple-history==3.0.0

# tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos.
# Details can be found in this discussion: https://github.com/tox-dev/tox/discussions/1810
tox<4.0.0
4 changes: 4 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

-c common_constraints.txt

# Keeping Django to latest Django 4.2 LTS
# This constraint can be removed once the global constraint has been updated
Django<4.3

astroid==1.6.6
requests==2.25.0
elasticsearch>=7.8,<8.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/django.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
django==3.2.22
django==4.2.6
11 changes: 7 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ astroid==1.6.6
# -c requirements/constraints.txt
# -r requirements/test.in
# pylint
backports-zoneinfo==0.2.1
# via
# -r requirements/base.txt
# django
certifi==2023.7.22
# via
# -r requirements/base.txt
Expand Down Expand Up @@ -52,7 +56,7 @@ diff-cover==7.7.0
distlib==0.3.7
# via virtualenv
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-cors-headers
# django-crum
Expand Down Expand Up @@ -113,7 +117,7 @@ edx-opaque-keys==2.5.1
# edx-drf-extensions
elasticsearch==7.13.4
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-elasticsearch-dsl-drf
Expand Down Expand Up @@ -239,7 +243,6 @@ python-slugify==8.0.1
pytz==2023.3.post1
# via
# -r requirements/base.txt
# django
# djangorestframework
# drf-yasg
pyyaml==6.0.1
Expand Down Expand Up @@ -288,7 +291,7 @@ tomli==2.0.1
# tox
tox==3.28.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/test.in
typing-extensions==4.8.0
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/travis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tomli==2.0.1
# via tox
tox==3.28.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/travis.in
# tox-battery
tox-battery==0.6.2
Expand Down

0 comments on commit 52504e9

Please sign in to comment.