Skip to content

Commit

Permalink
chore: Upgrade Python requirements (#260)
Browse files Browse the repository at this point in the history
* chore: Upgrade Python requirements
* fix: pin edx-lint<5.4 to avoid quality error with python 3.8
  AttributeError: module 'importlib.resources' has no attribute 'files'
* build: add compile-requirements make target
* chore: bumps version to 3.7.9

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
  • Loading branch information
edx-requirements-bot and pomegranited authored Aug 29, 2024
1 parent f855b26 commit 87d02e7
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 39 deletions.
25 changes: 14 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export BROWSER_PYSCRIPT
BROWSER := python -c "$$BROWSER_PYSCRIPT"

.PHONY: clean, coverage, diff_cover, docs, help, dev_requirements, test, test_quality, test_requirements, upgrade,\
check_keywords
compile-requirements check_keywords

help: ## Display this help message
@echo "Please use \`make <target>' where <target> is one of"
Expand Down Expand Up @@ -51,24 +51,27 @@ $(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"
echo "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

export CUSTOM_COMPILE_COMMAND = make upgrade
upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
compile-requirements: export CUSTOM_COMPILE_COMMAND = make upgrade
compile-requirements: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
# Make sure to compile files after any other files they include!
pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade --verbose --rebuild -o requirements/pip-tools.txt requirements/pip-tools.in
pip-compile ${COMPILE_OPTS} --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile ${COMPILE_OPTS} --verbose --rebuild -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade --verbose --rebuild -o requirements/base.txt requirements/base.in
pip-compile --upgrade --verbose --rebuild -o requirements/docs.txt requirements/docs.in
pip-compile --upgrade --verbose --rebuild -o requirements/test.txt requirements/test.in
pip-compile --upgrade --verbose --rebuild -o requirements/dev.txt requirements/dev.in
pip-compile --upgrade --verbose --rebuild -o requirements/tox.txt requirements/tox.in
pip-compile --upgrade --verbose --rebuild -o requirements/ci.txt requirements/ci.in
pip-compile ${COMPILE_OPTS} --verbose --rebuild -o requirements/base.txt requirements/base.in
pip-compile ${COMPILE_OPTS} --verbose --rebuild -o requirements/docs.txt requirements/docs.in
pip-compile ${COMPILE_OPTS} --verbose --rebuild -o requirements/test.txt requirements/test.in
pip-compile ${COMPILE_OPTS} --verbose --rebuild -o requirements/dev.txt requirements/dev.in
pip-compile ${COMPILE_OPTS} --verbose --rebuild -o requirements/tox.txt requirements/tox.in
pip-compile ${COMPILE_OPTS} --verbose --rebuild -o requirements/ci.txt requirements/ci.in
# Let tox control the Django and DRF versions for tests
sed -i.tmp '/^django==/d' requirements/test.txt
sed -i.tmp '/^djangorestframework==/d' requirements/test.txt
rm requirements/test.txt.tmp

upgrade: ## update the pip requirements files to use the latest releases satisfying our constraints
$(MAKE) compile-requirements COMPILE_OPTS="--upgrade"

test: clean ## Run tests in the current virtualenv
pytest

Expand Down
6 changes: 3 additions & 3 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
cachetools==5.4.0
cachetools==5.5.0
# via
# -r requirements/tox.txt
# tox
Expand Down Expand Up @@ -35,7 +35,7 @@ filelock==3.15.4
# -r requirements/tox.txt
# tox
# virtualenv
idna==3.7
idna==3.8
# via requests
packaging==24.1
# via
Expand Down Expand Up @@ -63,7 +63,7 @@ tomli==2.0.1
# coverage
# pyproject-api
# tox
tox==4.17.1
tox==4.18.0
# via -r requirements/tox.txt
urllib3==2.2.2
# via requests
Expand Down
6 changes: 5 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
# Common constraints for edx repos
-c common_constraints.txt

backports.zoneinfo;python_version<"3.9"
backports.zoneinfo;python_version<"3.9"

# Temporary until we drop support for python 3.8
# Upgrading causes quality error: AttributeError: module 'importlib.resources' has no attribute 'files'
edx-lint<5.4
18 changes: 10 additions & 8 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,22 @@ edx-django-release-util==1.4.0
# -r requirements/docs.txt
# -r requirements/test.txt
edx-lint==5.3.7
# via -r requirements/test.txt
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
exceptiongroup==1.2.2
# via
# -r requirements/test.txt
# pytest
factory-boy==3.3.0
factory-boy==3.3.1
# via -r requirements/test.txt
faker==26.3.0
faker==28.0.0
# via
# -r requirements/test.txt
# factory-boy
freezegun==1.5.1
# via -r requirements/test.txt
idna==3.7
idna==3.8
# via
# -r requirements/docs.txt
# -r requirements/test.txt
Expand All @@ -133,7 +135,7 @@ imagesize==1.4.1
# -r requirements/docs.txt
# -r requirements/test.txt
# sphinx
importlib-metadata==8.2.0
importlib-metadata==8.4.0
# via
# -r requirements/docs.txt
# -r requirements/test.txt
Expand Down Expand Up @@ -277,7 +279,7 @@ snowballstemmer==2.2.0
# -r requirements/docs.txt
# -r requirements/test.txt
# sphinx
soupsieve==2.5
soupsieve==2.6
# via
# -r requirements/docs.txt
# -r requirements/test.txt
Expand Down Expand Up @@ -332,7 +334,7 @@ sqlparse==0.5.1
# -r requirements/docs.txt
# -r requirements/test.txt
# django
stevedore==5.2.0
stevedore==5.3.0
# via
# -r requirements/test.txt
# code-annotations
Expand All @@ -346,7 +348,7 @@ tomli==2.0.1
# coverage
# pylint
# pytest
tomlkit==0.13.0
tomlkit==0.13.2
# via
# -r requirements/test.txt
# pylint
Expand Down
6 changes: 3 additions & 3 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ docutils==0.19
# sphinx
edx-django-release-util==1.4.0
# via -r requirements/base.txt
idna==3.7
idna==3.8
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==8.2.0
importlib-metadata==8.4.0
# via sphinx
jinja2==3.1.4
# via sphinx
Expand Down Expand Up @@ -89,7 +89,7 @@ six==1.16.0
# sphinxcontrib-napoleon
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.5
soupsieve==2.6
# via beautifulsoup4
sphinx==6.2.1
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build==1.2.1
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==8.2.0
importlib-metadata==8.4.0
# via build
packaging==24.1
# via build
Expand Down
2 changes: 1 addition & 1 deletion requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ wheel==0.44.0
# The following packages are considered to be unsafe in a requirements file:
pip==24.2
# via -r requirements/pip.in
setuptools==72.1.0
setuptools==73.0.1
# via -r requirements/pip.in
18 changes: 10 additions & 8 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,26 @@ edx-django-release-util==1.4.0
# -r requirements/base.txt
# -r requirements/docs.txt
edx-lint==5.3.7
# via -r requirements/test.in
# via
# -c requirements/constraints.txt
# -r requirements/test.in
exceptiongroup==1.2.2
# via pytest
factory-boy==3.3.0
factory-boy==3.3.1
# via -r requirements/test.in
faker==26.3.0
faker==28.0.0
# via factory-boy
freezegun==1.5.1
# via -r requirements/test.in
idna==3.7
idna==3.8
# via
# -r requirements/docs.txt
# requests
imagesize==1.4.1
# via
# -r requirements/docs.txt
# sphinx
importlib-metadata==8.2.0
importlib-metadata==8.4.0
# via
# -r requirements/docs.txt
# sphinx
Expand Down Expand Up @@ -214,7 +216,7 @@ snowballstemmer==2.2.0
# via
# -r requirements/docs.txt
# sphinx
soupsieve==2.5
soupsieve==2.6
# via
# -r requirements/docs.txt
# beautifulsoup4
Expand Down Expand Up @@ -256,7 +258,7 @@ sqlparse==0.5.1
# -r requirements/base.txt
# -r requirements/docs.txt
# django
stevedore==5.2.0
stevedore==5.3.0
# via code-annotations
text-unidecode==1.3
# via python-slugify
Expand All @@ -265,7 +267,7 @@ tomli==2.0.1
# coverage
# pylint
# pytest
tomlkit==0.13.0
tomlkit==0.13.2
# via pylint
typing-extensions==4.12.2
# via
Expand Down
4 changes: 2 additions & 2 deletions requirements/tox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
cachetools==5.4.0
cachetools==5.5.0
# via tox
chardet==5.2.0
# via tox
Expand Down Expand Up @@ -32,7 +32,7 @@ tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.17.1
tox==4.18.0
# via -r requirements/tox.in
virtualenv==20.26.3
# via tox
2 changes: 1 addition & 1 deletion submissions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
""" API for creating submissions and scores. """
__version__ = '3.7.8'
__version__ = '3.7.9'

0 comments on commit 87d02e7

Please sign in to comment.