From c9933297af83d6d750311f73f60058d9a7e03839 Mon Sep 17 00:00:00 2001 From: Daniela Rus Morales <157103+danirus@users.noreply.github.com> Date: Tue, 30 Jan 2024 15:57:27 +0100 Subject: [PATCH] Update dependencies, specially Django to v5 (#56) --- .github/workflows/ci-pipeline.yml | 20 +- Makefile | 24 +- coverage.svg | 6 +- django_comments_ink/__init__.py | 2 +- django_comments_ink/api/serializers.py | 4 +- django_comments_ink/models.py | 1 + django_comments_ink/paginator.py | 1 + django_comments_ink/signals.py | 1 + django_comments_ink/signed.py | 1 + .../tests/pytest_fixtures/base.py | 10 - django_comments_ink/tests/test_signed.py | 1 + .../tests/test_templatetags.py | 30 +- django_comments_ink/views/commenting.py | 4 +- pyproject.toml | 3 +- requirements-dev.in | 9 - requirements-dev.txt | 320 +----------------- requirements-tests.in | 5 - requirements-tests.txt | 72 +--- requirements.in | 3 - requirements.txt | 36 +- setup.py | 2 +- tox.ini | 12 +- 22 files changed, 65 insertions(+), 502 deletions(-) delete mode 100644 requirements-dev.in delete mode 100644 requirements-tests.in delete mode 100644 requirements.in diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 2eb4f6e..ea6b531 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -13,7 +13,7 @@ jobs: - name: Python setup uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.12' - name: Install test dependencies run: pip install -r requirements-tests.txt - name: Check syntax with black @@ -23,28 +23,28 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - django: ["3.2", "4.0", "4.1"] + django: ["4.1", "4.2", "5.0"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Python setup - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' - name: Install tox and django run: pip install tox "django==${{ matrix.django }}" - name: Run unit tests - run: tox -e py3.10-django${{ matrix.django }} + run: tox -e py3.12-django${{ matrix.django }} javascript: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: - node-version: '14' + node-version: '18' - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} diff --git a/Makefile b/Makefile index 3d4254d..7e59920 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .DEFAULT_GOAL := help -.PHONY: coverage help tox syntax-check syntax-format pip-compile pip-install +.PHONY: coverage help coverage: ## Run tests with coverage. coverage erase @@ -9,28 +9,6 @@ coverage: ## Run tests with coverage. coverage report -m @sh ./ccsvg.sh ||: -syntax-check: ## Check syntax code (isort and black). - black --check django_comments_ink - -syntax-format: ## Format syntax code (isort and black). - black django_comments_ink - -tox: ## Run tox. - python -m tox - -pip-compile: ## Generate requirements.txt and requirements-dev.txt files. - python -c "import piptools" > /dev/null 2>&1 || pip install pip-tools - pip-compile --generate-hashes --allow-unsafe \ - --output-file requirements.txt requirements.in - pip-compile --allow-unsafe \ - --output-file requirements-tests.txt requirements-tests.in - pip-compile --generate-hashes --allow-unsafe \ - --output-file requirements-dev.txt requirements-dev.in - -pip-install: ## Install dependencies listed in requirements-dev.txt. - pip install -r requirements.txt - pip install -r requirements-dev.txt - help: ## Show help message @IFS=$$'\n' ; \ help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \ diff --git a/coverage.svg b/coverage.svg index fe06143..3438732 100644 --- a/coverage.svg +++ b/coverage.svg @@ -9,13 +9,13 @@ - + coverage coverage - 94% - 94% + 97% + 97% diff --git a/django_comments_ink/__init__.py b/django_comments_ink/__init__.py index 4a17c0a..14a832d 100644 --- a/django_comments_ink/__init__.py +++ b/django_comments_ink/__init__.py @@ -32,7 +32,7 @@ def get_form_target(): return reverse("comments-ink-post") -VERSION = (0, 3, 0, "f", 0) # following PEP 440 +VERSION = (0, 4, 0, "f", 0) # following PEP 440 def get_version(): diff --git a/django_comments_ink/api/serializers.py b/django_comments_ink/api/serializers.py index 086b134..83e94f8 100644 --- a/django_comments_ink/api/serializers.py +++ b/django_comments_ink/api/serializers.py @@ -138,7 +138,7 @@ def validate(self, data): sender=target.__class__, comment=target, request=self.request ) - for (receiver, response) in responses: + for receiver, response in responses: if response is True: # A positive response indicates that the POST request # must be trusted. So inject the CommentSecurityForm values @@ -183,7 +183,7 @@ def save(self): responses = comment_will_be_posted.send( sender=TmpInkComment, comment=resp["comment"], request=self.request ) - for (receiver, response) in responses: + for receiver, response in responses: if response is False: resp["code"] = 403 # Rejected. return resp diff --git a/django_comments_ink/models.py b/django_comments_ink/models.py index 802ebbf..136f034 100644 --- a/django_comments_ink/models.py +++ b/django_comments_ink/models.py @@ -453,6 +453,7 @@ def on_comment_vote_deleted(sender, instance, using, **kwargs): post_delete.connect(on_comment_vote_deleted, sender=CommentVote) + # ---------------------------------------------------------------------- class BlackListedDomain(models.Model): """ diff --git a/django_comments_ink/paginator.py b/django_comments_ink/paginator.py index 704b474..266d8a8 100644 --- a/django_comments_ink/paginator.py +++ b/django_comments_ink/paginator.py @@ -57,6 +57,7 @@ per_page + orphans, so the 2nd page will contain 18 comments. """ + import logging from django.apps import apps diff --git a/django_comments_ink/signals.py b/django_comments_ink/signals.py index f74223d..ecec3e8 100644 --- a/django_comments_ink/signals.py +++ b/django_comments_ink/signals.py @@ -1,6 +1,7 @@ """ Signals relating to django-comments-ink. """ + from django.dispatch import Signal diff --git a/django_comments_ink/signed.py b/django_comments_ink/signed.py index 1cb4740..2ec6c02 100644 --- a/django_comments_ink/signed.py +++ b/django_comments_ink/signed.py @@ -36,6 +36,7 @@ There are 65 url-safe characters: the 64 used by url-safe base64 and the '.'. These functions make use of all of them. """ + from __future__ import unicode_literals import base64 diff --git a/django_comments_ink/tests/pytest_fixtures/base.py b/django_comments_ink/tests/pytest_fixtures/base.py index 9d32d89..cf87992 100644 --- a/django_comments_ink/tests/pytest_fixtures/base.py +++ b/django_comments_ink/tests/pytest_fixtures/base.py @@ -17,7 +17,6 @@ from django_comments_ink.tests.models import Article, Diary -@pytest.mark.django_db @pytest.fixture def an_article(): """Creates an article that can receive comments.""" @@ -28,7 +27,6 @@ def an_article(): article.delete() -@pytest.mark.django_db @pytest.fixture def a_diary_entry(): """Creates a diary entry that can receive comments.""" @@ -37,7 +35,6 @@ def a_diary_entry(): entry.delete() -@pytest.mark.django_db @pytest.fixture def an_articles_comment(an_article): """Send a comment to the article.""" @@ -55,7 +52,6 @@ def an_articles_comment(an_article): comment.delete() -@pytest.mark.django_db @pytest.fixture def an_user(): """Add a user to the DB.""" @@ -66,7 +62,6 @@ def an_user(): user.delete() -@pytest.mark.django_db @pytest.fixture def an_user_2(): """Add a user2 to the DB.""" @@ -81,7 +76,6 @@ def an_user_2(): user2.delete() -@pytest.mark.django_db @pytest.fixture def a_comments_reaction(an_articles_comment, an_user): """Send a comment reaction to a comment.""" @@ -95,7 +89,6 @@ def a_comments_reaction(an_articles_comment, an_user): cmr.delete() -@pytest.mark.django_db @pytest.fixture def a_comments_reaction_2(an_user_2, a_comments_reaction): """Send another comment reaction to a comment.""" @@ -105,7 +98,6 @@ def a_comments_reaction_2(an_user_2, a_comments_reaction): return a_comments_reaction -@pytest.mark.django_db @pytest.fixture def a_comments_flag(an_articles_comment, an_user): """Send a CommentFlag.SUGGEST_REMOVAL flag to a comment.""" @@ -118,7 +110,6 @@ def a_comments_flag(an_articles_comment, an_user): comment_flag.delete() -@pytest.mark.django_db @pytest.fixture def an_object_reaction(a_diary_entry, an_user): """Send an object reaction to a diary entry.""" @@ -138,7 +129,6 @@ def an_object_reaction(a_diary_entry, an_user): objr.delete() -@pytest.mark.django_db @pytest.fixture def an_object_reaction_2(an_user_2, an_object_reaction): """Send another object reaction to a diary entry.""" diff --git a/django_comments_ink/tests/test_signed.py b/django_comments_ink/tests/test_signed.py index 8c499e6..f9001b7 100644 --- a/django_comments_ink/tests/test_signed.py +++ b/django_comments_ink/tests/test_signed.py @@ -2,6 +2,7 @@ Tests borrowed from Simon Willison's Django-OpenID project: * https://github.com/simonw/django-openid """ + import pytest from django.conf import settings from django_comments_ink import signed diff --git a/django_comments_ink/tests/test_templatetags.py b/django_comments_ink/tests/test_templatetags.py index 2cd0c1c..b316374 100644 --- a/django_comments_ink/tests/test_templatetags.py +++ b/django_comments_ink/tests/test_templatetags.py @@ -1,10 +1,10 @@ import collections from datetime import datetime -import importlib import json import re from unittest.mock import patch +import django import pytest from django.contrib.auth.models import AnonymousUser from django.contrib.contenttypes.models import ContentType @@ -26,7 +26,6 @@ from django_comments_ink.conf import settings from django_comments_ink.models import ( InkComment, - ObjectReaction, publish_or_withhold_on_pre_save, ) from django_comments_ink.templatetags import comments_ink @@ -1343,14 +1342,25 @@ def check_form_fields_in_output(output): assert match != None # Check field 'email': - match = re.search( - ( - r'' - ), - output, - ) - assert match != None + if django.VERSION[0] == 5: + match = re.search( + ( + r'' + ), + output, + ) + assert match != None + else: + match = re.search( + ( + r'' + ), + output, + ) + assert match != None # Check field 'url': match = re.search( diff --git a/django_comments_ink/views/commenting.py b/django_comments_ink/views/commenting.py index f198c8e..13d4a66 100644 --- a/django_comments_ink/views/commenting.py +++ b/django_comments_ink/views/commenting.py @@ -216,7 +216,7 @@ def confirm( sender=TmpInkComment, comment=tmp_comment, request=request ) # Check whether a signal receiver decides to discard the comment. - for (receiver, response) in responses: + for receiver, response in responses: if response is False: return render(request, template_discarded, {"comment": tmp_comment}) @@ -420,7 +420,7 @@ def create_comment(self, form): sender=comment.__class__, comment=comment, request=self.request ) - for (receiver, response) in responses: + for receiver, response in responses: if response is False: msg = ( "comment_will_be_posted receiver %r killed the comment" diff --git a/pyproject.toml b/pyproject.toml index 3059d1e..af16134 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=60.2.0", "wheel"] +requires = ["setuptools>=69.0.3", "wheel"] build-backend = "setuptools.build_meta" [tool.coverage.report] @@ -12,7 +12,6 @@ exclude_lines = [ [tool.black] line-length = 80 -extend-exclude = '''pqenv|psenv''' [tool.pytest] addopts = "--create-db" diff --git a/requirements-dev.in b/requirements-dev.in deleted file mode 100644 index 189fd15..0000000 --- a/requirements-dev.in +++ /dev/null @@ -1,9 +0,0 @@ -black>=22.3,<22.4 -coverage>=6.3,<6.4 -coverage-badge>=1.1,<1.2 -ipython>=8.2,<8.3 -ipdb>=0.13,<0.14 -pre-commit>=2.17,<2.18 -pytest>=7.1,<7.2 -pytest-django>=4.5,<4.6 -tox>=3.24,<3.25 diff --git a/requirements-dev.txt b/requirements-dev.txt index c6b3337..4ff445f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,317 +1,5 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements-dev.txt requirements-dev.in -# -appnope==0.1.2 \ - --hash=sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442 \ - --hash=sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a - # via ipython -asttokens==2.0.5 \ - --hash=sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c \ - --hash=sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5 - # via stack-data -attrs==21.4.0 \ - --hash=sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4 \ - --hash=sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd - # via pytest -backcall==0.2.0 \ - --hash=sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e \ - --hash=sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255 - # via ipython -black==22.3.0 \ - --hash=sha256:06f9d8846f2340dfac80ceb20200ea5d1b3f181dd0556b47af4e8e0b24fa0a6b \ - --hash=sha256:10dbe6e6d2988049b4655b2b739f98785a884d4d6b85bc35133a8fb9a2233176 \ - --hash=sha256:2497f9c2386572e28921fa8bec7be3e51de6801f7459dffd6e62492531c47e09 \ - --hash=sha256:30d78ba6bf080eeaf0b7b875d924b15cd46fec5fd044ddfbad38c8ea9171043a \ - --hash=sha256:328efc0cc70ccb23429d6be184a15ce613f676bdfc85e5fe8ea2a9354b4e9015 \ - --hash=sha256:35020b8886c022ced9282b51b5a875b6d1ab0c387b31a065b84db7c33085ca79 \ - --hash=sha256:5795a0375eb87bfe902e80e0c8cfaedf8af4d49694d69161e5bd3206c18618bb \ - --hash=sha256:5891ef8abc06576985de8fa88e95ab70641de6c1fca97e2a15820a9b69e51b20 \ - --hash=sha256:637a4014c63fbf42a692d22b55d8ad6968a946b4a6ebc385c5505d9625b6a464 \ - --hash=sha256:67c8301ec94e3bcc8906740fe071391bce40a862b7be0b86fb5382beefecd968 \ - --hash=sha256:6d2fc92002d44746d3e7db7cf9313cf4452f43e9ea77a2c939defce3b10b5c82 \ - --hash=sha256:6ee227b696ca60dd1c507be80a6bc849a5a6ab57ac7352aad1ffec9e8b805f21 \ - --hash=sha256:863714200ada56cbc366dc9ae5291ceb936573155f8bf8e9de92aef51f3ad0f0 \ - --hash=sha256:9b542ced1ec0ceeff5b37d69838106a6348e60db7b8fdd245294dc1d26136265 \ - --hash=sha256:a6342964b43a99dbc72f72812bf88cad8f0217ae9acb47c0d4f141a6416d2d7b \ - --hash=sha256:ad4efa5fad66b903b4a5f96d91461d90b9507a812b3c5de657d544215bb7877a \ - --hash=sha256:bc58025940a896d7e5356952228b68f793cf5fcb342be703c3a2669a1488cb72 \ - --hash=sha256:cc1e1de68c8e5444e8f94c3670bb48a2beef0e91dddfd4fcc29595ebd90bb9ce \ - --hash=sha256:cee3e11161dde1b2a33a904b850b0899e0424cc331b7295f2a9698e79f9a69a0 \ - --hash=sha256:e3556168e2e5c49629f7b0f377070240bd5511e45e25a4497bb0073d9dda776a \ - --hash=sha256:e8477ec6bbfe0312c128e74644ac8a02ca06bcdb8982d4ee06f209be28cdf163 \ - --hash=sha256:ee8f1f7228cce7dffc2b464f07ce769f478968bfb3dd1254a4c2eeed84928aad \ - --hash=sha256:fd57160949179ec517d32ac2ac898b5f20d68ed1a9c977346efbac9c2f1e779d - # via -r requirements-dev.in -cfgv==3.3.1 \ - --hash=sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426 \ - --hash=sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736 - # via pre-commit -click==8.1.1 \ - --hash=sha256:5e0d195c2067da3136efb897449ec1e9e6c98282fbf30d7f9e164af9be901a6b \ - --hash=sha256:7ab900e38149c9872376e8f9b5986ddcaf68c0f413cf73678a0bca5547e6f976 - # via black -coverage==6.3.2 \ - --hash=sha256:03e2a7826086b91ef345ff18742ee9fc47a6839ccd517061ef8fa1976e652ce9 \ - --hash=sha256:07e6db90cd9686c767dcc593dff16c8c09f9814f5e9c51034066cad3373b914d \ - --hash=sha256:18d520c6860515a771708937d2f78f63cc47ab3b80cb78e86573b0a760161faf \ - --hash=sha256:1ebf730d2381158ecf3dfd4453fbca0613e16eaa547b4170e2450c9707665ce7 \ - --hash=sha256:21b7745788866028adeb1e0eca3bf1101109e2dc58456cb49d2d9b99a8c516e6 \ - --hash=sha256:26e2deacd414fc2f97dd9f7676ee3eaecd299ca751412d89f40bc01557a6b1b4 \ - --hash=sha256:2c6dbb42f3ad25760010c45191e9757e7dce981cbfb90e42feef301d71540059 \ - --hash=sha256:2fea046bfb455510e05be95e879f0e768d45c10c11509e20e06d8fcaa31d9e39 \ - --hash=sha256:34626a7eee2a3da12af0507780bb51eb52dca0e1751fd1471d0810539cefb536 \ - --hash=sha256:37d1141ad6b2466a7b53a22e08fe76994c2d35a5b6b469590424a9953155afac \ - --hash=sha256:46191097ebc381fbf89bdce207a6c107ac4ec0890d8d20f3360345ff5976155c \ - --hash=sha256:4dd8bafa458b5c7d061540f1ee9f18025a68e2d8471b3e858a9dad47c8d41903 \ - --hash=sha256:4e21876082ed887baed0146fe222f861b5815455ada3b33b890f4105d806128d \ - --hash=sha256:58303469e9a272b4abdb9e302a780072c0633cdcc0165db7eec0f9e32f901e05 \ - --hash=sha256:5ca5aeb4344b30d0bec47481536b8ba1181d50dbe783b0e4ad03c95dc1296684 \ - --hash=sha256:68353fe7cdf91f109fc7d474461b46e7f1f14e533e911a2a2cbb8b0fc8613cf1 \ - --hash=sha256:6f89d05e028d274ce4fa1a86887b071ae1755082ef94a6740238cd7a8178804f \ - --hash=sha256:7a15dc0a14008f1da3d1ebd44bdda3e357dbabdf5a0b5034d38fcde0b5c234b7 \ - --hash=sha256:8bdde1177f2311ee552f47ae6e5aa7750c0e3291ca6b75f71f7ffe1f1dab3dca \ - --hash=sha256:8ce257cac556cb03be4a248d92ed36904a59a4a5ff55a994e92214cde15c5bad \ - --hash=sha256:8cf5cfcb1521dc3255d845d9dca3ff204b3229401994ef8d1984b32746bb45ca \ - --hash=sha256:8fbbdc8d55990eac1b0919ca69eb5a988a802b854488c34b8f37f3e2025fa90d \ - --hash=sha256:9548f10d8be799551eb3a9c74bbf2b4934ddb330e08a73320123c07f95cc2d92 \ - --hash=sha256:96f8a1cb43ca1422f36492bebe63312d396491a9165ed3b9231e778d43a7fca4 \ - --hash=sha256:9b27d894748475fa858f9597c0ee1d4829f44683f3813633aaf94b19cb5453cf \ - --hash=sha256:9baff2a45ae1f17c8078452e9e5962e518eab705e50a0aa8083733ea7d45f3a6 \ - --hash=sha256:a2a8b8bcc399edb4347a5ca8b9b87e7524c0967b335fbb08a83c8421489ddee1 \ - --hash=sha256:acf53bc2cf7282ab9b8ba346746afe703474004d9e566ad164c91a7a59f188a4 \ - --hash=sha256:b0be84e5a6209858a1d3e8d1806c46214e867ce1b0fd32e4ea03f4bd8b2e3359 \ - --hash=sha256:b31651d018b23ec463e95cf10070d0b2c548aa950a03d0b559eaa11c7e5a6fa3 \ - --hash=sha256:b78e5afb39941572209f71866aa0b206c12f0109835aa0d601e41552f9b3e620 \ - --hash=sha256:c76aeef1b95aff3905fb2ae2d96e319caca5b76fa41d3470b19d4e4a3a313512 \ - --hash=sha256:dd035edafefee4d573140a76fdc785dc38829fe5a455c4bb12bac8c20cfc3d69 \ - --hash=sha256:dd6fe30bd519694b356cbfcaca9bd5c1737cddd20778c6a581ae20dc8c04def2 \ - --hash=sha256:e5f4e1edcf57ce94e5475fe09e5afa3e3145081318e5fd1a43a6b4539a97e518 \ - --hash=sha256:ec6bc7fe73a938933d4178c9b23c4e0568e43e220aef9472c4f6044bfc6dd0f0 \ - --hash=sha256:f1555ea6d6da108e1999b2463ea1003fe03f29213e459145e70edbaf3e004aaa \ - --hash=sha256:f5fa5803f47e095d7ad8443d28b01d48c0359484fec1b9d8606d0e3282084bc4 \ - --hash=sha256:f7331dbf301b7289013175087636bbaf5b2405e57259dd2c42fdcc9fcc47325e \ - --hash=sha256:f9987b0354b06d4df0f4d3e0ec1ae76d7ce7cbca9a2f98c25041eb79eec766f1 \ - --hash=sha256:fd9e830e9d8d89b20ab1e5af09b32d33e1a08ef4c4e14411e559556fd788e6b2 - # via - # -r requirements-dev.in - # coverage-badge -coverage-badge==1.1.0 \ - --hash=sha256:c824a106503e981c02821e7d32f008fb3984b2338aa8c3800ec9357e33345b78 \ - --hash=sha256:e365d56e5202e923d1b237f82defd628a02d1d645a147f867ac85c58c81d7997 - # via -r requirements-dev.in -decorator==5.1.1 \ - --hash=sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330 \ - --hash=sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186 - # via - # ipdb - # ipython -distlib==0.3.4 \ - --hash=sha256:6564fe0a8f51e734df6333d08b8b94d4ea8ee6b99b5ed50613f731fd4089f34b \ - --hash=sha256:e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579 - # via virtualenv -executing==0.8.3 \ - --hash=sha256:c6554e21c6b060590a6d3be4b82fb78f8f0194d809de5ea7df1c093763311501 \ - --hash=sha256:d1eef132db1b83649a3905ca6dd8897f71ac6f8cac79a7e58a1a09cf137546c9 - # via stack-data -filelock==3.6.0 \ - --hash=sha256:9cd540a9352e432c7246a48fe4e8712b10acb1df2ad1f30e8c070b82ae1fed85 \ - --hash=sha256:f8314284bfffbdcfa0ff3d7992b023d4c628ced6feb957351d4c48d059f56bc0 - # via - # tox - # virtualenv -identify==2.4.12 \ - --hash=sha256:3f3244a559290e7d3deb9e9adc7b33594c1bc85a9dd82e0f1be519bf12a1ec17 \ - --hash=sha256:5f06b14366bd1facb88b00540a1de05b69b310cbc2654db3c7e07fa3a4339323 - # via pre-commit -iniconfig==1.1.1 \ - --hash=sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3 \ - --hash=sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32 - # via pytest -ipdb==0.13.9 \ - --hash=sha256:951bd9a64731c444fd907a5ce268543020086a697f6be08f7cc2c9a752a278c5 - # via -r requirements-dev.in -ipython==8.2.0 \ - --hash=sha256:1b672bfd7a48d87ab203d9af8727a3b0174a4566b4091e9447c22fb63ea32857 \ - --hash=sha256:70e5eb132cac594a34b5f799bd252589009905f05104728aea6a403ec2519dc1 - # via - # -r requirements-dev.in - # ipdb -jedi==0.18.1 \ - --hash=sha256:637c9635fcf47945ceb91cd7f320234a7be540ded6f3e99a50cb6febdfd1ba8d \ - --hash=sha256:74137626a64a99c8eb6ae5832d99b3bdd7d29a3850fe2aa80a4126b2a7d949ab - # via ipython -matplotlib-inline==0.1.3 \ - --hash=sha256:a04bfba22e0d1395479f866853ec1ee28eea1485c1d69a6faf00dc3e24ff34ee \ - --hash=sha256:aed605ba3b72462d64d475a21a9296f400a19c4f74a31b59103d2a99ffd5aa5c - # via ipython -mypy-extensions==0.4.3 \ - --hash=sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d \ - --hash=sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8 - # via black -nodeenv==1.6.0 \ - --hash=sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b \ - --hash=sha256:621e6b7076565ddcacd2db0294c0381e01fd28945ab36bcf00f41c5daf63bef7 - # via pre-commit -packaging==21.3 \ - --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ - --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 - # via - # pytest - # tox -parso==0.8.3 \ - --hash=sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0 \ - --hash=sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75 - # via jedi -pathspec==0.9.0 \ - --hash=sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a \ - --hash=sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1 - # via black -pexpect==4.8.0 \ - --hash=sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937 \ - --hash=sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c - # via ipython -pickleshare==0.7.5 \ - --hash=sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca \ - --hash=sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56 - # via ipython -platformdirs==2.5.1 \ - --hash=sha256:7535e70dfa32e84d4b34996ea99c5e432fa29a708d0f4e394bbcb2a8faa4f16d \ - --hash=sha256:bcae7cab893c2d310a711b70b24efb93334febe65f8de776ee320b517471e227 - # via - # black - # virtualenv -pluggy==1.0.0 \ - --hash=sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159 \ - --hash=sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3 - # via - # pytest - # tox -pre-commit==2.17.0 \ - --hash=sha256:725fa7459782d7bec5ead072810e47351de01709be838c2ce1726b9591dad616 \ - --hash=sha256:c1a8040ff15ad3d648c70cc3e55b93e4d2d5b687320955505587fd79bbaed06a - # via -r requirements-dev.in -prompt-toolkit==3.0.28 \ - --hash=sha256:30129d870dcb0b3b6a53efdc9d0a83ea96162ffd28ffe077e94215b233dc670c \ - --hash=sha256:9f1cd16b1e86c2968f2519d7fb31dd9d669916f515612c269d14e9ed52b51650 - # via ipython -ptyprocess==0.7.0 \ - --hash=sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35 \ - --hash=sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220 - # via pexpect -pure-eval==0.2.2 \ - --hash=sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350 \ - --hash=sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3 - # via stack-data -py==1.11.0 \ - --hash=sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719 \ - --hash=sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378 - # via - # pytest - # tox -pygments==2.11.2 \ - --hash=sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65 \ - --hash=sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a - # via ipython -pyparsing==3.0.7 \ - --hash=sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea \ - --hash=sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484 - # via packaging -pytest==7.1.1 \ - --hash=sha256:841132caef6b1ad17a9afde46dc4f6cfa59a05f9555aae5151f73bdf2820ca63 \ - --hash=sha256:92f723789a8fdd7180b6b06483874feca4c48a5c76968e03bb3e7f806a1869ea - # via - # -r requirements-dev.in - # pytest-django -pytest-django==4.5.2 \ - --hash=sha256:c60834861933773109334fe5a53e83d1ef4828f2203a1d6a0fa9972f4f75ab3e \ - --hash=sha256:d9076f759bb7c36939dbdd5ae6633c18edfc2902d1a69fdbefd2426b970ce6c2 - # via -r requirements-dev.in -pyyaml==6.0 \ - --hash=sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293 \ - --hash=sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b \ - --hash=sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57 \ - --hash=sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b \ - --hash=sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4 \ - --hash=sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07 \ - --hash=sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba \ - --hash=sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9 \ - --hash=sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287 \ - --hash=sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513 \ - --hash=sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0 \ - --hash=sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0 \ - --hash=sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92 \ - --hash=sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f \ - --hash=sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2 \ - --hash=sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc \ - --hash=sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c \ - --hash=sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86 \ - --hash=sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4 \ - --hash=sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c \ - --hash=sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34 \ - --hash=sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b \ - --hash=sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c \ - --hash=sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb \ - --hash=sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737 \ - --hash=sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3 \ - --hash=sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d \ - --hash=sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53 \ - --hash=sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78 \ - --hash=sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803 \ - --hash=sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a \ - --hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \ - --hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5 - # via pre-commit -six==1.16.0 \ - --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ - --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 - # via - # tox - # virtualenv -stack-data==0.2.0 \ - --hash=sha256:45692d41bd633a9503a5195552df22b583caf16f0b27c4e58c98d88c8b648e12 \ - --hash=sha256:999762f9c3132308789affa03e9271bbbe947bf78311851f4d485d8402ed858e - # via ipython -toml==0.10.2 \ - --hash=sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b \ - --hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f - # via - # ipdb - # pre-commit - # tox -tomli==2.0.1 \ - --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ - --hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f - # via - # black - # pytest -tox==3.24.5 \ - --hash=sha256:67e0e32c90e278251fea45b696d0fef3879089ccbe979b0c556d35d5a70e2993 \ - --hash=sha256:be3362472a33094bce26727f5f771ca0facf6dafa217f65875314e9a6600c95c - # via -r requirements-dev.in -traitlets==5.1.1 \ - --hash=sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7 \ - --hash=sha256:2d313cc50a42cd6c277e7d7dc8d4d7fedd06a2c215f78766ae7b1a66277e0033 - # via - # ipython - # matplotlib-inline -virtualenv==20.14.0 \ - --hash=sha256:1e8588f35e8b42c6ec6841a13c5e88239de1e6e4e4cedfd3916b306dc826ec66 \ - --hash=sha256:8e5b402037287126e81ccde9432b95a8be5b19d36584f64957060a3488c11ca8 - # via - # pre-commit - # tox -wcwidth==0.2.5 \ - --hash=sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784 \ - --hash=sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83 - # via prompt-toolkit +-r requirements-tests.txt -# The following packages are considered to be unsafe in a requirements file: -setuptools==61.2.0 \ - --hash=sha256:8f4813dd6a4d6cc17bde85fb2e635fe19763f96efbb0ddf5575562e5ee0bc47a \ - --hash=sha256:c3d4e2ab578fbf83775755cd76dae73627915a22832cf4ea5de895978767833b - # via - # ipdb - # ipython +ipython>=8.20.0,<8.21 +ipdb>=0.13,<0.14 +pre-commit>=3.6.0,<3.7 diff --git a/requirements-tests.in b/requirements-tests.in deleted file mode 100644 index 78a9e56..0000000 --- a/requirements-tests.in +++ /dev/null @@ -1,5 +0,0 @@ -black>=22.3,<22.4 -coverage>=6.3,<6.4 -pytest>=7.1,<7.2 -pytest-django>=4.5,<4.6 -tox>=3.24,<3.25 diff --git a/requirements-tests.txt b/requirements-tests.txt index d5b53df..29ee3cb 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,64 +1,8 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile --allow-unsafe --output-file=requirements-tests.txt requirements-tests.in -# -attrs==21.4.0 - # via pytest -black==22.3.0 - # via -r requirements-tests.in -click==8.1.2 - # via black -coverage==6.3.2 - # via -r requirements-tests.in -distlib==0.3.4 - # via virtualenv -filelock==3.6.0 - # via - # tox - # virtualenv -iniconfig==1.1.1 - # via pytest -mypy-extensions==0.4.3 - # via black -packaging==21.3 - # via - # pytest - # tox -pathspec==0.9.0 - # via black -platformdirs==2.5.1 - # via - # black - # virtualenv -pluggy==1.0.0 - # via - # pytest - # tox -py==1.11.0 - # via - # pytest - # tox -pyparsing==3.0.7 - # via packaging -pytest==7.1.1 - # via - # -r requirements-tests.in - # pytest-django -pytest-django==4.5.2 - # via -r requirements-tests.in -six==1.16.0 - # via - # tox - # virtualenv -toml==0.10.2 - # via tox -tomli==2.0.1 - # via - # black - # pytest -tox==3.24.5 - # via -r requirements-tests.in -virtualenv==20.14.0 - # via tox +-r requirements.txt + +black>=24.1.1,<24.2 +coverage>=7.4.1,<7.5 +coverage-badge>=1.1,<1.2 +pytest>=8.0.0,<8.1 +pytest-django>=4.8.0,<4.9 +tox>=4.12.1,<4.13 diff --git a/requirements.in b/requirements.in deleted file mode 100644 index 623f1e9..0000000 --- a/requirements.in +++ /dev/null @@ -1,3 +0,0 @@ -django>=3.1,<5 -django-contrib-comments>=2.2,<2.3 -djangorestframework>=3.13,<3.14 diff --git a/requirements.txt b/requirements.txt index 6f7e461..92ea15e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,33 +1,3 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements.txt requirements.in -# -asgiref==3.5.0 \ - --hash=sha256:2f8abc20f7248433085eda803936d98992f1343ddb022065779f37c5da0181d0 \ - --hash=sha256:88d59c13d634dcffe0510be048210188edd79aeccb6a6c9028cdad6f31d730a9 - # via django -django==4.0.3 \ - --hash=sha256:1239218849e922033a35d2a2f777cb8bee18bd725416744074f455f34ff50d0c \ - --hash=sha256:77ff2e7050e3324c9b67e29b6707754566f58514112a9ac73310f60cd5261930 - # via - # -r requirements.in - # django-contrib-comments - # djangorestframework -django-contrib-comments==2.2.0 \ - --hash=sha256:2ca79060bbc8fc5b636981ef6e50f35ab83649af75fc1be47bf770636be3271c \ - --hash=sha256:48de00f15677e016a216aeff205d6e00e4391c9a5702136c64119c472b7356da - # via -r requirements.in -djangorestframework==3.13.1 \ - --hash=sha256:0c33407ce23acc68eca2a6e46424b008c9c02eceb8cf18581921d0092bc1f2ee \ - --hash=sha256:24c4bf58ed7e85d1fe4ba250ab2da926d263cd57d64b03e8dcef0ac683f8b1aa - # via -r requirements.in -pytz==2022.1 \ - --hash=sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7 \ - --hash=sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c - # via djangorestframework -sqlparse==0.4.2 \ - --hash=sha256:0c00730c74263a94e5a9919ade150dfc3b19c574389985446148402998287dae \ - --hash=sha256:48719e356bb8b42991bdbb1e8b83223757b93789c00910a616a071910ca4a64d - # via django +django>=4.1,<6 +django-contrib-comments>=2.2,<2.3 +djangorestframework>=3.14,<3.15 diff --git a/setup.py b/setup.py index d23eb81..a451ea8 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup( name="django-comments-ink", - version="0.3.0", + version="0.4.0", packages=find_packages(), include_package_data=True, license="MIT", diff --git a/tox.ini b/tox.ini index e02f455..391bd3f 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ django_find_project = false [tox] skipsdist = True -envlist = py3.10-django{3.2,4.0,4.1} +envlist = py3.12-django{4.1,4.2,5.0} [coverage] omit = django_comments_ink/migrations/,django_comments_ink/tests/ @@ -21,13 +21,9 @@ commands = coverage report -m deps = -rrequirements-tests.txt - py3.10-django3.2: django>=3.2,<3.3 - py3.10-django4.0: django>=4.0,<4.1 - py3.10-django4.1: django>=4.1,<4.2 - py3.10-django{4.0,4.1}: django-contrib-comments>=2.2,<2.3 - py3.10-django3.2: djangorestframework>=3.12,<3.13 - py3.10-django{4.0,4.1}: djangorestframework>=3.13,<3.14 - py3.10-django3.2: django-contrib-comments>=2.1,<2.2 + py3.12-django5.0: django>=5.0,<5.1 + py3.12-django4.2: django>=4.2,<4.3 + py3.12-django4.1: django>=4.1,<4.2 setenv = PYTHONPATH = {toxinidir}:{toxinidir} DJANGO_SETTINGS_MODULE=django_comments_ink.tests.settings