diff --git a/.travis.yml b/.travis.yml index 05928c5..83b23c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,28 @@ language: python python: - - 3.5 - - 3.8 + - '3.8' env: - - TOXENV=django22 - TOXENV=quality - TOXENV=docs - TOXENV=pii_check + - TOXENV=django22 + - TOXENV=django30 + - TOXENV=django31 cache: -- pip + - pip install: -- pip install -r requirements/travis.txt + - pip install -r requirements/travis.txt script: -- tox + - tox after_success: -- codecov + - codecov deploy: provider: pypi user: edx distributions: sdist bdist_wheel on: tags: true - python: 3.5 - condition: "$TOXENV = quality" + python: 3.8 + condition: $TOXENV = quality password: secure: rh1C0D29KRN7O7CFFNajMnlSeIhbuArdF4VKLsPjR+GlfoSjKur0j2CdJGd0znr5vlNAQFgSHMLwGWhCrIFSTu6HUFT8PJhfVZ2M7IFDMwleq2k1aLYyk54ZVtZfVuy50c1uaS1CjTGJ55kccNYPrMf+CQCi/DZRe1MeogX3D1C7OtksyneRjPtIdz+l2jiqcwrrwDAJgOqSwONmgc1gI7HWHd4xLZinu/JeTLkYh3gTUBVBqv52reNbO3J4PUu+tFX37FTZnEebC5dLJyHFPJ89Fqz3gJDXwcUDcvtWhnWKjt9Hi+Xa8UvycdUygPuFMPfq8U2sLHX1L61WIODimpj66qGVgSK2B1vltqfvAFq5FS9g7ivzG3K6ANq4c/csouJv8ib6/J7J/G4ubsqgcFtBM3ag+T+dTTx8cNBskK2JhX6UMARh+zPkTTWpepqla30axMT9jTZ0O8PqgzbrtvWMxBssfbUpmu2WjpdL8KA8YFsEksY42gN+sFxNp45m31ABsIiaWc38GrHYibWt2BT/PThXroysQygwq38jQX6jIGnq6BPFY22XdTtll9xPTyKAcBQPOMNdhaBQME9h1QbNuyCFLgmsBfzrSIMA6pZGdthiwB/L3Jj11NNatf/bL0LnjpzIRywecLOeIvUo3agnIoTVymyLu/2zUZqWd7E= diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 766ef7c..b7b7666 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,10 @@ Change Log Unreleased ~~~~~~~~~~ +[2.0.0] - 2021-01-19 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Dropped python3.5 support. + [1.3.2] - 2021-01-15 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/conf.py b/docs/conf.py index ee93c32..f27e24c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # pylint: disable=invalid-name """ edx-when documentation build configuration file. @@ -30,7 +29,7 @@ def get_version(*file_paths): Extract the version string from the file at the given relative path fragments. """ filename = os.path.join(os.path.dirname(__file__), *file_paths) - version_file = io.open(filename).read() + version_file = open(filename).read() version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) if version_match: return version_match.group(1) @@ -98,7 +97,7 @@ def get_version(*file_paths): copyright = edx_theme.COPYRIGHT # pylint: disable=redefined-builtin author = edx_theme.AUTHOR project_title = 'Schedule' -documentation_title = "{project_title}".format(project_title=project_title) +documentation_title = f"{project_title}" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -281,7 +280,7 @@ def get_version(*file_paths): # html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. -htmlhelp_basename = '{project_name}doc'.format(project_name=project) +htmlhelp_basename = f'{project}doc' # -- Options for LaTeX output --------------------------------------------- @@ -306,7 +305,7 @@ def get_version(*file_paths): # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). -latex_target = '{project}.tex'.format(project=project) +latex_target = f'{project}.tex' latex_documents = [ (master_doc, latex_target, documentation_title, author, 'manual'), diff --git a/edx_when/__init__.py b/edx_when/__init__.py index 57b90b4..1fd05f3 100644 --- a/edx_when/__init__.py +++ b/edx_when/__init__.py @@ -2,6 +2,6 @@ Your project description goes here. """ -__version__ = '1.3.2' +__version__ = '2.0.0' default_app_config = 'edx_when.apps.EdxWhenConfig' # pylint: disable=invalid-name diff --git a/edx_when/api.py b/edx_when/api.py index e769794..7dd25e1 100644 --- a/edx_when/api.py +++ b/edx_when/api.py @@ -34,7 +34,7 @@ def _content_dates_cache_key(course_key, query_dict): for key, value in query_dict.items() ) ) - return "edx-when.content_dates:{}:{}".format(course_key, query_dict_str) + return f"edx-when.content_dates:{course_key}:{query_dict_str}" def _ensure_key(key_class, key_obj): @@ -325,9 +325,9 @@ def set_date_for_block(course_id, block_id, field, date_or_timedelta, user=None, ) needs_save = not existing_date.active existing_date.active = True - except models.ContentDate.DoesNotExist: + except models.ContentDate.DoesNotExist as error: if user: - raise MissingDateError(block_id) + raise MissingDateError(block_id) from error existing_date = models.ContentDate(course_id=course_id, location=block_id, field=field) # We had race-conditions create multiple DatePolicies w/ the same values. Handle that case. @@ -351,8 +351,8 @@ def set_date_for_block(course_id, block_id, field, date_or_timedelta, user=None, ) try: userd.full_clean() - except ValidationError: - raise InvalidDateError(userd.actual_date) + except ValidationError as error: + raise InvalidDateError(userd.actual_date) from error userd.save() log.info('Saved override for user=%d loc=%s date=%s', userd.user_id, userd.location, userd.actual_date) else: diff --git a/edx_when/apps.py b/edx_when/apps.py index b76997a..9c37de4 100644 --- a/edx_when/apps.py +++ b/edx_when/apps.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ edx_when Django application initialization. """ @@ -16,9 +15,9 @@ class EdxWhenConfig(AppConfig): plugin_app = { 'url_config': { 'lms.djangoapp': { - 'namespace': u'edx_when', - 'regex': u'^api/', - 'relative_path': u'urls', + 'namespace': 'edx_when', + 'regex': '^api/', + 'relative_path': 'urls', }, } } diff --git a/edx_when/field_data.py b/edx_when/field_data.py index 32a0cce..9644f82 100644 --- a/edx_when/field_data.py +++ b/edx_when/field_data.py @@ -11,7 +11,7 @@ from xmodule.modulestore.inheritance import InheritanceMixin INHERITABLE_FIELDS = set(InheritanceMixin.fields.keys()) except ImportError: - INHERITABLE_FIELDS = set(('due', 'start', 'end')) + INHERITABLE_FIELDS = {'due', 'start', 'end'} log = logging.getLogger(__name__) @@ -44,7 +44,7 @@ def __init__(self, defaults, course_id=None, user=None, use_cached=True): course_id: CourseKey for course user: User object to look for date overrides """ - super(DateLookupFieldData, self).__init__() + super().__init__() if isinstance(defaults, DateLookupFieldData): defaults = defaults._defaults self._defaults = defaults diff --git a/edx_when/migrations/0001_initial.py b/edx_when/migrations/0001_initial.py index 5428a9a..52ca62d 100644 --- a/edx_when/migrations/0001_initial.py +++ b/edx_when/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-11 09:43 @@ -63,6 +62,6 @@ class Migration(migrations.Migration): ), migrations.AlterUniqueTogether( name='contentdate', - unique_together=set([('policy', 'location')]), + unique_together={('policy', 'location')}, ), ] diff --git a/edx_when/migrations/0002_auto_20190318_1736.py b/edx_when/migrations/0002_auto_20190318_1736.py index cc9fff4..d7c2c13 100644 --- a/edx_when/migrations/0002_auto_20190318_1736.py +++ b/edx_when/migrations/0002_auto_20190318_1736.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-18 17:36 @@ -46,6 +45,6 @@ class Migration(migrations.Migration): ), migrations.AlterUniqueTogether( name='contentdate', - unique_together=set([('policy', 'location', 'field')]), + unique_together={('policy', 'location', 'field')}, ), ] diff --git a/edx_when/migrations/0003_auto_20190402_1501.py b/edx_when/migrations/0003_auto_20190402_1501.py index 9b5486b..1d5305d 100644 --- a/edx_when/migrations/0003_auto_20190402_1501.py +++ b/edx_when/migrations/0003_auto_20190402_1501.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-02 15:01 diff --git a/edx_when/migrations/0004_datepolicy_rel_date.py b/edx_when/migrations/0004_datepolicy_rel_date.py index 94ade06..33ea4c5 100644 --- a/edx_when/migrations/0004_datepolicy_rel_date.py +++ b/edx_when/migrations/0004_datepolicy_rel_date.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-09-11 09:06 diff --git a/edx_when/migrations/0005_auto_20190911_1056.py b/edx_when/migrations/0005_auto_20190911_1056.py index 058b230..323ae5b 100644 --- a/edx_when/migrations/0005_auto_20190911_1056.py +++ b/edx_when/migrations/0005_auto_20190911_1056.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-09-11 10:56 diff --git a/edx_when/migrations/0006_drop_active_index.py b/edx_when/migrations/0006_drop_active_index.py index c966058..73a1936 100644 --- a/edx_when/migrations/0006_drop_active_index.py +++ b/edx_when/migrations/0006_drop_active_index.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2020-03-30 18:39 diff --git a/edx_when/models.py b/edx_when/models.py index d96eee0..01a1761 100644 --- a/edx_when/models.py +++ b/edx_when/models.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Database models for edx_when. """ @@ -108,7 +107,7 @@ def __str__(self): Get a string representation of this model instance. """ # Location already holds course id - return '{}, {}'.format(self.location, self.field) + return f'{self.location}, {self.field}' def schedule_for_user(self, user): """ @@ -189,4 +188,4 @@ def __str__(self): """ # Location already holds course id # pylint: disable=no-member - return '{}, {}, {}'.format(self.user.username, self.content_date.location, self.content_date.field) + return f'{self.user.username}, {self.content_date.location}, {self.content_date.field}' diff --git a/edx_when/urls.py b/edx_when/urls.py index 44a9349..3bfd6fa 100644 --- a/edx_when/urls.py +++ b/edx_when/urls.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ URLs for edx_when. """ diff --git a/manage.py b/manage.py index 70364d0..e1d35a4 100755 --- a/manage.py +++ b/manage.py @@ -19,11 +19,11 @@ # exceptions on Python 2. try: import django # pylint: disable=unused-import - except ImportError: + except ImportError as error: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" - ) + ) from error raise execute_from_command_line(sys.argv) diff --git a/requirements/base.txt b/requirements/base.txt index 4f2e4cf..1fc5414 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -5,45 +5,45 @@ # make upgrade # appdirs==1.4.4 # via fs -certifi==2020.6.20 # via requests -cffi==1.14.0 # via cryptography -chardet==3.0.4 # via requests -cryptography==2.9.2 # via pyjwt -django-model-utils==4.0.0 # via -r requirements/base.in -django-waffle==1.0.0 # via edx-django-utils, edx-drf-extensions -django==2.2.14 # via -c requirements/constraints.txt, -r requirements/base.in, django-model-utils, djangorestframework, drf-jwt, edx-django-utils, edx-drf-extensions, rest-condition -djangorestframework==3.11.0 # via drf-jwt, edx-drf-extensions, rest-condition -drf-jwt==1.16.2 # via edx-drf-extensions -edx-django-utils==3.2.3 # via -r requirements/base.in, edx-drf-extensions -edx-drf-extensions==6.1.0 # via -r requirements/base.in +certifi==2020.12.5 # via requests +cffi==1.14.4 # via cryptography +chardet==4.0.0 # via requests +cryptography==3.3.1 # via pyjwt +django-crum==0.7.9 # via edx-django-utils +django-model-utils==4.1.1 # via -r requirements/base.in +django-waffle==2.0.0 # via edx-django-utils, edx-drf-extensions +django==2.2.17 # via -c requirements/constraints.txt, -r requirements/base.in, django-crum, django-model-utils, djangorestframework, drf-jwt, edx-django-utils, edx-drf-extensions, rest-condition +djangorestframework==3.12.2 # via drf-jwt, edx-drf-extensions, rest-condition +drf-jwt==1.17.3 # via edx-drf-extensions +edx-django-utils==3.13.0 # via -r requirements/base.in, edx-drf-extensions +edx-drf-extensions==6.2.0 # via -r requirements/base.in edx-opaque-keys==2.1.1 # via -r requirements/base.in, edx-drf-extensions fs==2.4.11 # via xblock future==0.18.2 # via pyjwkest idna==2.10 # via requests -lxml==4.5.2 # via xblock +lxml==4.6.2 # via xblock markupsafe==1.1.1 # via xblock -newrelic==5.14.1.144 # via edx-django-utils -pbr==5.4.5 # via stevedore -psutil==1.2.1 # via edx-django-utils +newrelic==5.24.0.153 # via edx-django-utils +pbr==5.5.1 # via stevedore +psutil==5.8.0 # via edx-django-utils pycparser==2.20 # via cffi -pycryptodomex==3.9.8 # via pyjwkest +pycryptodomex==3.9.9 # via pyjwkest pyjwkest==1.4.2 # via edx-drf-extensions pyjwt[crypto]==1.7.1 # via drf-jwt -pymongo==3.10.1 # via edx-opaque-keys +pymongo==3.11.2 # via edx-opaque-keys python-dateutil==2.8.1 # via edx-drf-extensions, xblock -pytz==2020.1 # via django, fs, xblock +pytz==2020.4 # via django, fs, xblock pyyaml==5.3.1 # via xblock -requests==2.24.0 # via edx-drf-extensions, pyjwkest +requests==2.25.1 # via edx-drf-extensions, pyjwkest rest-condition==1.0.3 # via edx-drf-extensions semantic-version==2.8.5 # via edx-drf-extensions -six==1.15.0 # via cryptography, edx-drf-extensions, edx-opaque-keys, fs, pyjwkest, python-dateutil, stevedore, xblock -sqlparse==0.3.1 # via django -stevedore==1.32.0 # via edx-opaque-keys -typing==3.7.4.3 # via fs -urllib3==1.25.9 # via requests +six==1.15.0 # via cryptography, edx-drf-extensions, edx-opaque-keys, fs, pyjwkest, python-dateutil, xblock +sqlparse==0.4.1 # via django +stevedore==3.3.0 # via edx-django-utils, edx-opaque-keys +urllib3==1.26.2 # via requests web-fragments==0.3.2 # via xblock webob==1.8.6 # via xblock -xblock==1.3.1 # via -r requirements/base.in +xblock==1.4.0 # via -r requirements/base.in # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/dev.txt b/requirements/dev.txt index d244bac..cddc155 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -5,97 +5,93 @@ # make upgrade # appdirs==1.4.4 # via -r requirements/quality.txt, -r requirements/travis.txt, fs, virtualenv -astroid==2.3.3 # via -r requirements/quality.txt, pylint, pylint-celery -attrs==19.3.0 # via -r requirements/quality.txt, pytest -certifi==2020.6.20 # via -r requirements/quality.txt, -r requirements/travis.txt, requests -cffi==1.14.0 # via -r requirements/quality.txt, cryptography -chardet==3.0.4 # via -r requirements/quality.txt, -r requirements/travis.txt, requests +astroid==2.4.2 # via -r requirements/quality.txt, pylint, pylint-celery +attrs==20.3.0 # via -r requirements/quality.txt, pytest +certifi==2020.12.5 # via -r requirements/quality.txt, -r requirements/travis.txt, requests +cffi==1.14.4 # via -r requirements/quality.txt, cryptography +chardet==4.0.0 # via -r requirements/quality.txt, -r requirements/travis.txt, requests click-log==0.3.2 # via -r requirements/quality.txt, edx-lint click==7.1.2 # via -r requirements/pip-tools.txt, -r requirements/quality.txt, click-log, code-annotations, edx-lint, pip-tools -code-annotations==0.3.4 # via -r requirements/quality.txt -codecov==2.1.8 # via -r requirements/travis.txt -coverage==5.2 # via -r requirements/quality.txt, -r requirements/travis.txt, codecov, pytest-cov -cryptography==2.9.2 # via -r requirements/quality.txt, pyjwt +code-annotations==0.10.2 # via -r requirements/quality.txt +codecov==2.1.11 # via -r requirements/travis.txt +coverage==5.3.1 # via -r requirements/quality.txt, -r requirements/travis.txt, codecov, pytest-cov +cryptography==3.3.1 # via -r requirements/quality.txt, pyjwt ddt==1.4.1 # via -r requirements/quality.txt -diff-cover==3.0.1 # via -r requirements/dev.in +diff-cover==4.0.1 # via -r requirements/dev.in distlib==0.3.1 # via -r requirements/travis.txt, virtualenv -django-model-utils==4.0.0 # via -r requirements/quality.txt -django-waffle==1.0.0 # via -r requirements/quality.txt, edx-django-utils, edx-drf-extensions -django==2.2.14 # via -c requirements/constraints.txt, -r requirements/quality.txt, code-annotations, django-model-utils, djangorestframework, drf-jwt, edx-django-utils, edx-drf-extensions, edx-i18n-tools, rest-condition -djangorestframework==3.11.0 # via -r requirements/quality.txt, drf-jwt, edx-drf-extensions, rest-condition -drf-jwt==1.16.2 # via -r requirements/quality.txt, edx-drf-extensions -edx-django-utils==3.2.3 # via -r requirements/quality.txt, edx-drf-extensions -edx-drf-extensions==6.1.0 # via -r requirements/quality.txt +django-crum==0.7.9 # via -r requirements/quality.txt, edx-django-utils +django-model-utils==4.1.1 # via -r requirements/quality.txt +django-waffle==2.0.0 # via -r requirements/quality.txt, edx-django-utils, edx-drf-extensions +django==2.2.17 # via -c requirements/constraints.txt, -r requirements/quality.txt, code-annotations, django-crum, django-model-utils, djangorestframework, drf-jwt, edx-django-utils, edx-drf-extensions, edx-i18n-tools, rest-condition +djangorestframework==3.12.2 # via -r requirements/quality.txt, drf-jwt, edx-drf-extensions, rest-condition +drf-jwt==1.17.3 # via -r requirements/quality.txt, edx-drf-extensions +edx-django-utils==3.13.0 # via -r requirements/quality.txt, edx-drf-extensions +edx-drf-extensions==6.2.0 # via -r requirements/quality.txt edx-i18n-tools==0.5.3 # via -r requirements/dev.in -edx-lint==1.5.0 # via -r requirements/quality.txt +edx-lint==1.6 # via -r requirements/quality.txt edx-opaque-keys==2.1.1 # via -r requirements/quality.txt, edx-drf-extensions filelock==3.0.12 # via -r requirements/travis.txt, tox, virtualenv fs==2.4.11 # via -r requirements/quality.txt, xblock future==0.18.2 # via -r requirements/quality.txt, pyjwkest idna==2.10 # via -r requirements/quality.txt, -r requirements/travis.txt, requests -importlib-metadata==1.7.0 # via -r requirements/quality.txt, -r requirements/travis.txt, path.py, pluggy, pytest, tox, virtualenv -importlib-resources==3.0.0 # via -r requirements/travis.txt, virtualenv -inflect==3.0.2 # via jinja2-pluralize -isort==4.3.21 # via -r requirements/quality.txt, pylint +importlib-metadata==3.3.0 # via path.py +inflect==5.0.2 # via jinja2-pluralize +iniconfig==1.1.1 # via -r requirements/quality.txt, pytest +isort==5.6.4 # via -r requirements/quality.txt, pylint jinja2-pluralize==0.3.0 # via diff-cover jinja2==2.11.2 # via -r requirements/quality.txt, code-annotations, diff-cover, jinja2-pluralize lazy-object-proxy==1.4.3 # via -r requirements/quality.txt, astroid -lxml==4.5.2 # via -r requirements/quality.txt, xblock +lxml==4.6.2 # via -r requirements/quality.txt, xblock markupsafe==1.1.1 # via -r requirements/quality.txt, jinja2, xblock mccabe==0.6.1 # via -r requirements/quality.txt, pylint mock==3.0.5 # via -c requirements/constraints.txt, -r requirements/quality.txt -more-itertools==8.4.0 # via -r requirements/quality.txt, pytest -newrelic==5.14.1.144 # via -r requirements/quality.txt, edx-django-utils -packaging==20.4 # via -r requirements/quality.txt, -r requirements/travis.txt, pytest, tox +newrelic==5.24.0.153 # via -r requirements/quality.txt, edx-django-utils +packaging==20.8 # via -r requirements/quality.txt, -r requirements/travis.txt, pytest, tox path.py==11.5.0 # via -r requirements/dev.in, edx-i18n-tools -pathlib2==2.3.5 # via -r requirements/quality.txt, pytest -pbr==5.4.5 # via -r requirements/quality.txt, stevedore -pip-tools==5.2.1 # via -r requirements/pip-tools.txt +pbr==5.5.1 # via -r requirements/quality.txt, stevedore +pip-tools==5.4.0 # via -r requirements/pip-tools.txt pluggy==0.13.1 # via -r requirements/quality.txt, -r requirements/travis.txt, diff-cover, pytest, tox polib==1.1.0 # via edx-i18n-tools -psutil==1.2.1 # via -r requirements/quality.txt, edx-django-utils -py==1.9.0 # via -r requirements/quality.txt, -r requirements/travis.txt, pytest, tox +psutil==5.8.0 # via -r requirements/quality.txt, edx-django-utils +py==1.10.0 # via -r requirements/quality.txt, -r requirements/travis.txt, pytest, tox pycodestyle==2.6.0 # via -r requirements/quality.txt pycparser==2.20 # via -r requirements/quality.txt, cffi -pycryptodomex==3.9.8 # via -r requirements/quality.txt, pyjwkest -pydocstyle==5.0.2 # via -r requirements/quality.txt -pygments==2.6.1 # via diff-cover +pycryptodomex==3.9.9 # via -r requirements/quality.txt, pyjwkest +pydocstyle==5.1.1 # via -r requirements/quality.txt +pygments==2.7.3 # via diff-cover pyjwkest==1.4.2 # via -r requirements/quality.txt, edx-drf-extensions pyjwt[crypto]==1.7.1 # via -r requirements/quality.txt, drf-jwt pylint-celery==0.3 # via -r requirements/quality.txt, edx-lint -pylint-django==2.0.11 # via -r requirements/quality.txt, edx-lint +pylint-django==2.3.0 # via -r requirements/quality.txt, edx-lint pylint-plugin-utils==0.6 # via -r requirements/quality.txt, pylint-celery, pylint-django -pylint==2.4.4 # via -r requirements/quality.txt, edx-lint, pylint-celery, pylint-django, pylint-plugin-utils -pymongo==3.10.1 # via -r requirements/quality.txt, edx-opaque-keys +pylint==2.6.0 # via -r requirements/quality.txt, edx-lint, pylint-celery, pylint-django, pylint-plugin-utils +pymongo==3.11.2 # via -r requirements/quality.txt, edx-opaque-keys pyparsing==2.4.7 # via -r requirements/quality.txt, -r requirements/travis.txt, packaging -pytest-cov==2.10.0 # via -r requirements/quality.txt -pytest-django==3.9.0 # via -r requirements/quality.txt -pytest==5.4.3 # via -r requirements/quality.txt, pytest-cov, pytest-django +pytest-cov==2.10.1 # via -r requirements/quality.txt +pytest-django==4.1.0 # via -r requirements/quality.txt +pytest==6.2.1 # via -r requirements/quality.txt, pytest-cov, pytest-django python-dateutil==2.8.1 # via -r requirements/quality.txt, edx-drf-extensions, xblock python-slugify==4.0.1 # via -r requirements/quality.txt, code-annotations -pytz==2020.1 # via -r requirements/quality.txt, django, fs, xblock +pytz==2020.4 # via -r requirements/quality.txt, django, fs, xblock pyyaml==5.3.1 # via -r requirements/quality.txt, code-annotations, edx-i18n-tools, xblock -requests==2.24.0 # via -r requirements/quality.txt, -r requirements/travis.txt, codecov, edx-drf-extensions, pyjwkest +requests==2.25.1 # via -r requirements/quality.txt, -r requirements/travis.txt, codecov, edx-drf-extensions, pyjwkest rest-condition==1.0.3 # via -r requirements/quality.txt, edx-drf-extensions semantic-version==2.8.5 # via -r requirements/quality.txt, edx-drf-extensions -six==1.15.0 # via -r requirements/pip-tools.txt, -r requirements/quality.txt, -r requirements/travis.txt, astroid, cryptography, diff-cover, edx-drf-extensions, edx-i18n-tools, edx-lint, edx-opaque-keys, fs, mock, packaging, pathlib2, pip-tools, pyjwkest, python-dateutil, stevedore, tox, virtualenv, xblock +six==1.15.0 # via -r requirements/pip-tools.txt, -r requirements/quality.txt, -r requirements/travis.txt, astroid, cryptography, edx-drf-extensions, edx-i18n-tools, edx-lint, edx-opaque-keys, fs, mock, pip-tools, pyjwkest, python-dateutil, tox, virtualenv, xblock snowballstemmer==2.0.0 # via -r requirements/quality.txt, pydocstyle -sqlparse==0.3.1 # via -r requirements/quality.txt, django -stevedore==1.32.0 # via -r requirements/quality.txt, code-annotations, edx-opaque-keys +sqlparse==0.4.1 # via -r requirements/quality.txt, django +stevedore==3.3.0 # via -r requirements/quality.txt, code-annotations, edx-django-utils, edx-opaque-keys text-unidecode==1.3 # via -r requirements/quality.txt, python-slugify -toml==0.10.1 # via -r requirements/travis.txt, tox +toml==0.10.2 # via -r requirements/quality.txt, -r requirements/travis.txt, pylint, pytest, tox tox-battery==0.6.1 # via -r requirements/travis.txt -tox==3.17.1 # via -r requirements/travis.txt, tox-battery -typed-ast==1.4.1 # via -r requirements/quality.txt, astroid -typing==3.7.4.3 # via -r requirements/quality.txt, fs -urllib3==1.25.9 # via -r requirements/quality.txt, -r requirements/travis.txt, requests -virtualenv==20.0.27 # via -r requirements/travis.txt, tox -wcwidth==0.2.5 # via -r requirements/quality.txt, pytest +tox==3.20.1 # via -r requirements/travis.txt, tox-battery +urllib3==1.26.2 # via -r requirements/quality.txt, -r requirements/travis.txt, requests +virtualenv==20.2.2 # via -r requirements/travis.txt, tox web-fragments==0.3.2 # via -r requirements/quality.txt, xblock webob==1.8.6 # via -r requirements/quality.txt, xblock -wrapt==1.11.2 # via -r requirements/quality.txt, astroid -xblock==1.3.1 # via -r requirements/quality.txt -zipp==1.2.0 # via -c requirements/constraints.txt, -r requirements/quality.txt, -r requirements/travis.txt, importlib-metadata, importlib-resources +wrapt==1.12.1 # via -r requirements/quality.txt, astroid +xblock==1.4.0 # via -r requirements/quality.txt +zipp==1.2.0 # via -c requirements/constraints.txt, importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/doc.txt b/requirements/doc.txt index ca78252..07a75d8 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -6,79 +6,77 @@ # alabaster==0.7.12 # via sphinx appdirs==1.4.4 # via -r requirements/test.txt, fs -attrs==19.3.0 # via -r requirements/test.txt, pytest -babel==2.8.0 # via sphinx -bleach==3.1.5 # via readme-renderer -certifi==2020.6.20 # via -r requirements/test.txt, requests -cffi==1.14.0 # via -r requirements/test.txt, cryptography -chardet==3.0.4 # via -r requirements/test.txt, doc8, requests +attrs==20.3.0 # via -r requirements/test.txt, pytest +babel==2.9.0 # via sphinx +bleach==3.2.1 # via readme-renderer +certifi==2020.12.5 # via -r requirements/test.txt, requests +cffi==1.14.4 # via -r requirements/test.txt, cryptography +chardet==4.0.0 # via -r requirements/test.txt, doc8, requests click==7.1.2 # via -r requirements/test.txt, code-annotations -code-annotations==0.3.4 # via -r requirements/test.txt -coverage==5.2 # via -r requirements/test.txt, pytest-cov -cryptography==2.9.2 # via -r requirements/test.txt, pyjwt +code-annotations==0.10.2 # via -r requirements/test.txt +coverage==5.3.1 # via -r requirements/test.txt, pytest-cov +cryptography==3.3.1 # via -r requirements/test.txt, pyjwt ddt==1.4.1 # via -r requirements/test.txt -django-model-utils==4.0.0 # via -r requirements/test.txt -django-waffle==1.0.0 # via -r requirements/test.txt, edx-django-utils, edx-drf-extensions -django==2.2.14 # via -c requirements/constraints.txt, -r requirements/test.txt, code-annotations, django-model-utils, djangorestframework, drf-jwt, edx-django-utils, edx-drf-extensions, rest-condition -djangorestframework==3.11.0 # via -r requirements/test.txt, drf-jwt, edx-drf-extensions, rest-condition +django-crum==0.7.9 # via -r requirements/test.txt, edx-django-utils +django-model-utils==4.1.1 # via -r requirements/test.txt +django-waffle==2.0.0 # via -r requirements/test.txt, edx-django-utils, edx-drf-extensions +django==2.2.17 # via -c requirements/constraints.txt, -r requirements/test.txt, code-annotations, django-crum, django-model-utils, djangorestframework, drf-jwt, edx-django-utils, edx-drf-extensions, rest-condition +djangorestframework==3.12.2 # via -r requirements/test.txt, drf-jwt, edx-drf-extensions, rest-condition doc8==0.8.1 # via -r requirements/doc.in docutils==0.16 # via doc8, readme-renderer, restructuredtext-lint, sphinx -drf-jwt==1.16.2 # via -r requirements/test.txt, edx-drf-extensions -edx-django-utils==3.2.3 # via -r requirements/test.txt, edx-drf-extensions -edx-drf-extensions==6.1.0 # via -r requirements/test.txt +drf-jwt==1.17.3 # via -r requirements/test.txt, edx-drf-extensions +edx-django-utils==3.13.0 # via -r requirements/test.txt, edx-drf-extensions +edx-drf-extensions==6.2.0 # via -r requirements/test.txt edx-opaque-keys==2.1.1 # via -r requirements/test.txt, edx-drf-extensions -edx-sphinx-theme==1.5.0 # via -r requirements/doc.in +edx-sphinx-theme==1.6.0 # via -r requirements/doc.in fs==2.4.11 # via -r requirements/test.txt, xblock future==0.18.2 # via -r requirements/test.txt, pyjwkest idna==2.10 # via -r requirements/test.txt, requests imagesize==1.2.0 # via sphinx -importlib-metadata==1.7.0 # via -r requirements/test.txt, pluggy, pytest +iniconfig==1.1.1 # via -r requirements/test.txt, pytest jinja2==2.11.2 # via -r requirements/test.txt, code-annotations, sphinx -lxml==4.5.2 # via -r requirements/test.txt, xblock +lxml==4.6.2 # via -r requirements/test.txt, xblock markupsafe==1.1.1 # via -r requirements/test.txt, jinja2, xblock mock==3.0.5 # via -c requirements/constraints.txt, -r requirements/test.txt -more-itertools==8.4.0 # via -r requirements/test.txt, pytest -newrelic==5.14.1.144 # via -r requirements/test.txt, edx-django-utils -packaging==20.4 # via -r requirements/test.txt, bleach, pytest, sphinx -pathlib2==2.3.5 # via -r requirements/test.txt, pytest -pbr==5.4.5 # via -r requirements/test.txt, stevedore +newrelic==5.24.0.153 # via -r requirements/test.txt, edx-django-utils +packaging==20.8 # via -r requirements/test.txt, bleach, pytest, sphinx +pbr==5.5.1 # via -r requirements/test.txt, stevedore pluggy==0.13.1 # via -r requirements/test.txt, pytest -psutil==1.2.1 # via -r requirements/test.txt, edx-django-utils -py==1.9.0 # via -r requirements/test.txt, pytest +psutil==5.8.0 # via -r requirements/test.txt, edx-django-utils +py==1.10.0 # via -r requirements/test.txt, pytest pycparser==2.20 # via -r requirements/test.txt, cffi -pycryptodomex==3.9.8 # via -r requirements/test.txt, pyjwkest -pygments==2.6.1 # via doc8, readme-renderer, sphinx +pycryptodomex==3.9.9 # via -r requirements/test.txt, pyjwkest +pygments==2.7.3 # via doc8, readme-renderer, sphinx pyjwkest==1.4.2 # via -r requirements/test.txt, edx-drf-extensions pyjwt[crypto]==1.7.1 # via -r requirements/test.txt, drf-jwt -pymongo==3.10.1 # via -r requirements/test.txt, edx-opaque-keys +pymongo==3.11.2 # via -r requirements/test.txt, edx-opaque-keys pyparsing==2.4.7 # via -r requirements/test.txt, packaging -pytest-cov==2.10.0 # via -r requirements/test.txt -pytest-django==3.9.0 # via -r requirements/test.txt -pytest==5.4.3 # via -r requirements/test.txt, pytest-cov, pytest-django +pytest-cov==2.10.1 # via -r requirements/test.txt +pytest-django==4.1.0 # via -r requirements/test.txt +pytest==6.2.1 # via -r requirements/test.txt, pytest-cov, pytest-django python-dateutil==2.8.1 # via -r requirements/test.txt, edx-drf-extensions, xblock python-slugify==4.0.1 # via -r requirements/test.txt, code-annotations -pytz==2020.1 # via -r requirements/test.txt, babel, django, fs, xblock +pytz==2020.4 # via -r requirements/test.txt, babel, django, fs, xblock pyyaml==5.3.1 # via -r requirements/test.txt, code-annotations, xblock -readme-renderer==26.0 # via -r requirements/doc.in -requests==2.24.0 # via -r requirements/test.txt, edx-drf-extensions, pyjwkest, sphinx +readme-renderer==28.0 # via -r requirements/doc.in +requests==2.25.1 # via -r requirements/test.txt, edx-drf-extensions, pyjwkest, sphinx rest-condition==1.0.3 # via -r requirements/test.txt, edx-drf-extensions -restructuredtext-lint==1.3.1 # via doc8 +restructuredtext-lint==1.3.2 # via doc8 semantic-version==2.8.5 # via -r requirements/test.txt, edx-drf-extensions -six==1.15.0 # via -r requirements/test.txt, bleach, cryptography, doc8, edx-drf-extensions, edx-opaque-keys, edx-sphinx-theme, fs, mock, packaging, pathlib2, pyjwkest, python-dateutil, readme-renderer, sphinx, stevedore, xblock +six==1.15.0 # via -r requirements/test.txt, bleach, cryptography, doc8, edx-drf-extensions, edx-opaque-keys, edx-sphinx-theme, fs, mock, pyjwkest, python-dateutil, readme-renderer, sphinx, xblock snowballstemmer==2.0.0 # via sphinx sphinx==1.8.5 # via -r requirements/doc.in, edx-sphinx-theme -sphinxcontrib-websupport==1.2.3 # via sphinx -sqlparse==0.3.1 # via -r requirements/test.txt, django -stevedore==1.32.0 # via -r requirements/test.txt, code-annotations, doc8, edx-opaque-keys +sphinxcontrib-serializinghtml==1.1.4 # via sphinxcontrib-websupport +sphinxcontrib-websupport==1.2.4 # via sphinx +sqlparse==0.4.1 # via -r requirements/test.txt, django +stevedore==3.3.0 # via -r requirements/test.txt, code-annotations, doc8, edx-django-utils, edx-opaque-keys text-unidecode==1.3 # via -r requirements/test.txt, python-slugify -typing==3.7.4.3 # via -r requirements/test.txt, fs -urllib3==1.25.9 # via -r requirements/test.txt, requests -wcwidth==0.2.5 # via -r requirements/test.txt, pytest +toml==0.10.2 # via -r requirements/test.txt, pytest +urllib3==1.26.2 # via -r requirements/test.txt, requests web-fragments==0.3.2 # via -r requirements/test.txt, xblock webencodings==0.5.1 # via bleach webob==1.8.6 # via -r requirements/test.txt, xblock -xblock==1.3.1 # via -r requirements/test.txt -zipp==1.2.0 # via -c requirements/constraints.txt, -r requirements/test.txt, importlib-metadata +xblock==1.4.0 # via -r requirements/test.txt # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 1ae2c19..60a230a 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -5,7 +5,7 @@ # make upgrade # click==7.1.2 # via pip-tools -pip-tools==5.2.1 # via -r requirements/pip-tools.in +pip-tools==5.4.0 # via -r requirements/pip-tools.in six==1.15.0 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/quality.txt b/requirements/quality.txt index 34f6f29..6a5c983 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -5,81 +5,77 @@ # make upgrade # appdirs==1.4.4 # via -r requirements/test.txt, fs -astroid==2.3.3 # via pylint, pylint-celery -attrs==19.3.0 # via -r requirements/test.txt, pytest -certifi==2020.6.20 # via -r requirements/test.txt, requests -cffi==1.14.0 # via -r requirements/test.txt, cryptography -chardet==3.0.4 # via -r requirements/test.txt, requests +astroid==2.4.2 # via pylint, pylint-celery +attrs==20.3.0 # via -r requirements/test.txt, pytest +certifi==2020.12.5 # via -r requirements/test.txt, requests +cffi==1.14.4 # via -r requirements/test.txt, cryptography +chardet==4.0.0 # via -r requirements/test.txt, requests click-log==0.3.2 # via edx-lint click==7.1.2 # via -r requirements/test.txt, click-log, code-annotations, edx-lint -code-annotations==0.3.4 # via -r requirements/test.txt -coverage==5.2 # via -r requirements/test.txt, pytest-cov -cryptography==2.9.2 # via -r requirements/test.txt, pyjwt +code-annotations==0.10.2 # via -r requirements/test.txt +coverage==5.3.1 # via -r requirements/test.txt, pytest-cov +cryptography==3.3.1 # via -r requirements/test.txt, pyjwt ddt==1.4.1 # via -r requirements/test.txt -django-model-utils==4.0.0 # via -r requirements/test.txt -django-waffle==1.0.0 # via -r requirements/test.txt, edx-django-utils, edx-drf-extensions -django==2.2.14 # via -c requirements/constraints.txt, -r requirements/test.txt, code-annotations, django-model-utils, djangorestframework, drf-jwt, edx-django-utils, edx-drf-extensions, rest-condition -djangorestframework==3.11.0 # via -r requirements/test.txt, drf-jwt, edx-drf-extensions, rest-condition -drf-jwt==1.16.2 # via -r requirements/test.txt, edx-drf-extensions -edx-django-utils==3.2.3 # via -r requirements/test.txt, edx-drf-extensions -edx-drf-extensions==6.1.0 # via -r requirements/test.txt -edx-lint==1.5.0 # via -r requirements/quality.in +django-crum==0.7.9 # via -r requirements/test.txt, edx-django-utils +django-model-utils==4.1.1 # via -r requirements/test.txt +django-waffle==2.0.0 # via -r requirements/test.txt, edx-django-utils, edx-drf-extensions +django==2.2.17 # via -c requirements/constraints.txt, -r requirements/test.txt, code-annotations, django-crum, django-model-utils, djangorestframework, drf-jwt, edx-django-utils, edx-drf-extensions, rest-condition +djangorestframework==3.12.2 # via -r requirements/test.txt, drf-jwt, edx-drf-extensions, rest-condition +drf-jwt==1.17.3 # via -r requirements/test.txt, edx-drf-extensions +edx-django-utils==3.13.0 # via -r requirements/test.txt, edx-drf-extensions +edx-drf-extensions==6.2.0 # via -r requirements/test.txt +edx-lint==1.6 # via -r requirements/quality.in edx-opaque-keys==2.1.1 # via -r requirements/test.txt, edx-drf-extensions fs==2.4.11 # via -r requirements/test.txt, xblock future==0.18.2 # via -r requirements/test.txt, pyjwkest idna==2.10 # via -r requirements/test.txt, requests -importlib-metadata==1.7.0 # via -r requirements/test.txt, pluggy, pytest -isort==4.3.21 # via -r requirements/quality.in, pylint +iniconfig==1.1.1 # via -r requirements/test.txt, pytest +isort==5.6.4 # via -r requirements/quality.in, pylint jinja2==2.11.2 # via -r requirements/test.txt, code-annotations lazy-object-proxy==1.4.3 # via astroid -lxml==4.5.2 # via -r requirements/test.txt, xblock +lxml==4.6.2 # via -r requirements/test.txt, xblock markupsafe==1.1.1 # via -r requirements/test.txt, jinja2, xblock mccabe==0.6.1 # via pylint mock==3.0.5 # via -c requirements/constraints.txt, -r requirements/test.txt -more-itertools==8.4.0 # via -r requirements/test.txt, pytest -newrelic==5.14.1.144 # via -r requirements/test.txt, edx-django-utils -packaging==20.4 # via -r requirements/test.txt, pytest -pathlib2==2.3.5 # via -r requirements/test.txt, pytest -pbr==5.4.5 # via -r requirements/test.txt, stevedore +newrelic==5.24.0.153 # via -r requirements/test.txt, edx-django-utils +packaging==20.8 # via -r requirements/test.txt, pytest +pbr==5.5.1 # via -r requirements/test.txt, stevedore pluggy==0.13.1 # via -r requirements/test.txt, pytest -psutil==1.2.1 # via -r requirements/test.txt, edx-django-utils -py==1.9.0 # via -r requirements/test.txt, pytest +psutil==5.8.0 # via -r requirements/test.txt, edx-django-utils +py==1.10.0 # via -r requirements/test.txt, pytest pycodestyle==2.6.0 # via -r requirements/quality.in pycparser==2.20 # via -r requirements/test.txt, cffi -pycryptodomex==3.9.8 # via -r requirements/test.txt, pyjwkest -pydocstyle==5.0.2 # via -r requirements/quality.in +pycryptodomex==3.9.9 # via -r requirements/test.txt, pyjwkest +pydocstyle==5.1.1 # via -r requirements/quality.in pyjwkest==1.4.2 # via -r requirements/test.txt, edx-drf-extensions pyjwt[crypto]==1.7.1 # via -r requirements/test.txt, drf-jwt pylint-celery==0.3 # via edx-lint -pylint-django==2.0.11 # via edx-lint +pylint-django==2.3.0 # via edx-lint pylint-plugin-utils==0.6 # via pylint-celery, pylint-django -pylint==2.4.4 # via edx-lint, pylint-celery, pylint-django, pylint-plugin-utils -pymongo==3.10.1 # via -r requirements/test.txt, edx-opaque-keys +pylint==2.6.0 # via edx-lint, pylint-celery, pylint-django, pylint-plugin-utils +pymongo==3.11.2 # via -r requirements/test.txt, edx-opaque-keys pyparsing==2.4.7 # via -r requirements/test.txt, packaging -pytest-cov==2.10.0 # via -r requirements/test.txt -pytest-django==3.9.0 # via -r requirements/test.txt -pytest==5.4.3 # via -r requirements/test.txt, pytest-cov, pytest-django +pytest-cov==2.10.1 # via -r requirements/test.txt +pytest-django==4.1.0 # via -r requirements/test.txt +pytest==6.2.1 # via -r requirements/test.txt, pytest-cov, pytest-django python-dateutil==2.8.1 # via -r requirements/test.txt, edx-drf-extensions, xblock python-slugify==4.0.1 # via -r requirements/test.txt, code-annotations -pytz==2020.1 # via -r requirements/test.txt, django, fs, xblock +pytz==2020.4 # via -r requirements/test.txt, django, fs, xblock pyyaml==5.3.1 # via -r requirements/test.txt, code-annotations, xblock -requests==2.24.0 # via -r requirements/test.txt, edx-drf-extensions, pyjwkest +requests==2.25.1 # via -r requirements/test.txt, edx-drf-extensions, pyjwkest rest-condition==1.0.3 # via -r requirements/test.txt, edx-drf-extensions semantic-version==2.8.5 # via -r requirements/test.txt, edx-drf-extensions -six==1.15.0 # via -r requirements/test.txt, astroid, cryptography, edx-drf-extensions, edx-lint, edx-opaque-keys, fs, mock, packaging, pathlib2, pyjwkest, python-dateutil, stevedore, xblock +six==1.15.0 # via -r requirements/test.txt, astroid, cryptography, edx-drf-extensions, edx-lint, edx-opaque-keys, fs, mock, pyjwkest, python-dateutil, xblock snowballstemmer==2.0.0 # via pydocstyle -sqlparse==0.3.1 # via -r requirements/test.txt, django -stevedore==1.32.0 # via -r requirements/test.txt, code-annotations, edx-opaque-keys +sqlparse==0.4.1 # via -r requirements/test.txt, django +stevedore==3.3.0 # via -r requirements/test.txt, code-annotations, edx-django-utils, edx-opaque-keys text-unidecode==1.3 # via -r requirements/test.txt, python-slugify -typed-ast==1.4.1 # via astroid -typing==3.7.4.3 # via -r requirements/test.txt, fs -urllib3==1.25.9 # via -r requirements/test.txt, requests -wcwidth==0.2.5 # via -r requirements/test.txt, pytest +toml==0.10.2 # via -r requirements/test.txt, pylint, pytest +urllib3==1.26.2 # via -r requirements/test.txt, requests web-fragments==0.3.2 # via -r requirements/test.txt, xblock webob==1.8.6 # via -r requirements/test.txt, xblock -wrapt==1.11.2 # via astroid -xblock==1.3.1 # via -r requirements/test.txt -zipp==1.2.0 # via -c requirements/constraints.txt, -r requirements/test.txt, importlib-metadata +wrapt==1.12.1 # via astroid +xblock==1.4.0 # via -r requirements/test.txt # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/test.txt b/requirements/test.txt index e240a3a..d90a504 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -5,65 +5,62 @@ # make upgrade # appdirs==1.4.4 # via -r requirements/base.txt, fs -attrs==19.3.0 # via pytest -certifi==2020.6.20 # via -r requirements/base.txt, requests -cffi==1.14.0 # via -r requirements/base.txt, cryptography -chardet==3.0.4 # via -r requirements/base.txt, requests +attrs==20.3.0 # via pytest +certifi==2020.12.5 # via -r requirements/base.txt, requests +cffi==1.14.4 # via -r requirements/base.txt, cryptography +chardet==4.0.0 # via -r requirements/base.txt, requests click==7.1.2 # via code-annotations -code-annotations==0.3.4 # via -r requirements/test.in -coverage==5.2 # via pytest-cov -cryptography==2.9.2 # via -r requirements/base.txt, pyjwt +code-annotations==0.10.2 # via -r requirements/test.in +coverage==5.3.1 # via pytest-cov +cryptography==3.3.1 # via -r requirements/base.txt, pyjwt ddt==1.4.1 # via -r requirements/test.in -django-model-utils==4.0.0 # via -r requirements/base.txt -django-waffle==1.0.0 # via -r requirements/base.txt, edx-django-utils, edx-drf-extensions -djangorestframework==3.11.0 # via -r requirements/base.txt, drf-jwt, edx-drf-extensions, rest-condition -drf-jwt==1.16.2 # via -r requirements/base.txt, edx-drf-extensions -edx-django-utils==3.2.3 # via -r requirements/base.txt, edx-drf-extensions -edx-drf-extensions==6.1.0 # via -r requirements/base.txt +django-crum==0.7.9 # via -r requirements/base.txt, edx-django-utils +django-model-utils==4.1.1 # via -r requirements/base.txt +django-waffle==2.0.0 # via -r requirements/base.txt, edx-django-utils, edx-drf-extensions +djangorestframework==3.12.2 # via -r requirements/base.txt, drf-jwt, edx-drf-extensions, rest-condition +drf-jwt==1.17.3 # via -r requirements/base.txt, edx-drf-extensions +edx-django-utils==3.13.0 # via -r requirements/base.txt, edx-drf-extensions +edx-drf-extensions==6.2.0 # via -r requirements/base.txt edx-opaque-keys==2.1.1 # via -r requirements/base.txt, edx-drf-extensions fs==2.4.11 # via -r requirements/base.txt, xblock future==0.18.2 # via -r requirements/base.txt, pyjwkest idna==2.10 # via -r requirements/base.txt, requests -importlib-metadata==1.7.0 # via pluggy, pytest +iniconfig==1.1.1 # via pytest jinja2==2.11.2 # via code-annotations -lxml==4.5.2 # via -r requirements/base.txt, xblock +lxml==4.6.2 # via -r requirements/base.txt, xblock markupsafe==1.1.1 # via -r requirements/base.txt, jinja2, xblock mock==3.0.5 # via -c requirements/constraints.txt, -r requirements/test.in -more-itertools==8.4.0 # via pytest -newrelic==5.14.1.144 # via -r requirements/base.txt, edx-django-utils -packaging==20.4 # via pytest -pathlib2==2.3.5 # via pytest -pbr==5.4.5 # via -r requirements/base.txt, stevedore +newrelic==5.24.0.153 # via -r requirements/base.txt, edx-django-utils +packaging==20.8 # via pytest +pbr==5.5.1 # via -r requirements/base.txt, stevedore pluggy==0.13.1 # via pytest -psutil==1.2.1 # via -r requirements/base.txt, edx-django-utils -py==1.9.0 # via pytest +psutil==5.8.0 # via -r requirements/base.txt, edx-django-utils +py==1.10.0 # via pytest pycparser==2.20 # via -r requirements/base.txt, cffi -pycryptodomex==3.9.8 # via -r requirements/base.txt, pyjwkest +pycryptodomex==3.9.9 # via -r requirements/base.txt, pyjwkest pyjwkest==1.4.2 # via -r requirements/base.txt, edx-drf-extensions pyjwt[crypto]==1.7.1 # via -r requirements/base.txt, drf-jwt -pymongo==3.10.1 # via -r requirements/base.txt, edx-opaque-keys +pymongo==3.11.2 # via -r requirements/base.txt, edx-opaque-keys pyparsing==2.4.7 # via packaging -pytest-cov==2.10.0 # via -r requirements/test.in -pytest-django==3.9.0 # via -r requirements/test.in -pytest==5.4.3 # via pytest-cov, pytest-django +pytest-cov==2.10.1 # via -r requirements/test.in +pytest-django==4.1.0 # via -r requirements/test.in +pytest==6.2.1 # via pytest-cov, pytest-django python-dateutil==2.8.1 # via -r requirements/base.txt, edx-drf-extensions, xblock python-slugify==4.0.1 # via code-annotations -pytz==2020.1 # via -r requirements/base.txt, django, fs, xblock +pytz==2020.4 # via -r requirements/base.txt, django, fs, xblock pyyaml==5.3.1 # via -r requirements/base.txt, code-annotations, xblock -requests==2.24.0 # via -r requirements/base.txt, edx-drf-extensions, pyjwkest +requests==2.25.1 # via -r requirements/base.txt, edx-drf-extensions, pyjwkest rest-condition==1.0.3 # via -r requirements/base.txt, edx-drf-extensions semantic-version==2.8.5 # via -r requirements/base.txt, edx-drf-extensions -six==1.15.0 # via -r requirements/base.txt, cryptography, edx-drf-extensions, edx-opaque-keys, fs, mock, packaging, pathlib2, pyjwkest, python-dateutil, stevedore, xblock -sqlparse==0.3.1 # via -r requirements/base.txt, django -stevedore==1.32.0 # via -r requirements/base.txt, code-annotations, edx-opaque-keys +six==1.15.0 # via -r requirements/base.txt, cryptography, edx-drf-extensions, edx-opaque-keys, fs, mock, pyjwkest, python-dateutil, xblock +sqlparse==0.4.1 # via -r requirements/base.txt, django +stevedore==3.3.0 # via -r requirements/base.txt, code-annotations, edx-django-utils, edx-opaque-keys text-unidecode==1.3 # via python-slugify -typing==3.7.4.3 # via -r requirements/base.txt, fs -urllib3==1.25.9 # via -r requirements/base.txt, requests -wcwidth==0.2.5 # via pytest +toml==0.10.2 # via pytest +urllib3==1.26.2 # via -r requirements/base.txt, requests web-fragments==0.3.2 # via -r requirements/base.txt, xblock webob==1.8.6 # via -r requirements/base.txt, xblock -xblock==1.3.1 # via -r requirements/base.txt -zipp==1.2.0 # via -c requirements/constraints.txt, importlib-metadata +xblock==1.4.0 # via -r requirements/base.txt # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/travis.txt b/requirements/travis.txt index 523cbc5..c93e169 100644 --- a/requirements/travis.txt +++ b/requirements/travis.txt @@ -5,24 +5,21 @@ # make upgrade # appdirs==1.4.4 # via virtualenv -certifi==2020.6.20 # via requests -chardet==3.0.4 # via requests -codecov==2.1.8 # via -r requirements/travis.in -coverage==5.2 # via codecov +certifi==2020.12.5 # via requests +chardet==4.0.0 # via requests +codecov==2.1.11 # via -r requirements/travis.in +coverage==5.3.1 # via codecov distlib==0.3.1 # via virtualenv filelock==3.0.12 # via tox, virtualenv idna==2.10 # via requests -importlib-metadata==1.7.0 # via pluggy, tox, virtualenv -importlib-resources==3.0.0 # via virtualenv -packaging==20.4 # via tox +packaging==20.8 # via tox pluggy==0.13.1 # via tox -py==1.9.0 # via tox +py==1.10.0 # via tox pyparsing==2.4.7 # via packaging -requests==2.24.0 # via codecov -six==1.15.0 # via packaging, tox, virtualenv -toml==0.10.1 # via tox +requests==2.25.1 # via codecov +six==1.15.0 # via tox, virtualenv +toml==0.10.2 # via tox tox-battery==0.6.1 # via -r requirements/travis.in -tox==3.17.1 # via -r requirements/travis.in, tox-battery -urllib3==1.25.9 # via requests -virtualenv==20.0.27 # via tox -zipp==1.2.0 # via -c requirements/constraints.txt, importlib-metadata, importlib-resources +tox==3.20.1 # via -r requirements/travis.in, tox-battery +urllib3==1.26.2 # via requests +virtualenv==20.2.2 # via tox diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index 84f1adb..295b238 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # pylint: disable=useless-suppression """ Package metadata for edx_when. @@ -62,7 +61,7 @@ def is_requirement(line): if sys.argv[-1] == 'tag': print("Tagging the version on github:") - os.system(u"git tag -a %s -m 'version %s'" % (VERSION, VERSION)) + os.system("git tag -a %s -m 'version %s'" % (VERSION, VERSION)) os.system("git push --tags") sys.exit() diff --git a/tests/test_api.py b/tests/test_api.py index 028ba21..3b7f19e 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -4,13 +4,13 @@ import sys from datetime import datetime, timedelta +from unittest.mock import Mock, call, patch import ddt -from django.contrib.auth.models import User +from django.contrib import auth from django.core.cache import cache from django.test import TestCase from edx_django_utils.cache.utils import DEFAULT_REQUEST_CACHE -from mock import Mock, call, patch from opaque_keys.edx.locator import CourseLocator from edx_when import api, models @@ -19,14 +19,17 @@ NUM_OVERRIDES = 3 +User = auth.get_user_model() + @ddt.ddt class ApiTests(TestCase): """ Tests for edx_when.api """ + def setUp(self): - super(ApiTests, self).setUp() + super().setUp() self.course = DummyCourse(id='course-v1:testX+tt101+2019') self.course.save() @@ -552,6 +555,7 @@ class ApiWaffleTests(TestCase): These are isolated because they have pretty different patch requirements. """ + @patch.dict(sys.modules, {'openedx.features.course_experience': Mock()}) def test_relative_dates_enabled(self): from openedx.features.course_experience import RELATIVE_DATES_FLAG as mock_flag # pylint: disable=import-error diff --git a/tests/test_models.py b/tests/test_models.py index 9da76f2..040a12f 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,16 +1,15 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- """ Tests for the `edx-when` models module. """ from datetime import datetime, timedelta +from unittest.mock import patch import ddt from django.contrib.auth import get_user_model from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.test import TestCase -from mock import patch from edx_when.models import ContentDate, DatePolicy, MissingScheduleError from tests.test_models_app.models import DummyCourse, DummyEnrollment, DummySchedule @@ -70,7 +69,7 @@ class TestContentDate(TestCase): Tests of the ContentDate model. """ def setUp(self): - super(TestContentDate, self).setUp() + super().setUp() self.course = DummyCourse(id='course-v1:edX+Test+Course') self.course.save() diff --git a/tests/test_models_app/apps.py b/tests/test_models_app/apps.py index 242f10f..df93a53 100644 --- a/tests/test_models_app/apps.py +++ b/tests/test_models_app/apps.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ App declaration for the test_models_app """ diff --git a/tests/test_models_app/migrations/0001_initial.py b/tests/test_models_app/migrations/0001_initial.py index a911687..e774094 100644 --- a/tests/test_models_app/migrations/0001_initial.py +++ b/tests/test_models_app/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2020-01-29 09:56 diff --git a/tests/test_models_app/models.py b/tests/test_models_app/models.py index c0fff77..599371e 100644 --- a/tests/test_models_app/models.py +++ b/tests/test_models_app/models.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - """ Dummy models for use when testing edx-when """ diff --git a/tests/test_xblock_services.py b/tests/test_xblock_services.py index 29542a6..1892dd4 100644 --- a/tests/test_xblock_services.py +++ b/tests/test_xblock_services.py @@ -3,9 +3,9 @@ """ import datetime +from unittest import mock -import mock -from django.contrib.auth.models import User +from django.contrib import auth from django.test import TestCase from edx_when import api, field_data @@ -13,6 +13,8 @@ NUM_OVERRIDES = 6 +User = auth.get_user_model() + class MockBlock: """ @@ -36,7 +38,7 @@ class XblockTests(TestCase): """ def setUp(self): - super(XblockTests, self).setUp() + super().setUp() self.items = make_items(with_relative=True) self.course_id = self.items[0][0].course_key api.set_dates_for_course(self.course_id, self.items) diff --git a/tox.ini b/tox.ini index 685b1ca..d2567aa 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35-django22,py38-django{22,30} +envlist = py38-django{22,30,31} [doc8] max-line-length = 120 @@ -9,22 +9,6 @@ exclude = .git,.tox,migrations max-line-length = 120 [pydocstyle] -; D101 = Missing docstring in public class -; D200 = One-line docstring should fit on one line with quotes -; D203 = 1 blank line required before class docstring -; D212 = Multi-line docstring summary should start at the first line -; D215 = Section underline is over-indented (numpy style) -; D404 = First word of the docstring should not be This (numpy style) -; D405 = Section name should be properly capitalized (numpy style) -; D406 = Section name should end with a newline (numpy style) -; D407 = Missing dashed underline after section (numpy style) -; D408 = Section underline should be in the line following the section’s name (numpy style) -; D409 = Section underline should match the length of its name (numpy style) -; D410 = Missing blank line after section (numpy style) -; D411 = Missing blank line before section (numpy style) -; D412 = No blank lines allowed between a section header and its content (numpy style) -; D413 = Missing blank line after last section (numpy style) -; D414 = Section has no content (numpy style) ignore = D101,D200,D203,D212,D215,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414 match-dir = (?!migrations) @@ -34,50 +18,52 @@ addopts = --cov edx_when --cov-report term-missing --cov-report xml norecursedirs = .* docs requirements [testenv] -deps = - django22: Django>=2.2,<2.3 - django30: Django>=3.0,<3.1 - -r{toxinidir}/requirements/test.txt -commands = - python -Wd -m pytest {posargs} +deps = + django22: Django>=2.2,<2.3 + django30: Django>=3.0,<3.1 + django31: Django>=3.1,<3.2 + -r{toxinidir}/requirements/test.txt +commands = + python -Wd -m pytest {posargs} [testenv:docs] -setenv = - DJANGO_SETTINGS_MODULE = test_settings - PYTHONPATH = {toxinidir} -whitelist_externals = - make - rm -deps = - -r{toxinidir}/requirements/doc.txt -commands = - doc8 --ignore-path docs/_build README.rst docs - rm -f docs/edx_when.rst - rm -f docs/modules.rst - make -C docs clean - make -C docs html - python setup.py check --restructuredtext --strict +setenv = + DJANGO_SETTINGS_MODULE = test_settings + PYTHONPATH = {toxinidir} +whitelist_externals = + make + rm +deps = + -r{toxinidir}/requirements/doc.txt +commands = + doc8 --ignore-path docs/_build README.rst docs + rm -f docs/edx_when.rst + rm -f docs/modules.rst + make -C docs clean + make -C docs html + python setup.py check --restructuredtext --strict [testenv:quality] -whitelist_externals = - make - rm - touch -deps = - -r{toxinidir}/requirements/quality.txt -commands = - touch tests/__init__.py - pylint edx_when tests test_utils manage.py setup.py - rm tests/__init__.py - pycodestyle edx_when tests manage.py setup.py - pydocstyle edx_when tests manage.py setup.py - isort --check-only --diff --recursive tests test_utils edx_when manage.py setup.py test_settings.py - make selfcheck +whitelist_externals = + make + rm + touch +deps = + -r{toxinidir}/requirements/quality.txt +commands = + touch tests/__init__.py + pylint edx_when tests test_utils manage.py setup.py + rm tests/__init__.py + pycodestyle edx_when tests manage.py setup.py + pydocstyle edx_when tests manage.py setup.py + isort --check-only --diff tests test_utils edx_when manage.py setup.py test_settings.py + make selfcheck [testenv:pii_check] -setenv = - DJANGO_SETTINGS_MODULE = test_settings -deps = - -r{toxinidir}/requirements/test.txt -commands = - code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage +setenv = + DJANGO_SETTINGS_MODULE = test_settings +deps = + -r{toxinidir}/requirements/test.txt +commands = + code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage +