diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 270fc94..ef0f117 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: fail-fast: false max-parallel: 5 matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da0420f..588a6af 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: check-added-large-files - id: debug-statements - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: "5.12.0" hooks: - id: isort - repo: https://github.com/PyCQA/flake8 diff --git a/CHANGES.rst b/CHANGES.rst index ac281c3..0c359c7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,31 @@ master (unreleased) ------------------- *This is where upcoming changes will be.* -6.0 (unreleased) +6.1 (2023-09-07) +---------------- + +Compatibility +""""""""""""" + +- Fix warning make in regards to ``pkg_resources`` in Python 3.11+, (#146, + thank you @blag) + +Maintenance +""""""""""" + +- Fix typos via `typos`_ + + - Special thanks to typo fix from @apoorvaeternity (Apoorva Pandey) in + #145 + + .. _typos: https://github.com/crate-ci/typos + +CI updates: + +- Python: Support Python 3.11 and 3.12 in test matrix (#146, thank you @blag) +- Django: Support Django 4.1 and 4.2 in test matrix (#146, thank you @blag) + +6.0 (2023-09-07) ---------------- Breaking change: Missing ``DEFAULT_AUTO_FIELD`` @@ -42,8 +66,8 @@ Maintenance - Added support for Python 3.10 (#113), thank you @Andrew-Chen-Wang - Dropped support for Django versions 2.1 and below - Dropped support for Django 3.0 -- Added suppport for Django 3.1 -- Added suppport for Django 3.2 +- Added support for Django 3.1 +- Added support for Django 3.2 - Added support for Django 4.0 (#112), thank you @umarmughal824 - Improve documentation for Django 4.0 (#119), thank you @sergioisidoro - Sync files with @jazzband/.github @@ -106,7 +130,7 @@ Maintenance - Fixed some backward compatibility issues. - Updated existing translations (Danish, German, French, - Portugese (Brasil), Russian). + Portuguese (Brasil), Russian). - Added Greek, Spanish (Spain), Japanese, Dutch, Slovak and Ukrainian translations. @@ -131,7 +155,7 @@ Maintenance requires Django >= 1.3. - Stop returning 404 pages if there are no Rules setup on the site. Instead - dissallow access for all robots. + disallow access for all robots. - Added an initial South migration. If you're using South you have to "fake" the initial database migration:: diff --git a/docs/index.rst b/docs/index.rst index f8e6c6d..4431ce3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -66,7 +66,7 @@ To overcome this, provide a name to the sitemap instance in ``urls.py``:: ... ] -and inform django-robots about the view name by adding the followin setting:: +and inform django-robots about the view name by adding the following setting:: ROBOTS_SITEMAP_VIEW_NAME = 'cached-sitemap' diff --git a/setup.py b/setup.py index 885a475..f50a6c8 100644 --- a/setup.py +++ b/setup.py @@ -43,10 +43,13 @@ def read(*parts): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Framework :: Django", "Framework :: Django :: 2.2", "Framework :: Django :: 3.1", "Framework :: Django :: 3.2", "Framework :: Django :: 4.0", + "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", ], ) diff --git a/src/robots/__init__.py b/src/robots/__init__.py index 6f7c5f8..cb666fe 100644 --- a/src/robots/__init__.py +++ b/src/robots/__init__.py @@ -1,6 +1,11 @@ -from pkg_resources import get_distribution +try: + from importlib.metadata import version -__version__ = get_distribution("django-robots").version + __version__ = version("django-robots") +except ImportError: + from pkg_resources import get_distribution + + __version__ = get_distribution("django-robots").version # needed for Django<3.2 default_app_config = "robots.apps.RobotsConfig" diff --git a/src/robots/forms.py b/src/robots/forms.py index 7ed223e..331e1b1 100644 --- a/src/robots/forms.py +++ b/src/robots/forms.py @@ -14,6 +14,6 @@ def clean(self): "allowed", False ): raise forms.ValidationError( - _("Please specify at least one allowed or dissallowed URL.") + _("Please specify at least one allowed or disallowed URL.") ) return self.cleaned_data diff --git a/tox.ini b/tox.ini index 8c0ae67..72a9e83 100644 --- a/tox.ini +++ b/tox.ini @@ -3,8 +3,9 @@ envlist = # list of supported Django/Python versions: # https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django py{36,37,38,39,310}-dj{22,31,32} - py{38,39,310}-dj{40} - py{38,39,310}-djmain + py{38,39,310}-dj{40,41} + py{38,39,310,311}-dj42 + py{310,311,312}-djmain py38-{lint,docs} [gh-actions] @@ -13,6 +14,8 @@ python = 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 + 3.12: py312 [testenv] usedevelop = true @@ -28,7 +31,9 @@ deps = dj22: django>=2.2,<2.3 dj31: django>=3.1,<3.2 dj32: django>=3.2,<3.3 - dj40: django>=4.0a1,<4.1 + dj40: django>=4.0,<4.1 + dj41: django>=4.1,<4.2 + dj42: django>=4.2,<4.3 djmain: https://github.com/django/django/archive/main.tar.gz [testenv:py38-lint]