Skip to content

Commit

Permalink
Merge pull request #2001 from openedx/update-simple-history-package-v…
Browse files Browse the repository at this point in the history
…ersion

feat: upgrading django-simple-history.
  • Loading branch information
UsamaSadiq authored Aug 8, 2023
2 parents 8145367 + e922688 commit 07abe19
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 39 deletions.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,17 @@ install-test: ## install requirements for tests

install: install-python install-js install-test static ## install all dependencies

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) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
# global common_constraints has this pin.
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
pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.20 on 2023-07-28 14:53

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('assessment', '0007_staff_workflow_blank'),
]

operations = [
migrations.AlterModelOptions(
name='historicalsharedfileupload',
options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical shared file upload', 'verbose_name_plural': 'historical shared file uploads'},
),
]
14 changes: 8 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ asgiref==3.7.2
# via django
bleach==6.0.0
# via -r requirements/base.in
boto3==1.28.18
boto3==1.28.21
# via -r requirements/base.in
botocore==1.31.18
botocore==1.31.21
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -51,8 +51,10 @@ django-model-utils==4.3.1
# via
# -r requirements/base.in
# edx-submissions
django-simple-history==3.3.0
# via -r requirements/base.in
django-simple-history==3.1.1
# via
# -c requirements/constraints.txt
# -r requirements/base.in
django-waffle==4.0.0
# via
# edx-django-utils
Expand All @@ -61,7 +63,7 @@ djangorestframework==3.14.0
# via
# -r requirements/base.in
# edx-submissions
edx-django-utils==5.6.0
edx-django-utils==5.7.0
# via
# -r requirements/base.in
# edx-toggles
Expand Down Expand Up @@ -190,7 +192,7 @@ webencodings==0.5.1
# html5lib
webob==1.8.7
# via xblock
xblock==1.6.2
xblock==1.7.0
# via -r requirements/base.in

# The following packages are considered to be unsafe in a requirements file:
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
3 changes: 3 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ path<13.2.0
# and tox comes in in test.in
importlib-metadata<2
setuptools<60.0

