From c5fa785d21e6194b4f89fdd85f2738b52684203c Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Fri, 28 Jul 2023 18:04:41 +0500 Subject: [PATCH] chore: Upgrading django-simple-history. --- Makefile | 15 +++++-- requirements/base.txt | 7 ++-- requirements/celery44.in | 1 - requirements/celery44.txt | 20 --------- requirements/celery50.txt | 49 ----------------------- requirements/{celery50.in => celery53.in} | 0 requirements/dev.txt | 25 +----------- requirements/doc.txt | 7 ++-- requirements/quality.txt | 16 +------- requirements/test.txt | 7 ++-- tox.ini | 30 +++++++------- 11 files changed, 43 insertions(+), 134 deletions(-) delete mode 100644 requirements/celery44.in delete mode 100644 requirements/celery44.txt delete mode 100644 requirements/celery50.txt rename requirements/{celery50.in => celery53.in} (100%) diff --git a/Makefile b/Makefile index 2ce895d..3c68c78 100644 --- a/Makefile +++ b/Makefile @@ -29,13 +29,23 @@ docs: ## generate Sphinx HTML documentation, including API docs tox -e docs $(BROWSER)docs/_build/html/index.html + # Define PIP_COMPILE_OPTS=-v to get more information during make upgrade. PIP_COMPILE = pip-compile --rebuild --upgrade $(PIP_COMPILE_OPTS) +COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt +.PHONY: $(COMMON_CONSTRAINTS_TXT) +$(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 $(@) + upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade -upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in +upgrade: $(COMMON_CONSTRAINTS_TXT) + 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 pip install -qr requirements/pip-tools.txt # Make sure to compile files after any other files they include! + # need to do this to remove django-simple-history from common constraint. $(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in $(PIP_COMPILE) -o requirements/base.txt requirements/base.in $(PIP_COMPILE) -o requirements/test.txt requirements/test.in @@ -43,8 +53,7 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy $(PIP_COMPILE) -o requirements/quality.txt requirements/quality.in $(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in $(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in - $(PIP_COMPILE) -o requirements/celery44.txt requirements/celery44.in - $(PIP_COMPILE) -o requirements/celery50.txt requirements/celery50.in + $(PIP_COMPILE) -o requirements/celery53.txt requirements/celery53.in # Let tox control the Django version for tests sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp mv requirements/test.tmp requirements/test.txt diff --git a/requirements/base.txt b/requirements/base.txt index df225a6..ddda6f4 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -51,6 +51,7 @@ django==3.2.20 # django-config-models # django-crum # django-model-utils + # django-waffle # djangorestframework # drf-jwt # drf-yasg @@ -74,7 +75,7 @@ django-simple-history==3.0.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -django-waffle==3.0.0 +django-waffle==4.0.0 # via # edx-django-utils # edx-drf-extensions @@ -93,7 +94,7 @@ drf-yasg==1.21.7 # via edx-api-doc-tools edx-api-doc-tools==1.7.0 # via -r requirements/base.in -edx-celeryutils==1.2.2 +edx-celeryutils==1.2.3 # via -r requirements/base.in edx-django-utils==5.6.0 # via @@ -119,7 +120,7 @@ kombu==5.3.1 # via celery markupsafe==2.1.3 # via jinja2 -newrelic==8.8.1 +newrelic==8.9.0 # via edx-django-utils packaging==23.1 # via drf-yasg diff --git a/requirements/celery44.in b/requirements/celery44.in deleted file mode 100644 index 033b967..0000000 --- a/requirements/celery44.in +++ /dev/null @@ -1 +0,0 @@ -celery>=4.4,<4.5 diff --git a/requirements/celery44.txt b/requirements/celery44.txt deleted file mode 100644 index 33db209..0000000 --- a/requirements/celery44.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# make upgrade -# -amqp==2.6.1 - # via kombu -billiard==3.6.4.0 - # via celery -celery==4.4.7 - # via -r requirements/celery44.in -kombu==4.6.11 - # via celery -pytz==2023.3 - # via celery -vine==1.3.0 - # via - # amqp - # celery diff --git a/requirements/celery50.txt b/requirements/celery50.txt deleted file mode 100644 index 3f1f6bd..0000000 --- a/requirements/celery50.txt +++ /dev/null @@ -1,49 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# make upgrade -# -amqp==5.1.1 - # via kombu -backports-zoneinfo[tzdata]==0.2.1 - # via - # celery - # kombu -billiard==4.1.0 - # via celery -celery==5.3.1 - # via -r requirements/celery50.in -click==8.1.6 - # via - # celery - # click-didyoumean - # click-plugins - # click-repl -click-didyoumean==0.3.0 - # via celery -click-plugins==1.1.1 - # via celery -click-repl==0.3.0 - # via celery -kombu==5.3.1 - # via celery -prompt-toolkit==3.0.39 - # via click-repl -python-dateutil==2.8.2 - # via celery -six==1.16.0 - # via python-dateutil -typing-extensions==4.7.1 - # via kombu -tzdata==2023.3 - # via - # backports-zoneinfo - # celery -vine==5.0.0 - # via - # amqp - # celery - # kombu -wcwidth==0.2.6 - # via prompt-toolkit diff --git a/requirements/celery50.in b/requirements/celery53.in similarity index 100% rename from requirements/celery50.in rename to requirements/celery53.in diff --git a/requirements/dev.txt b/requirements/dev.txt index eeeebeb..e000c92 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -25,10 +25,6 @@ certifi==2023.7.22 # via # -r requirements/quality.txt # requests -cffi==1.15.1 - # via - # -r requirements/quality.txt - # cryptography chardet==5.1.0 # via diff-cover charset-normalizer==3.2.0 @@ -60,10 +56,6 @@ commonmark==0.9.1 # via # -r requirements/quality.txt # rich -cryptography==41.0.2 - # via - # -r requirements/quality.txt - # secretstorage diff-cover==7.7.0 # via -r requirements/dev.in dill==0.3.7 @@ -114,11 +106,6 @@ jaraco-classes==3.3.0 # via # -r requirements/quality.txt # keyring -jeepney==0.8.0 - # via - # -r requirements/quality.txt - # keyring - # secretstorage jinja2==3.1.2 # via # -r requirements/quality.txt @@ -181,10 +168,6 @@ py==1.11.0 # tox pycodestyle==2.10.0 # via -r requirements/quality.txt -pycparser==2.21 - # via - # -r requirements/quality.txt - # cffi pydantic==1.10.12 # via # -r requirements/quality.txt @@ -197,7 +180,7 @@ pygments==2.15.1 # diff-cover # readme-renderer # rich -pylint==2.17.4 +pylint==2.17.5 # via # -r requirements/quality.txt # edx-lint @@ -262,10 +245,6 @@ rstcheck-core==1.0.3 # via # -r requirements/quality.txt # rstcheck -secretstorage==3.3.3 - # via - # -r requirements/quality.txt - # keyring shellingham==1.5.0.post1 # via # -r requirements/quality.txt @@ -303,7 +282,7 @@ tomli==2.0.1 # pylint # pyproject-hooks # tox -tomlkit==0.11.8 +tomlkit==0.12.1 # via # -r requirements/quality.txt # pylint diff --git a/requirements/doc.txt b/requirements/doc.txt index 1458a1c..47a0da3 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -57,6 +57,7 @@ django==3.2.20 # django-config-models # django-crum # django-model-utils + # django-waffle # djangorestframework # drf-jwt # drf-yasg @@ -80,7 +81,7 @@ django-simple-history==3.0.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -django-waffle==3.0.0 +django-waffle==4.0.0 # via # edx-django-utils # edx-drf-extensions @@ -107,7 +108,7 @@ drf-yasg==1.21.7 # via edx-api-doc-tools edx-api-doc-tools==1.7.0 # via -r requirements/base.in -edx-celeryutils==1.2.2 +edx-celeryutils==1.2.3 # via -r requirements/base.in edx-django-utils==5.6.0 # via @@ -141,7 +142,7 @@ kombu==5.3.1 # via celery markupsafe==2.1.3 # via jinja2 -newrelic==8.8.1 +newrelic==8.9.0 # via edx-django-utils packaging==23.1 # via diff --git a/requirements/quality.txt b/requirements/quality.txt index 07c58bf..6763b9c 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -14,8 +14,6 @@ bleach==6.0.0 # via readme-renderer certifi==2023.7.22 # via requests -cffi==1.15.1 - # via cryptography charset-normalizer==3.2.0 # via requests click==8.1.6 @@ -32,8 +30,6 @@ colorama==0.4.6 # via typer commonmark==0.9.1 # via rich -cryptography==41.0.2 - # via secretstorage dill==0.3.7 # via pylint django==3.2.20 @@ -60,10 +56,6 @@ isort==5.12.0 # pylint jaraco-classes==3.3.0 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.2 # via code-annotations keyring==24.2.0 @@ -84,8 +76,6 @@ platformdirs==3.9.1 # via pylint pycodestyle==2.10.0 # via -r requirements/quality.in -pycparser==2.21 - # via cffi pydantic==1.10.12 # via rstcheck-core pydocstyle==6.3.0 @@ -94,7 +84,7 @@ pygments==2.15.1 # via # readme-renderer # rich -pylint==2.17.4 +pylint==2.17.5 # via # edx-lint # pylint-celery @@ -132,8 +122,6 @@ rstcheck==6.1.2 # via -r requirements/quality.in rstcheck-core==1.0.3 # via rstcheck -secretstorage==3.3.3 - # via keyring shellingham==1.5.0.post1 # via typer six==1.16.0 @@ -150,7 +138,7 @@ text-unidecode==1.3 # via python-slugify tomli==2.0.1 # via pylint -tomlkit==0.11.8 +tomlkit==0.12.1 # via pylint twine==4.0.2 # via -r requirements/quality.in diff --git a/requirements/test.txt b/requirements/test.txt index 7d97c9c..f283cc1 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -76,6 +76,7 @@ ddt==1.6.0 # django-config-models # django-crum # django-model-utils + # django-waffle # djangorestframework # drf-jwt # drf-yasg @@ -100,7 +101,7 @@ django-simple-history==3.0.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt -django-waffle==3.0.0 +django-waffle==4.0.0 # via # -r requirements/base.txt # edx-django-utils @@ -124,7 +125,7 @@ drf-yasg==1.21.7 # edx-api-doc-tools edx-api-doc-tools==1.7.0 # via -r requirements/base.txt -edx-celeryutils==1.2.2 +edx-celeryutils==1.2.3 # via -r requirements/base.txt edx-django-utils==5.6.0 # via @@ -169,7 +170,7 @@ markupsafe==2.1.3 # jinja2 mock==5.1.0 # via -r requirements/test.in -newrelic==8.8.1 +newrelic==8.9.0 # via # -r requirements/base.txt # edx-django-utils diff --git a/tox.ini b/tox.ini index bdb7878..bf70ef0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,40}-celery{44,50}, quality, rst_validation, docs, pii_check +envlist = py38-django{32,40}-celery{53}, quality, rst_validation, docs, pii_check [doc8] ignore = D001 @@ -34,34 +34,34 @@ addopts = --cov edx_name_affirmation --cov-report term-missing --cov-report xml norecursedirs = .* docs requirements site-packages [testenv] -deps = +deps = django32: Django>=3.2,<4.0 django40: Django>=4.0,<4.1 -r{toxinidir}/requirements/test.txt celery44: -r{toxinidir}/requirements/celery44.txt celery50: -r{toxinidir}/requirements/celery50.txt -commands = +commands = python manage.py check pytest {posargs} [testenv:rst_validation] -whitelist_externals = +whitelist_externals = make -deps = +deps = -r{toxinidir}/requirements/quality.txt -commands = +commands = make quality-rst [testenv:docs] -setenv = +setenv = DJANGO_SETTINGS_MODULE = test_settings PYTHONPATH = {toxinidir} -whitelist_externals = +whitelist_externals = make rm -deps = +deps = -r{toxinidir}/requirements/doc.txt -commands = +commands = doc8 --ignore-path docs/_build README.rst docs rm -f docs/edx_name_affirmation.rst rm -f docs/modules.rst @@ -70,19 +70,19 @@ commands = python setup.py check --restructuredtext --strict [testenv:quality] -deps = +deps = -r{toxinidir}/requirements/quality.txt -r{toxinidir}/requirements/test.txt -commands = +commands = pylint edx_name_affirmation pycodestyle edx_name_affirmation isort --check-only --diff edx_name_affirmation manage.py setup.py [testenv:pii_check] -setenv = +setenv = DJANGO_SETTINGS_MODULE = test_settings -deps = +deps = -r{toxinidir}/requirements/quality.txt -commands = +commands = code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage