Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrading django-simple-history. #140

Merged
merged 3 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Change Log
Unreleased
~~~~~~~~~~

[2.3.6] - 2023-07-28
~~~~~~~~~~~~~~~~~~~~
* Upgrade django-simple-history. Added new migration. Fixed packages upgrade issues.

[2.3.5] - 2022-09-09
~~~~~~~~~~~~~~~~~~~~
* Fix bug that prevents a verified name from being updated if the user already has an approved verified name associated with a proctored exam attempt
Expand Down
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,31 @@ 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
$(PIP_COMPILE) -o requirements/doc.txt requirements/doc.in
$(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
Expand Down
2 changes: 1 addition & 1 deletion edx_name_affirmation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Django app housing name affirmation logic.
"""

__version__ = '2.3.5'
__version__ = '2.3.4'
UsamaSadiq marked this conversation as resolved.
Show resolved Hide resolved

default_app_config = 'edx_name_affirmation.apps.EdxNameAffirmationConfig' # pylint: disable=invalid-name
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.20 on 2023-07-28 13:57

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('edx_name_affirmation', '0007_historicalverifiedname'),
]

operations = [
migrations.AlterModelOptions(
name='historicalverifiedname',
options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical verified name', 'verbose_name_plural': 'historical verified names'},
),
]
13 changes: 7 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ cryptography==41.0.2
# via pyjwt
django==3.2.20
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/base.in
# django-config-models
# django-crum
# django-model-utils
# django-waffle
# djangorestframework
# drf-jwt
# drf-yasg
Expand All @@ -70,11 +71,11 @@ django-model-utils==4.3.1
# via
# -r requirements/base.in
# edx-celeryutils
django-simple-history==3.0.0
django-simple-history==3.1.1
# 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-waffle==3.0.0
django-waffle==4.0.0
# via
# edx-django-utils
# edx-drf-extensions
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion requirements/celery44.in

This file was deleted.

20 changes: 0 additions & 20 deletions requirements/celery44.txt

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion requirements/celery50.txt → requirements/celery53.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ backports-zoneinfo[tzdata]==0.2.1
billiard==4.1.0
# via celery
celery==5.3.1
# via -r requirements/celery50.in
# via -r requirements/celery53.in
click==8.1.6
# via
# celery
Expand Down
4 changes: 2 additions & 2 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ filelock==3.12.2
# virtualenv
packaging==23.1
# via tox
platformdirs==3.9.1
platformdirs==3.10.0
# via virtualenv
pluggy==1.2.0
# via tox
Expand All @@ -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/ci.in
# tox-battery
tox-battery==0.6.1
Expand Down
28 changes: 28 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

# 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
Django<4.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


# 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
5 changes: 4 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
# linking to it here is good.

# Common constraints for edx repos
-c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
-c common_constraints.txt

# pinning celery to latest release
celery<6.0

# incremental upgrade plan.
django-simple-history<=3.1.1
33 changes: 6 additions & 27 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -76,7 +68,7 @@ distlib==0.3.7
# virtualenv
django==3.2.20
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/quality.txt
# edx-i18n-tools
docutils==0.19
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -162,7 +149,7 @@ pkginfo==1.9.6
# via
# -r requirements/quality.txt
# twine
platformdirs==3.9.1
platformdirs==3.10.0
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
Expand All @@ -179,12 +166,8 @@ py==1.11.0
# via
# -r requirements/ci.txt
# tox
pycodestyle==2.10.0
pycodestyle==2.11.0
# via -r requirements/quality.txt
pycparser==2.21
# via
# -r requirements/quality.txt
# cffi
pydantic==1.10.12
# via
# -r requirements/quality.txt
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -303,13 +282,13 @@ tomli==2.0.1
# pylint
# pyproject-hooks
# tox
tomlkit==0.11.8
tomlkit==0.12.1
# via
# -r requirements/quality.txt
# pylint
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/ci.txt
# tox-battery
tox-battery==0.6.1
Expand Down
13 changes: 7 additions & 6 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ cryptography==41.0.2
# via pyjwt
django==3.2.20
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/base.in
# django-config-models
# django-crum
# django-model-utils
# django-waffle
# djangorestframework
# drf-jwt
# drf-yasg
Expand All @@ -76,11 +77,11 @@ django-model-utils==4.3.1
# via
# -r requirements/base.in
# edx-celeryutils
django-simple-history==3.0.0
django-simple-history==3.1.1
# 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-waffle==3.0.0
django-waffle==4.0.0
# via
# edx-django-utils
# edx-drf-extensions
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading