From c3362d570bda873e03ade9470e3ab29fb6847bb5 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 30 Aug 2023 05:17:22 -0700 Subject: [PATCH 01/11] Update __init__.py --- src/robots/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/robots/__init__.py b/src/robots/__init__.py index 6f7c5f8..9dfd835 100644 --- a/src/robots/__init__.py +++ b/src/robots/__init__.py @@ -1,6 +1,9 @@ -from pkg_resources import get_distribution - -__version__ = get_distribution("django-robots").version +try: + from importlib.metadata import 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" From cfaae5f868a2fb8afc4123f745844b04ade4f9b6 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 30 Aug 2023 05:29:03 -0700 Subject: [PATCH 02/11] Update tox.ini with new Django versions --- tox.ini | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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] From 5b79816306cb21733ad781146b10dff848bc5cfc Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 30 Aug 2023 05:36:41 -0700 Subject: [PATCH 03/11] Properly format __init__.py for black --- src/robots/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/robots/__init__.py b/src/robots/__init__.py index 9dfd835..cb666fe 100644 --- a/src/robots/__init__.py +++ b/src/robots/__init__.py @@ -1,8 +1,10 @@ try: from importlib.metadata import version + __version__ = version("django-robots") except ImportError: from pkg_resources import get_distribution + __version__ = get_distribution("django-robots").version # needed for Django<3.2 From a0e653f70643c496c1c5c75e4a39aac881d2a1e5 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 30 Aug 2023 05:45:51 -0700 Subject: [PATCH 04/11] Update isort version to avoid dependency issue --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 694ebcf..2e394bd 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.10.1 + rev: "5.12.0" hooks: - id: isort - repo: https://github.com/PyCQA/flake8 From 1eeac0b2f0b11dec5a2e3f11dd3e299d7fcb8c7a Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 7 Sep 2023 06:49:53 -0500 Subject: [PATCH 05/11] Release v6.0 See also: https://github.com/jazzband/django-robots/issues/124#issuecomment-1699231271 --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index ac281c3..b17bbda 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ master (unreleased) ------------------- *This is where upcoming changes will be.* -6.0 (unreleased) +6.0 (2023-09-07) ---------------- Breaking change: Missing ``DEFAULT_AUTO_FIELD`` From 22ab163246e25362a0756068b99e224b9c9a7afd Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 7 Sep 2023 07:01:24 -0500 Subject: [PATCH 06/11] docs(CHANGES): Note recent changes from #146 --- CHANGES.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index b17bbda..f6e9e9a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,20 @@ master (unreleased) ------------------- *This is where upcoming changes will be.* +Compatibility +""""""""""""" + +- Fix warning make in regards to ``pkg_resources`` in Python 3.11+, (#146, + thank you @blag) + +Maintenance +""""""""""" + +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) ---------------- From e9833414d081f622e3b969d3c68e96cbc2c925f2 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 7 Sep 2023 07:02:32 -0500 Subject: [PATCH 07/11] docs(typos): typos --format brief --write-changes --- CHANGES.rst | 8 ++++---- docs/index.rst | 2 +- src/robots/forms.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f6e9e9a..43bb4f7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -56,8 +56,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 @@ -120,7 +120,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. @@ -145,7 +145,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/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 From d4f6217fe5e360caee002ffccf5da94eeb95b8dc Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 7 Sep 2023 07:03:37 -0500 Subject: [PATCH 08/11] ci(tests): Add python 3.11 to test matrix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 49cf38b6bb2033c17bcbdb86613b3696deec5f87 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 7 Sep 2023 07:05:10 -0500 Subject: [PATCH 09/11] packaging: Add trove classifiers for python 3.11, django 4.1 and 4.2 --- setup.py | 3 +++ 1 file changed, 3 insertions(+) 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", ], ) From 962103eba6c455471bdf1fe120370f12f62d7380 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 7 Sep 2023 07:06:10 -0500 Subject: [PATCH 10/11] Release django-robots 6.1 --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 43bb4f7..ca2af22 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ master (unreleased) ------------------- *This is where upcoming changes will be.* +6.1 (2023-09-07) +---------------- + Compatibility """"""""""""" From 7e90577f647e95b1c16185505c758bc06a090e39 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 7 Sep 2023 17:04:02 -0500 Subject: [PATCH 11/11] docs(CHANGES): Note typo fix from @apoorvaeternity in #145 This was duplicated by a typos cli run in e9833414d081f622e3b969d3c68e96cbc2c925f2. It was my bad not to look at the PR before running. Credit the contributor here. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index ca2af22..0c359c7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -17,6 +17,13 @@ Compatibility 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)