Skip to content

Commit

Permalink
chore: Upgrading django-simple-history. (#140)
Browse files Browse the repository at this point in the history
* chore: Upgrading django-simple-history.
* docs: bump release version to 2.3.6
---------

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
  • Loading branch information
awais786 and UsamaSadiq authored Aug 8, 2023
1 parent 803a1e0 commit aee13be
Show file tree
Hide file tree
Showing 18 changed files with 99 additions and 88 deletions.
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.6'

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'},
),
]
6 changes: 3 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ 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
Expand All @@ -71,9 +71,9 @@ 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==4.0.0
# via
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
2 changes: 1 addition & 1 deletion requirements/ci.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/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
25 changes: 2 additions & 23 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 @@ -181,10 +168,6 @@ py==1.11.0
# tox
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 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 @@ -309,7 +288,7 @@ tomlkit==0.12.1
# 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
6 changes: 3 additions & 3 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ 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
Expand All @@ -77,9 +77,9 @@ 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==4.0.0
# via
Expand Down
14 changes: 1 addition & 13 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,13 +30,11 @@ 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
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/quality.in
docutils==0.19
# via
Expand All @@ -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
Expand All @@ -84,8 +76,6 @@ platformdirs==3.10.0
# via pylint
pycodestyle==2.11.0
# via -r requirements/quality.in
pycparser==2.21
# via cffi
pydantic==1.10.12
# via rstcheck-core
pydocstyle==6.3.0
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ cryptography==41.0.2
ddt==1.6.0
# via -r requirements/test.in
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/base.txt
# django-config-models
# django-crum
Expand All @@ -97,9 +97,9 @@ django-model-utils==4.3.1
# via
# -r requirements/base.txt
# 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.txt
django-waffle==4.0.0
# via
Expand Down
4 changes: 4 additions & 0 deletions test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ def root(*args):
],
},
}]


# disable indexing on history_date
SIMPLE_HISTORY_DATE_INDEX = False
Loading

0 comments on commit aee13be

Please sign in to comment.