# incremental upgrade plan.
django-simple-history<=3.1.1
2 changes: 1 addition & 1 deletion requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tomli==2.0.1
# build
# pip-tools
# pyproject-hooks
wheel==0.41.0
wheel==0.41.1
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down
2 changes: 1 addition & 1 deletion requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
wheel==0.41.0
wheel==0.41.1
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
Expand Down
39 changes: 29 additions & 10 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ boto==2.49.0
# via
# -r requirements/test.txt
# moto
boto3==1.28.18
boto3==1.28.21
# via
# -r requirements/test.txt
# aws-sam-translator
# fs-s3fs
# moto
botocore==1.31.18
botocore==1.31.21
# via
# -r requirements/test.txt
# aws-xray-sdk
Expand Down Expand Up @@ -102,7 +102,7 @@ colorama==0.4.6
# via
# -r requirements/test.txt
# tox
cookiecutter==2.2.3
cookiecutter==2.3.0
# via
# -r requirements/test.txt
# xblock-sdk
Expand Down Expand Up @@ -154,8 +154,10 @@ django-model-utils==4.3.1
# via
# -r requirements/test.txt
# edx-submissions
django-simple-history==3.3.0
# via -r requirements/test.txt
django-simple-history==3.1.1
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
django-waffle==4.0.0
# via
# -r requirements/test.txt
Expand All @@ -174,7 +176,7 @@ ecdsa==0.18.0
# -r requirements/test.txt
# python-jose
# sshpubkeys
edx-django-utils==5.6.0
edx-django-utils==5.7.0
# via
# -r requirements/test.txt
# edx-toggles
Expand All @@ -194,7 +196,7 @@ exceptiongroup==1.1.2
# pytest
factory-boy==3.3.0
# via -r requirements/test.txt
faker==19.2.0
faker==19.3.0
# via
# -r requirements/test.txt
# factory-boy
Expand Down Expand Up @@ -226,7 +228,7 @@ idna==2.8
# -r requirements/test.txt
# moto
# requests
importlib-resources==6.0.0
importlib-resources==6.0.1
# via
# -r requirements/test.txt
# jsonschema
Expand Down Expand Up @@ -293,6 +295,10 @@ lxml==4.9.3
# -r requirements/test.txt
# xblock
# xblock-sdk
markdown-it-py==3.0.0
# via
# -r requirements/test.txt
# rich
markupsafe==2.1.3
# via
# -r requirements/test.txt
Expand All @@ -301,11 +307,15 @@ markupsafe==2.1.3
# xblock
mccabe==0.7.0
# via pylint
mdurl==0.1.2
# via
# -r requirements/test.txt
# markdown-it-py
mock==5.1.0
# via
# -r requirements/test.txt
# moto
more-itertools==10.0.0
more-itertools==10.1.0
# via -r requirements/test.txt
moto==1.3.14
# via
Expand Down Expand Up @@ -383,6 +393,10 @@ pydantic==1.10.12
# via
# -r requirements/test.txt
# aws-sam-translator
pygments==2.16.1
# via
# -r requirements/test.txt
# rich
pylint==2.17.5
# via
# edx-lint
Expand Down Expand Up @@ -484,6 +498,10 @@ responses==0.23.3
# via
# -r requirements/test.txt
# moto
rich==13.5.2
# via
# -r requirements/test.txt
# cookiecutter
rsa==4.9
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -563,6 +581,7 @@ typing-extensions==4.7.1
# faker
# pydantic
# pylint
# rich
urllib3==1.26.16
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -607,7 +626,7 @@ wrapt==1.11.2
# -r requirements/test.txt
# astroid
# aws-xray-sdk
xblock==1.6.2
xblock==1.7.0
# via
# -r requirements/test.txt
# xblock-sdk
Expand Down
39 changes: 29 additions & 10 deletions requirements/test-acceptance.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ boto==2.49.0
# via
# -r requirements/test.txt
# moto
boto3==1.28.18
boto3==1.28.21
# via
# -r requirements/test.txt
# aws-sam-translator
# fs-s3fs
# moto
botocore==1.31.18
botocore==1.31.21
# via
# -r requirements/test.txt
# aws-xray-sdk
Expand Down Expand Up @@ -95,7 +95,7 @@ colorama==0.4.6
# via
# -r requirements/test.txt
# tox
cookiecutter==2.2.3
cookiecutter==2.3.0
# via
# -r requirements/test.txt
# xblock-sdk
Expand Down Expand Up @@ -146,8 +146,10 @@ django-model-utils==4.3.1
# via
# -r requirements/test.txt
# edx-submissions
django-simple-history==3.3.0
# via -r requirements/test.txt
django-simple-history==3.1.1
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
django-waffle==4.0.0
# via
# -r requirements/test.txt
Expand All @@ -166,7 +168,7 @@ ecdsa==0.18.0
# -r requirements/test.txt
# python-jose
# sshpubkeys
edx-django-utils==5.6.0
edx-django-utils==5.7.0
# via
# -r requirements/test.txt
# edx-toggles
Expand All @@ -184,7 +186,7 @@ exceptiongroup==1.1.2
# pytest
factory-boy==3.3.0
# via -r requirements/test.txt
faker==19.2.0
faker==19.3.0
# via
# -r requirements/test.txt
# factory-boy
Expand Down Expand Up @@ -216,7 +218,7 @@ idna==2.8
# -r requirements/test.txt
# moto
# requests
importlib-resources==6.0.0
importlib-resources==6.0.1
# via
# -r requirements/test.txt
# jsonschema
Expand Down Expand Up @@ -281,17 +283,25 @@ lxml==4.9.3
# -r requirements/test.txt
# xblock
# xblock-sdk
markdown-it-py==3.0.0
# via
# -r requirements/test.txt
# rich
markupsafe==2.1.3
# via
# -r requirements/test.txt
# jinja2
# werkzeug
# xblock
mdurl==0.1.2
# via
# -r requirements/test.txt
# markdown-it-py
mock==5.1.0
# via
# -r requirements/test.txt
# moto
more-itertools==10.0.0
more-itertools==10.1.0
# via -r requirements/test.txt
moto==1.3.14
# via
Expand Down Expand Up @@ -366,6 +376,10 @@ pydantic==1.10.12
# via
# -r requirements/test.txt
# aws-sam-translator
pygments==2.16.1
# via
# -r requirements/test.txt
# rich
pyinstrument==4.5.1
# via -r requirements/test-acceptance.in
pymongo==3.13.0
Expand Down Expand Up @@ -456,6 +470,10 @@ responses==0.23.3
# via
# -r requirements/test.txt
# moto
rich==13.5.2
# via
# -r requirements/test.txt
# cookiecutter
rsa==4.9
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -533,6 +551,7 @@ typing-extensions==4.7.1
# aws-sam-translator
# faker
# pydantic
# rich
urllib3==1.26.16
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -577,7 +596,7 @@ wrapt==1.11.2
# -c requirements/constraints.txt
# -r requirements/test.txt
# aws-xray-sdk
xblock==1.6.2
xblock==1.7.0
# via
# -r requirements/test.txt
# xblock-sdk
Expand Down
Loading

0 comments on commit 07abe19

Please sign in to comment.