diff --git a/.github/workflows/bumpversion.yml b/.github/workflows/bumpversion.yml index 2f03c42..b1f9e0d 100644 --- a/.github/workflows/bumpversion.yml +++ b/.github/workflows/bumpversion.yml @@ -23,7 +23,7 @@ jobs: default_prerelease_bump: false dry_run: true - name: Set up Python 3.8 - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: "3.8" - name: Create bumpversion @@ -40,7 +40,7 @@ jobs: - name: Commit bumpversion id: bumpversion if: steps.tag_version.outputs.new_version - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: branch: ${{ github.ref }} commit_message: "docs(bumpversion): ${{ steps.tag_version.outputs.previous_tag }} → ${{ steps.tag_version.outputs.new_version }}" diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 17e76cb..f6fb45a 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -8,4 +8,4 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v4.1.12 + - uses: wagoid/commitlint-github-action@v5.4.4 diff --git a/.github/workflows/pr_issue_assignment.yml b/.github/workflows/pr_issue_assignment.yml index f89ecac..0bda475 100644 --- a/.github/workflows/pr_issue_assignment.yml +++ b/.github/workflows/pr_issue_assignment.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Auto-assign PR-Issue' - uses: pozil/auto-assign-issue@v1.5.0 + uses: pozil/auto-assign-issue@v1.13.0 with: repo-token: ${{ secrets.DEDALO_PAT }} teams: django-plugins-tahoau diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 750c804..b642225 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,11 +11,11 @@ jobs: strategy: max-parallel: 2 matrix: - python-version: ["3.8", "3.10"] + python-version: ["3.8"] django: ["32"] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache dependency uses: actions/cache@v3 @@ -25,7 +25,7 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/README.rst b/README.rst index 89144f3..ad418a2 100644 --- a/README.rst +++ b/README.rst @@ -71,11 +71,13 @@ Compatibility Notes +-------------------+----------------+ | Lilac | >= 2.2 < 5.0 | +-------------------+----------------+ -| Maple | >= 4.0 | +| Maple | >= 4.0 < 6.0 | +-------------------+----------------+ -| Nutmeg | >= 5.0 | +| Nutmeg | >= 5.0 < 6.0 | +-------------------+----------------+ -| Olive | >= 5.0 | +| Olive | >= 5.0 < 6.0 | ++-------------------+----------------+ +| Palm | >= 6.0 | +-------------------+----------------+ The following changes to the plugin settings are necessary. If the release you are looking for is diff --git a/eox_tagging/api/v1/serializers.py b/eox_tagging/api/v1/serializers.py index 47192a7..fd104b4 100644 --- a/eox_tagging/api/v1/serializers.py +++ b/eox_tagging/api/v1/serializers.py @@ -77,8 +77,8 @@ def create(self, validated_data): try: return Tag.objects.create_tag(**tag_object) - except ValidationError as e: - raise serializers.ValidationError({"Tag": _(f"{e.message}")}) + except ValidationError as validation_error: + raise serializers.ValidationError({"Tag": _(f"{validation_error.message}")}) @staticmethod def _convert_compound_keys(ids, object_type): diff --git a/eox_tagging/api/v1/test/test_permissions.py b/eox_tagging/api/v1/test/test_permissions.py index 1e32f66..8d8237e 100644 --- a/eox_tagging/api/v1/test/test_permissions.py +++ b/eox_tagging/api/v1/test/test_permissions.py @@ -28,7 +28,7 @@ def setUp(self): self.mock_request = Mock() self.view = Mock() - def test_API_access_success(self): + def test_api_access_success(self): """Used to test that an authorized user can access to the Tag API.""" self.mock_request.get_host.return_value = "test.com" self.mock_request.user = self.user_authorized @@ -38,7 +38,7 @@ def test_API_access_success(self): self.assertTrue(has_permission) - def test_API_access_denied(self): + def test_api_access_denied(self): """Used to test that a unauthorized user can't access to the Tag API.""" self.mock_request.get_host.return_value = "test.com" self.mock_request.user = self.common_user @@ -48,7 +48,7 @@ def test_API_access_denied(self): self.assertFalse(has_permission) - def test_API_access_with_bad_host(self): + def test_api_access_with_bad_host(self): """Used to test that an authorized user without a matching host with client can't access the API.""" self.mock_request.get_host.return_value = "test_.com" self.mock_request.user = self.user_authorized @@ -58,7 +58,7 @@ def test_API_access_with_bad_host(self): with self.assertRaises(exceptions.NotAuthenticated): self.has_permission(self.mock_request, self.view) - def test_API_access_without_valid_host(self): + def test_api_access_without_valid_host(self): """Used to test that an authorized user without a valid host can't access the API.""" self.mock_request.get_host.return_value = None self.mock_request.user = self.user_authorized @@ -68,7 +68,7 @@ def test_API_access_without_valid_host(self): with self.assertRaises(exceptions.NotAuthenticated): self.has_permission(self.mock_request, self.view) - def test_API_access_without_valid_client(self): + def test_api_access_without_valid_client(self): """Used to test that an authorized user without a valid client can't access the API.""" self.mock_request.get_host.return_value = "test_.com" self.mock_request.user = self.user_authorized diff --git a/eox_tagging/api/v1/test/test_viewset.py b/eox_tagging/api/v1/test/test_viewset.py index 7ea8e1b..92f027b 100644 --- a/eox_tagging/api/v1/test/test_viewset.py +++ b/eox_tagging/api/v1/test/test_viewset.py @@ -17,10 +17,10 @@ def mock_decorator(action=None): # pylint: disable=unused-argument """Utility decorator that returns same function.""" - def decorator(f): - @wraps(f) + def decorator(func): + @wraps(func) def decorated_function(*args, **kwargs): - return f(*args, **kwargs) + return func(*args, **kwargs) return decorated_function return decorator @@ -52,7 +52,7 @@ def decorated_function(*args, **kwargs): "validate_expiration_date": {"exist": True}, }, ]) -class TestTagViewSet(TestCase): +class TestTagViewSet(TestCase): # pylint: disable=too-many-instance-attributes """Test class for tags viewset.""" patch_permissions = patch( @@ -108,22 +108,22 @@ def setUp(self): access=AccessLevel.PUBLIC, expiration_date=datetime.datetime(2020, 7, 19, 10, 30, 40), ) - self.KEY = self.example_tag.key.hex + self.key = self.example_tag.key.hex # Test URLs - self.URL = reverse("tag-list") - self.URL_DETAILS = reverse("tag-detail", args=[self.KEY]) + self.url = reverse("tag-list") + self.url_details = reverse("tag-detail", args=[self.key]) @patch_permissions def test_get_all_tags(self, _): """Used to test getting all tags.""" - response = self.client.get(self.URL) + response = self.client.get(self.url) self.assertEqual(response.status_code, 200) @patch_permissions def test_retreive_tag(self, _): """Used to test getting a tag given its key.""" - response = self.client.get(self.URL_DETAILS) + response = self.client.get(self.url_details) self.assertEqual(response.status_code, 200) @@ -141,7 +141,7 @@ def test_create_tag(self, _): "expiration_date": "2020-12-04 10:20:30", } - response = self.client.post(self.URL, data, format='json') + response = self.client.post(self.url, data, format='json') self.assertEqual(response.status_code, 201) @@ -160,7 +160,7 @@ def test_create_tag_without_owner(self, _): "expiration_date": "2020-12-04 10:20:30", } - response = self.client.post(self.URL, data, format='json') + response = self.client.post(self.url, data, format='json') owner_type = response.data.get("meta").get("owner_type") self.assertEqual(owner_type, "Site") @@ -178,7 +178,7 @@ def test_create_tag_with_iso_datetime_format(self, _): "expiration_date": "2020-12-04T10:20:30.15785", } - response = self.client.post(self.URL, data, format='json') + response = self.client.post(self.url, data, format='json') self.assertEqual(response.status_code, 201) @@ -198,7 +198,7 @@ def test_create_tag_with_wrong_datetime_format(self, _): "expiration_date": "12-04-2020 10:20:30", } - response = self.client.post(self.URL, data, format='json') + response = self.client.post(self.url, data, format='json') self.assertEqual(response.status_code, 400) @@ -215,7 +215,7 @@ def test_create_tag_with_owner_site(self, _): "expiration_date": "2020-12-04 10:30:40", } - response = self.client.post(self.URL, data, format='json') + response = self.client.post(self.url, data, format='json') owner_type = response.data.get("meta").get("owner_type").lower() self.assertEqual(owner_type, "site") @@ -233,21 +233,21 @@ def test_create_tag_with_wrong_owner(self, _): "expiration_date": "2020-12-04 10:30:40 ", } - response = self.client.post(self.URL, data, format='json') + response = self.client.post(self.url, data, format='json') self.assertEqual(response.status_code, 400) @patch_permissions def test_patch_tag(self, _): """Used to test that a tag can't be updated.""" - response = self.client.patch(self.URL_DETAILS) + response = self.client.patch(self.url_details) self.assertEqual(response.status_code, 405) @patch_permissions def test_put_tag(self, _): """Used to test that a tag can't be updated.""" - response = self.client.put(self.URL_DETAILS) + response = self.client.put(self.url_details) self.assertEqual(response.status_code, 405) @@ -258,10 +258,10 @@ def test_filter_by_tag_key(self, _): "key": self.example_tag.key.hex, } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) data = response.json().get("results")[0] - self.assertEqual(data.get("key").replace("-", ""), self.KEY) + self.assertEqual(data.get("key").replace("-", ""), self.key) @patch_permissions def test_filter_by_username(self, _): @@ -270,7 +270,7 @@ def test_filter_by_username(self, _): "username": "user_test", } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) data = response.json().get("results")[0].get("meta") self.assertEqual(data.get("target_id"), "user_test") @@ -282,7 +282,7 @@ def test_filter_by_owner_user(self, _): "owner_type": "user", } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) results = response.json().get("results") owner_is_user = [tag.get("meta").get("owner_type") == "User" for tag in results] @@ -296,7 +296,7 @@ def test_filter_by_owner_user_and_target(self, _): "target_type": "user", } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) results = response.json().get("results") owner_is_user = [tag.get("meta").get("owner_type") == "User" for tag in results] @@ -312,7 +312,7 @@ def test_filter_by_owner_user_and_username(self, _): "username": "user_test", } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) results = response.json().get("results") owner_type = results[0].get("meta").get("owner_type") @@ -327,7 +327,7 @@ def test_filter_by_owner_site(self, _): "owner_type": "site", } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) data = response.json().get("results")[0] owner_type = data.get("meta").get("owner_type").lower() @@ -343,7 +343,7 @@ def test_filter_by_wrong_owner(self, _): "owner_type": "course", } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) data = response.json().get("results") self.assertFalse(data) @@ -355,7 +355,7 @@ def test_filter_by_type(self, _): "target_type": "user", } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) self.assertEqual(response.status_code, 200) @@ -366,7 +366,7 @@ def test_filter_by_existent_access(self, _): "access": "public", } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) data = response.json().get("results")[0] self.assertEqual(data.get("key").replace("-", ""), self.example_tag_3.key.hex) @@ -378,7 +378,7 @@ def test_filter_by_non_existent_access(self, _): "access": "pub", } - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) data = response.json().get("results") self.assertFalse(data) @@ -396,7 +396,7 @@ def test_filter_using_after_datetime(self, _): datetime_value = datetime.datetime(2020, 10, 10, 10, 20, 30) datetime_format = "%Y-%m-%dT%H:%M:%SZ" - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) results = response.json().get("results") datetimes = [datetime.datetime.strptime(tag.get("activation_date"), datetime_format) > datetime_value @@ -416,7 +416,7 @@ def test_activation_using_before_filter(self, _): datetime_value = datetime.datetime(2020, 10, 10, 10, 20, 30) datetime_format = "%Y-%m-%dT%H:%M:%SZ" - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) results = response.json().get("results") activation_date = [datetime.datetime.strptime(tag.get("activation_date"), datetime_format) < datetime_value @@ -436,7 +436,7 @@ def test_expiration_using_before_filter(self, _): datetime_value = datetime.datetime(2020, 10, 10, 10, 20, 30) datetime_format = "%Y-%m-%dT%H:%M:%SZ" - response = self.client.get(self.URL, query_params) + response = self.client.get(self.url, query_params) results = response.json().get("results") expiration_date = [datetime.datetime.strptime(tag.get("expiration_date"), datetime_format) < datetime_value @@ -446,14 +446,14 @@ def test_expiration_using_before_filter(self, _): @patch_permissions def test_soft_delete(self, _): """Used to test a tag soft deletion.""" - response = self.client.delete(self.URL_DETAILS) + response = self.client.delete(self.url_details) self.assertEqual(response.status_code, 204) @patch_permissions def test_getting_meta_field(self, _): """Used to test getting tag most important technical information.""" - response = self.client.get(self.URL_DETAILS) + response = self.client.get(self.url_details) data = response.json().get("meta") self.assertIsNotNone(data) @@ -465,25 +465,25 @@ def test_getting_meta_field(self, _): @patch_permissions def test_retreive_inactive_tag(self, _): """Used to test getting a tag given its key.""" - self.client.delete(self.URL_DETAILS) - response = self.client.get(self.URL_DETAILS) + self.client.delete(self.url_details) + response = self.client.get(self.url_details) - self.assertEqual(response.data.get("key").replace("-", ""), self.KEY) + self.assertEqual(response.data.get("key").replace("-", ""), self.key) self.assertEqual(response.data.get("status"), "INACTIVE") @patch_permissions def test_get_inactive_tag_with_filter(self, _): """Used to test getting a tag given its key.""" query_params = { - "key": self.KEY, + "key": self.key, } - self.client.delete(self.URL_DETAILS) - response = self.client.get(self.URL, query_params) + self.client.delete(self.url_details) + response = self.client.get(self.url, query_params) data = response.json().get("results")[0] self.assertEqual(data.get("status"), "INACTIVE") - self.assertEqual(data.get("key").replace("-", ""), self.KEY) + self.assertEqual(data.get("key").replace("-", ""), self.key) @patch_permissions def test_listing_inactive_tags(self, _): @@ -492,8 +492,8 @@ def test_listing_inactive_tags(self, _): "include_inactive": "true" } - self.client.delete(self.URL_DETAILS) # To deactivate the tag - response_include_inactive = self.client.get(self.URL, query_params) + self.client.delete(self.url_details) # To deactivate the tag + response_include_inactive = self.client.get(self.url, query_params) include_inactive = [tag.get("key") for tag in response_include_inactive.json().get("results")] serialized_tag = TagSerializer(self.example_tag).data @@ -501,9 +501,9 @@ def test_listing_inactive_tags(self, _): @patch_permissions def test_listing_just_active_tags(self, _): - """Used to test getting just active tags using as the only inactive tag the tag in URL_DETAILS.""" - self.client.delete(self.URL_DETAILS) # To deactivate the tag - response_exclude_inactive = self.client.get(self.URL) + """Used to test getting just active tags using as the only inactive tag the tag in url_details.""" + self.client.delete(self.url_details) # To deactivate the tag + response_exclude_inactive = self.client.get(self.url) exclude_inactive = [tag.get("key") for tag in response_exclude_inactive.json().get("results")] serialized_tag = TagSerializer(self.example_tag).data diff --git a/eox_tagging/api/v1/viewset.py b/eox_tagging/api/v1/viewset.py index f46ef63..86e9a0d 100644 --- a/eox_tagging/api/v1/viewset.py +++ b/eox_tagging/api/v1/viewset.py @@ -203,7 +203,7 @@ def audit_method(*args, **kwargs): # pylint: disable=unused-argument ], responses={status.HTTP_404_NOT_FOUND: "Not found"}, ) -class TagViewSet(viewsets.ModelViewSet): +class TagViewSet(viewsets.ModelViewSet): # pylint: disable=too-many-ancestors """Viewset for listing and creating Tags.""" serializer_class = TagSerializer @@ -211,7 +211,7 @@ class TagViewSet(viewsets.ModelViewSet): permission_classes = (EoxTaggingAPIPermission,) pagination_class = TagApiPagination filter_backends = (FilterBackend,) - filter_class = TagFilter + filterset_class = TagFilter lookup_field = "key" http_method_names = ["get", "post", "delete", "head"] diff --git a/eox_tagging/models.py b/eox_tagging/models.py index dc05102..b9855a4 100644 --- a/eox_tagging/models.py +++ b/eox_tagging/models.py @@ -202,7 +202,7 @@ class Tag(models.Model): objects = TagQuerySet().as_manager() - class Meta: + class Meta: # pylint: disable=too-few-public-methods """Meta class. """ verbose_name = "tag" verbose_name_plural = "tags" @@ -266,8 +266,7 @@ def __get_model(self, attr, name): field_value = getattr(self, f"{attr}_type") if name: return field_value - else: - return getattr(self, attr) + return getattr(self, attr) def __get_field_choice(self, attr): """ diff --git a/eox_tagging/settings/test.py b/eox_tagging/settings/test.py index b94ef31..c6af13d 100644 --- a/eox_tagging/settings/test.py +++ b/eox_tagging/settings/test.py @@ -3,7 +3,7 @@ """ from __future__ import unicode_literals -from .common import * # pylint: disable=wildcard-import +from .common import * # pylint: disable=wildcard-import, unused-wildcard-import class SettingsClass: @@ -30,19 +30,6 @@ class SettingsClass: }, } -ROOT_URLCONF = 'eox_tagging.urls' - -# Internationalization -# https://docs.djangoproject.com/en/1.11/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'UTC' - -USE_TZ = True - -ALLOWED_HOSTS = ['*'] - def plugin_settings(settings): # pylint: disable=function-redefined """ diff --git a/eox_tagging/test/test_models.py b/eox_tagging/test/test_models.py index 2f554d7..d4709b9 100644 --- a/eox_tagging/test/test_models.py +++ b/eox_tagging/test/test_models.py @@ -515,13 +515,13 @@ class TestTagQuerysetManager(TestCase): """ def setUp(self): - self.tagQueryset = TagQuerySet() + self.tag_query_set = TagQuerySet() self.course_id = "course-v1:edX+DemoX+Demo_Course" @patch.object(OpaqueKeyProxyModel, 'objects') def test_create_tag_with_course(self, opaque_objects_mock): """Test tagging a course using TagQueryset manager.""" - self.tagQueryset.create = Mock() + self.tag_query_set.create = Mock() course_mock = Mock() opaque_mock = Mock() opaque_objects_mock.get_or_create.return_value = opaque_mock, Mock() @@ -530,9 +530,9 @@ def test_create_tag_with_course(self, opaque_objects_mock): "target_object": course_mock, } - self.tagQueryset.create_tag(**kwargs) + self.tag_query_set.create_tag(**kwargs) - self.tagQueryset.create.called_once_with(target_object=opaque_mock) + self.tag_query_set.create.assert_called_once_with(target_object=opaque_mock) @patch.object(TagQuerySet, '_get_object_for_this_type') def test_find_all_tags_for_course(self, _get_object_for_this_type): @@ -540,16 +540,16 @@ def test_find_all_tags_for_course(self, _get_object_for_this_type): target_type, target_id = "CourseOverview", 1 target, target_ctype = Mock(), Mock() _get_object_for_this_type.return_value = target, target_ctype - self.tagQueryset.filter = Mock() + self.tag_query_set.filter = Mock() target.values_list.return_value = [1] - self.tagQueryset.find_all_tags_for(target_type, target_id) + self.tag_query_set.find_all_tags_for(target_type, target_id) _get_object_for_this_type.assert_called_once_with( "opaquekeyproxymodel", target_id ) - self.tagQueryset.filter.assert_called_once_with( + self.tag_query_set.filter.assert_called_once_with( target_type=target_ctype, target_object_id__in=[1], ) @@ -563,7 +563,7 @@ def test_get_objects_for_type_user(self, content_type_mock): "username": "username", } - self.tagQueryset._get_object_for_this_type( # pylint: disable=protected-access + self.tag_query_set._get_object_for_this_type( # pylint: disable=protected-access object_type, object_id, ) @@ -585,7 +585,7 @@ def test_get_objects_for_type_course(self, content_type_mock): "opaque_key": CourseKey.from_string(self.course_id), } - self.tagQueryset._get_object_for_this_type( # pylint: disable=protected-access + self.tag_query_set._get_object_for_this_type( # pylint: disable=protected-access object_type, object_id, ) @@ -609,7 +609,7 @@ def test_get_objects_for_type_enrollment(self, content_type_mock): "user__username": "username", } - self.tagQueryset._get_object_for_this_type( # pylint: disable=protected-access + self.tag_query_set._get_object_for_this_type( # pylint: disable=protected-access object_type, object_id, ) diff --git a/requirements/base.txt b/requirements/base.txt index a594dc8..8b70e55 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,32 +1,36 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -amqp==5.1.1 +amqp==5.2.0 # via kombu appdirs==1.4.4 # via fs -asgiref==3.6.0 +asgiref==3.7.2 # via django -attrs==22.2.0 +attrs==23.1.0 # via openedx-events -billiard==3.6.4.0 +backports-zoneinfo[tzdata]==0.2.1 + # via + # celery + # kombu +billiard==4.2.0 # via celery -celery==5.2.7 +celery==5.3.6 # via # eox-core # event-tracking -certifi==2022.12.7 +certifi==2023.11.17 # via requests -cffi==1.15.1 +cffi==1.16.0 # via # cryptography # pynacl -charset-normalizer==3.0.1 +charset-normalizer==3.3.2 # via requests -click==8.1.3 +click==8.1.7 # via # celery # click-didyoumean @@ -38,27 +42,27 @@ click-didyoumean==0.3.0 # via celery click-plugins==1.1.1 # via celery -click-repl==0.2.0 +click-repl==0.3.0 # via celery -coreapi==2.3.3 - # via drf-yasg -coreschema==0.0.4 - # via - # coreapi - # drf-yasg -cryptography==39.0.0 +cryptography==41.0.7 # via # jwcrypto # pyjwt -deprecated==1.2.13 + # social-auth-core +defusedxml==0.8.0rc2 + # via + # python3-openid + # social-auth-core +deprecated==1.2.14 # via jwcrypto -django==3.2.17 +django==3.2.23 # via # -c requirements/constraints.txt # django-crum # django-filter # django-model-utils # django-oauth-toolkit + # django-waffle # djangorestframework # drf-jwt # drf-yasg @@ -75,27 +79,27 @@ django-crum==0.7.9 # via # edx-django-utils # edx-proctoring -django-filter==22.1 +django-filter==23.5 # via eox-core -django-ipware==4.0.2 +django-ipware==6.0.3 # via edx-proctoring django-model-utils==4.3.1 # via # edx-proctoring # edx-when -django-oauth-toolkit==2.2.0 +django-oauth-toolkit==2.3.0 # via eox-core django-oauth2-provider==0.2.6.1 # via eox-core -django-simple-history==3.2.0 +django-simple-history==3.4.0 # via edx-proctoring -django-waffle==3.0.0 +django-waffle==4.1.0 # via # edx-django-utils # edx-drf-extensions # edx-proctoring # eox-core -django-webpack-loader==1.8.0 +django-webpack-loader==3.0.0 # via edx-proctoring djangorestframework==3.14.0 # via @@ -107,93 +111,92 @@ djangorestframework==3.14.0 # eox-core drf-jwt==1.19.2 # via edx-drf-extensions -drf-yasg==1.21.4 +drf-yasg==1.21.7 # via edx-api-doc-tools -edx-api-doc-tools==1.6.0 +edx-api-doc-tools==1.7.0 # via eox-core -edx-django-utils==5.2.0 +edx-django-utils==5.9.0 # via # edx-drf-extensions # edx-rest-api-client # edx-when # event-tracking -edx-drf-extensions==8.4.1 +edx-drf-extensions==9.0.1 # via # edx-proctoring # edx-when -edx-opaque-keys[django]==2.3.0 + # eox-core +edx-opaque-keys[django]==2.5.1 # via # edx-drf-extensions + # edx-opaque-keys # edx-proctoring # edx-when # eox-core # openedx-events -edx-proctoring==4.13.3 +edx-proctoring==4.16.1 # via eox-core -edx-rest-api-client==5.5.0 +edx-rest-api-client==5.6.1 # via edx-proctoring -edx-when==2.3.0 +edx-when==2.4.0 # via edx-proctoring -eox-core==8.0.0 +eox-core==9.0.0 # via -r requirements/base.in -event-tracking==2.1.0 +event-tracking==2.2.0 # via edx-proctoring -fastavro==1.7.1 +fastavro==1.9.2 # via openedx-events fs==2.4.16 # via xblock -future==0.18.3 - # via pyjwkest -idna==3.4 +idna==3.6 # via requests inflection==0.5.1 # via drf-yasg -itypes==1.2.0 - # via coreapi -jinja2==3.1.2 - # via coreschema jsonfield==3.1.0 # via edx-proctoring -jwcrypto==1.4.2 +jwcrypto==1.5.1 # via django-oauth-toolkit -kombu==5.2.4 +kombu==5.3.4 # via celery -lxml==4.9.2 +lxml==4.9.4 + # via xblock +mako==1.3.0 # via xblock -markupsafe==2.1.2 +markupsafe==2.1.3 # via - # jinja2 + # mako # xblock -newrelic==7.2.1.168 +newrelic==8.8.0 # via # -c requirements/constraints.txt # edx-django-utils oauthlib==3.2.2 - # via django-oauth-toolkit -openedx-events==0.13.0 + # via + # django-oauth-toolkit + # requests-oauthlib + # social-auth-core +openedx-events==9.2.0 # via eox-core -packaging==23.0 +packaging==23.2 # via drf-yasg -pbr==5.11.1 +pbr==6.0.0 # via stevedore -prompt-toolkit==3.0.36 +prompt-toolkit==3.0.43 # via click-repl -psutil==5.9.4 +psutil==5.9.7 # via edx-django-utils pycparser==2.21 # via cffi -pycryptodomex==3.17 - # via - # edx-proctoring - # pyjwkest -pyjwkest==1.4.2 - # via edx-drf-extensions -pyjwt[crypto]==2.6.0 +pycryptodomex==3.19.0 + # via edx-proctoring +pyjwt[crypto]==2.8.0 # via # drf-jwt # edx-drf-extensions # edx-proctoring # edx-rest-api-client + # pyjwt + # social-auth-core pymongo==3.13.0 # via # edx-opaque-keys @@ -202,75 +205,86 @@ pynacl==1.5.0 # via edx-django-utils python-dateutil==2.8.2 # via - # edx-drf-extensions + # celery # edx-proctoring # xblock -pytz==2022.7.1 +python-ipware==2.0.1 + # via django-ipware +python3-openid==3.2.0 + # via social-auth-core +pytz==2023.3.post1 # via - # celery # django # djangorestframework # drf-yasg # edx-proctoring # event-tracking # xblock -pyyaml==6.0 - # via xblock -requests==2.28.2 +pyyaml==6.0.1 + # via + # drf-yasg + # xblock +requests==2.31.0 # via - # coreapi # django-oauth-toolkit # edx-drf-extensions # edx-rest-api-client - # pyjwkest + # requests-oauthlib # slumber -ruamel-yaml==0.17.21 - # via drf-yasg -ruamel-yaml-clib==0.2.7 - # via ruamel-yaml + # social-auth-core +requests-oauthlib==1.3.1 + # via social-auth-core rules==3.3 # via edx-proctoring semantic-version==2.10.0 # via edx-drf-extensions shortuuid==1.0.11 # via django-oauth2-provider +simplejson==3.19.2 + # via xblock six==1.16.0 # via - # click-repl - # edx-drf-extensions # eox-core # event-tracking # fs - # pyjwkest # python-dateutil slumber==0.7.1 # via edx-rest-api-client -sqlparse==0.4.3 +social-auth-core==4.5.1 + # via eox-core +sqlparse==0.4.4 # via django -stevedore==4.1.1 +stevedore==5.1.0 # via # edx-django-utils # edx-opaque-keys -uritemplate==4.1.1 +typing-extensions==4.9.0 # via - # coreapi - # drf-yasg -urllib3==1.26.14 + # asgiref + # edx-opaque-keys + # kombu +tzdata==2023.3 + # via + # backports-zoneinfo + # celery +uritemplate==4.1.1 + # via drf-yasg +urllib3==2.1.0 # via requests -vine==5.0.0 +vine==5.1.0 # via # amqp # celery # kombu -wcwidth==0.2.6 +wcwidth==0.2.12 # via prompt-toolkit -web-fragments==2.0.0 +web-fragments==2.1.0 # via xblock webob==1.8.7 # via xblock -wrapt==1.14.1 +wrapt==1.16.0 # via deprecated -xblock==1.6.2 +xblock==1.9.0 # via edx-when # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 869e9e5..b6db3b7 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -9,6 +9,6 @@ # linking to it here is good. -# Version used in Maple version of edx-platform +# Version used in Palm version of edx-platform django<=3.3 -newrelic==7.2.1.168 +newrelic==8.8.0 diff --git a/requirements/django.txt b/requirements/django.txt index 332dcc3..d296127 100644 --- a/requirements/django.txt +++ b/requirements/django.txt @@ -1 +1 @@ -django==3.2.17 +django==3.2.23 diff --git a/requirements/docs.txt b/requirements/docs.txt index 9ce7fd8..ecbcc48 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,40 +1,40 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # alabaster==0.7.13 # via sphinx -babel==2.11.0 +babel==2.14.0 # via sphinx -certifi==2022.12.7 +certifi==2023.11.17 # via requests -charset-normalizer==3.0.1 +charset-normalizer==3.3.2 # via requests -docutils==0.19 +docutils==0.20.1 # via sphinx -idna==3.4 +idna==3.6 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==6.0.0 +importlib-metadata==7.0.1 # via sphinx jinja2==3.1.2 # via sphinx -markupsafe==2.1.2 +markupsafe==2.1.3 # via jinja2 -packaging==23.0 +packaging==23.2 # via sphinx -pygments==2.14.0 +pygments==2.17.2 # via sphinx -pytz==2022.7.1 +pytz==2023.3.post1 # via babel -requests==2.28.2 +requests==2.31.0 # via sphinx snowballstemmer==2.2.0 # via sphinx -sphinx==6.1.3 +sphinx==7.1.2 # via -r requirements/docs.in sphinxcontrib-applehelp==1.0.4 # via sphinx @@ -48,7 +48,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -urllib3==1.26.14 +urllib3==2.1.0 # via requests -zipp==3.12.0 +zipp==3.17.0 # via importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index f1cd5e9..0e88226 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,23 +1,30 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -build==0.10.0 +build==1.0.3 # via pip-tools -click==8.1.3 +click==8.1.7 # via pip-tools -packaging==23.0 +importlib-metadata==7.0.1 # via build -pip-tools==6.12.2 +packaging==23.2 + # via build +pip-tools==7.3.0 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via build tomli==2.0.1 - # via build -wheel==0.38.4 + # via + # build + # pip-tools + # pyproject-hooks +wheel==0.42.0 # via pip-tools +zipp==3.17.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/test.in b/requirements/test.in index 83902c3..e82e5ae 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -3,7 +3,8 @@ Django edx-opaque-keys[django] -pylint +# Use palm version for pylint to avoid errors +pylint==2.15.10 pycodestyle coverage django-fake-model diff --git a/requirements/test.txt b/requirements/test.txt index b935636..cf43728 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -amqp==5.1.1 +amqp==5.2.0 # via # -r requirements/base.txt # kombu @@ -12,39 +12,45 @@ appdirs==1.4.4 # via # -r requirements/base.txt # fs -asgiref==3.6.0 +asgiref==3.7.2 # via # -r requirements/base.txt # django -astroid==2.9.3 +astroid==2.13.5 # via pylint -attrs==22.2.0 +attrs==23.1.0 # via # -r requirements/base.txt # openedx-events -billiard==3.6.4.0 +backports-zoneinfo[tzdata]==0.2.1 # via # -r requirements/base.txt + # backports-zoneinfo # celery -celery==5.2.7 + # kombu +billiard==4.2.0 + # via + # -r requirements/base.txt + # celery +celery==5.3.6 # via # -r requirements/base.txt # eox-core # event-tracking -certifi==2021.10.8 +certifi==2023.11.17 # via # -r requirements/base.txt # requests -cffi==1.15.1 +cffi==1.16.0 # via # -r requirements/base.txt # cryptography # pynacl -charset-normalizer==2.0.12 +charset-normalizer==3.3.2 # via # -r requirements/base.txt # requests -click==8.1.3 +click==8.1.7 # via # -r requirements/base.txt # celery @@ -61,31 +67,28 @@ click-plugins==1.1.1 # via # -r requirements/base.txt # celery -click-repl==0.2.0 +click-repl==0.3.0 # via # -r requirements/base.txt # celery -coreapi==2.3.3 - # via - # -r requirements/base.txt - # drf-yasg -coreschema==0.0.4 - # via - # -r requirements/base.txt - # coreapi - # drf-yasg -coverage==6.3.2 +coverage==7.3.4 # via -r requirements/test.in -cryptography==36.0.2 +cryptography==41.0.7 # via # -r requirements/base.txt # jwcrypto # pyjwt -deprecated==1.2.13 + # social-auth-core +defusedxml==0.8.0rc2 + # via + # -r requirements/base.txt + # python3-openid + # social-auth-core +deprecated==1.2.14 # via # -r requirements/base.txt # jwcrypto -dill==0.3.6 +dill==0.3.7 # via pylint # via # -c requirements/constraints.txt @@ -95,6 +98,7 @@ dill==0.3.6 # django-filter # django-model-utils # django-oauth-toolkit + # django-waffle # djangorestframework # drf-jwt # drf-yasg @@ -115,12 +119,12 @@ django-crum==0.7.9 # edx-proctoring django-fake-model==0.1.4 # via -r requirements/test.in -django-filter==21.1 +django-filter==23.5 # via # -r requirements/base.txt # -r requirements/test.in # eox-core -django-ipware==4.0.2 +django-ipware==6.0.3 # via # -r requirements/base.txt # edx-proctoring @@ -129,7 +133,7 @@ django-model-utils==4.3.1 # -r requirements/base.txt # edx-proctoring # edx-when -django-oauth-toolkit==1.7.1 +django-oauth-toolkit==2.3.0 # via # -r requirements/base.txt # eox-core @@ -138,18 +142,18 @@ django-oauth2-provider==0.2.6.1 # -r requirements/base.txt # -r requirements/test.in # eox-core -django-simple-history==3.2.0 +django-simple-history==3.4.0 # via # -r requirements/base.txt # edx-proctoring -django-waffle==2.4.1 +django-waffle==4.1.0 # via # -r requirements/base.txt # edx-django-utils # edx-drf-extensions # edx-proctoring # eox-core -django-webpack-loader==1.8.0 +django-webpack-loader==3.0.0 # via # -r requirements/base.txt # edx-proctoring @@ -168,54 +172,56 @@ drf-jwt==1.19.2 # via # -r requirements/base.txt # edx-drf-extensions -drf-yasg==1.21.4 +drf-yasg==1.21.7 # via # -r requirements/base.txt # edx-api-doc-tools -edx-api-doc-tools==1.6.0 +edx-api-doc-tools==1.7.0 # via # -r requirements/base.txt # eox-core -edx-django-utils==4.6.0 +edx-django-utils==5.9.0 # via # -r requirements/base.txt # edx-drf-extensions # edx-rest-api-client # edx-when # event-tracking -edx-drf-extensions==8.4.1 +edx-drf-extensions==9.0.1 # via # -r requirements/base.txt # edx-proctoring # edx-when -edx-opaque-keys[django]==2.3.0 + # eox-core +edx-opaque-keys[django]==2.5.1 # via # -r requirements/base.txt # -r requirements/test.in # edx-drf-extensions + # edx-opaque-keys # edx-proctoring # edx-when # eox-core # openedx-events -edx-proctoring==4.13.3 +edx-proctoring==4.16.1 # via # -r requirements/base.txt # eox-core -edx-rest-api-client==5.5.0 +edx-rest-api-client==5.6.1 # via # -r requirements/base.txt # edx-proctoring -edx-when==2.3.0 +edx-when==2.4.0 # via # -r requirements/base.txt # edx-proctoring -eox-core==8.0.0 +eox-core==9.0.0 # via -r requirements/base.txt -event-tracking==2.1.0 +event-tracking==2.2.0 # via # -r requirements/base.txt # edx-proctoring -fastavro==1.7.1 +fastavro==1.9.2 # via # -r requirements/base.txt # openedx-events @@ -223,11 +229,7 @@ fs==2.4.16 # via # -r requirements/base.txt # xblock -future==0.18.3 - # via - # -r requirements/base.txt - # pyjwkest -idna==3.4 +idna==3.6 # via # -r requirements/base.txt # requests @@ -235,44 +237,40 @@ inflection==0.5.1 # via # -r requirements/base.txt # drf-yasg -isort==5.12.0 +isort==5.13.2 # via pylint -itypes==1.2.0 - # via - # -r requirements/base.txt - # coreapi -jinja2==3.1.2 - # via - # -r requirements/base.txt - # coreschema jsonfield==3.1.0 # via # -r requirements/base.txt # edx-proctoring -jwcrypto==1.4.2 +jwcrypto==1.5.1 # via # -r requirements/base.txt # django-oauth-toolkit -kombu==5.2.4 +kombu==5.3.4 # via # -r requirements/base.txt # celery -lazy-object-proxy==1.9.0 +lazy-object-proxy==1.10.0 # via astroid -lxml==4.9.2 +lxml==4.9.4 # via # -r requirements/base.txt # xblock -markupsafe==2.1.2 +mako==1.3.0 # via # -r requirements/base.txt - # jinja2 # xblock -mccabe==0.6.1 +markupsafe==2.1.3 + # via + # -r requirements/base.txt + # mako + # xblock +mccabe==0.7.0 # via pylint -mock==4.0.3 +mock==5.1.0 # via -r requirements/test.in -newrelic==7.2.1.168 +newrelic==8.8.0 # via # -c requirements/constraints.txt # -r requirements/base.txt @@ -281,51 +279,50 @@ oauthlib==3.2.2 # via # -r requirements/base.txt # django-oauth-toolkit -openedx-events==0.13.0 + # requests-oauthlib + # social-auth-core +openedx-events==9.2.0 # via # -r requirements/base.txt # eox-core -packaging==23.0 +packaging==23.2 # via # -r requirements/base.txt # drf-yasg -pbr==5.11.1 +pbr==6.0.0 # via # -r requirements/base.txt # stevedore -platformdirs==2.6.2 +platformdirs==4.1.0 # via pylint -prompt-toolkit==3.0.36 +prompt-toolkit==3.0.43 # via # -r requirements/base.txt # click-repl -psutil==5.9.4 +psutil==5.9.7 # via # -r requirements/base.txt # edx-django-utils -pycodestyle==2.10.0 +pycodestyle==2.11.1 # via -r requirements/test.in pycparser==2.21 # via # -r requirements/base.txt # cffi -pycryptodomex==3.17 +pycryptodomex==3.19.0 # via # -r requirements/base.txt # edx-proctoring - # pyjwkest -pyjwkest==1.4.2 - # via - # -r requirements/base.txt - # edx-drf-extensions -pyjwt[crypto]==2.6.0 +pyjwt[crypto]==2.8.0 # via # -r requirements/base.txt # drf-jwt # edx-drf-extensions # edx-proctoring # edx-rest-api-client -pylint==2.12.2 + # pyjwt + # social-auth-core +pylint==2.15.10 # via -r requirements/test.in pymongo==3.13.0 # via @@ -339,40 +336,44 @@ pynacl==1.5.0 python-dateutil==2.8.2 # via # -r requirements/base.txt - # edx-drf-extensions + # celery # edx-proctoring # xblock -pytz==2022.7.1 +python-ipware==2.0.1 + # via + # -r requirements/base.txt + # django-ipware +python3-openid==3.2.0 + # via + # -r requirements/base.txt + # social-auth-core +pytz==2023.3.post1 # via # -r requirements/base.txt - # celery # django # djangorestframework # drf-yasg # edx-proctoring # event-tracking # xblock -pyyaml==6.0 +pyyaml==6.0.1 # via # -r requirements/base.txt + # drf-yasg # xblock -requests==2.28.2 +requests==2.31.0 # via # -r requirements/base.txt - # coreapi # django-oauth-toolkit # edx-drf-extensions # edx-rest-api-client - # pyjwkest + # requests-oauthlib # slumber -ruamel-yaml==0.17.21 - # via - # -r requirements/base.txt - # drf-yasg -ruamel-yaml-clib==0.2.7 + # social-auth-core +requests-oauthlib==1.3.1 # via # -r requirements/base.txt - # ruamel-yaml + # social-auth-core rules==3.3 # via # -r requirements/base.txt @@ -385,57 +386,70 @@ shortuuid==1.0.11 # via # -r requirements/base.txt # django-oauth2-provider +simplejson==3.19.2 + # via + # -r requirements/base.txt + # xblock six==1.16.0 # via # -r requirements/base.txt - # click-repl - # edx-drf-extensions # eox-core # event-tracking # fs - # pyjwkest # python-dateutil slumber==0.7.1 # via # -r requirements/base.txt # edx-rest-api-client -sqlparse==0.4.3 +social-auth-core==4.5.1 + # via + # -r requirements/base.txt + # eox-core +sqlparse==0.4.4 # via # -r requirements/base.txt # django -stevedore==4.1.1 +stevedore==5.1.0 # via # -r requirements/base.txt # edx-django-utils # edx-opaque-keys tomli==2.0.1 # via pylint -tomlkit==0.11.6 +tomlkit==0.12.3 # via pylint -typing-extensions==4.4.0 +typing-extensions==4.9.0 # via + # -r requirements/base.txt + # asgiref # astroid + # edx-opaque-keys + # kombu # pylint +tzdata==2023.3 + # via + # -r requirements/base.txt + # backports-zoneinfo + # celery uritemplate==4.1.1 # via # -r requirements/base.txt - # coreapi # drf-yasg -urllib3==1.26.14 +urllib3==2.1.0 # via # -r requirements/base.txt # requests -vine==5.0.0 +vine==5.1.0 # via # -r requirements/base.txt # amqp # celery # kombu -wcwidth==0.2.6 +wcwidth==0.2.12 # via # -r requirements/base.txt # prompt-toolkit -web-fragments==2.0.0 +web-fragments==2.1.0 # via # -r requirements/base.txt # xblock @@ -443,12 +457,12 @@ webob==1.8.7 # via # -r requirements/base.txt # xblock -wrapt==1.11.2 +wrapt==1.16.0 # via # -r requirements/base.txt # astroid # deprecated -xblock==1.6.2 +xblock==1.9.0 # via # -r requirements/base.txt # edx-when diff --git a/requirements/tox.txt b/requirements/tox.txt index ec76bed..58a57dd 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -1,38 +1,38 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -cachetools==5.3.0 +cachetools==5.3.2 # via tox -chardet==5.1.0 +chardet==5.2.0 # via tox colorama==0.4.6 # via tox -distlib==0.3.6 +distlib==0.3.8 # via virtualenv -filelock==3.9.0 +filelock==3.13.1 # via # tox # virtualenv -packaging==23.0 +packaging==23.2 # via # pyproject-api # tox -platformdirs==2.6.2 +platformdirs==4.1.0 # via # tox # virtualenv -pluggy==1.0.0 +pluggy==1.3.0 # via tox -pyproject-api==1.5.0 +pyproject-api==1.6.1 # via tox tomli==2.0.1 # via # pyproject-api # tox -tox==4.4.4 +tox==4.11.4 # via -r requirements/tox.in -virtualenv==20.17.1 +virtualenv==20.25.0 # via tox diff --git a/setup.cfg b/setup.cfg index e25c05c..7a56f3d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,6 +23,12 @@ statistics = True [pylint] ignore = migrations,CVS +[pylint.FORMAT] +max-line-length = 120 + +[pylint.messages_control] +disable = raise-missing-from, fixme, too-many-public-methods, too-few-public-methods + [MESSAGES CONTROL] enable = line-too-long,