From 952fbe0e6122845e5053171f884e6d30f543fd12 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Oct 2026 23:13:08 +0100 Subject: [PATCH 1/6] requirements: Bump openapi-core This allows us to remove a custom hack and highlights some duplicate Bundles entries in our specs. Signed-off-by: Stephen Finucane --- docs/api/schemas/latest/patchwork.yaml | 2 -- docs/api/schemas/patchwork.j2 | 2 -- docs/api/schemas/v1.0/patchwork.yaml | 2 -- docs/api/schemas/v1.1/patchwork.yaml | 2 -- docs/api/schemas/v1.2/patchwork.yaml | 2 -- docs/api/schemas/v1.3/patchwork.yaml | 2 -- docs/api/schemas/v1.4/patchwork.yaml | 2 -- patchwork/tests/unit/api/validator.py | 15 --------------- requirements-test.txt | 4 ++-- 9 files changed, 2 insertions(+), 31 deletions(-) diff --git a/docs/api/schemas/latest/patchwork.yaml b/docs/api/schemas/latest/patchwork.yaml index b2bb220fd..bda5b5cf1 100644 --- a/docs/api/schemas/latest/patchwork.yaml +++ b/docs/api/schemas/latest/patchwork.yaml @@ -3237,8 +3237,6 @@ tags: description: Bundle operations - name: projects description: Project operations - - name: bundles - description: Bundle operations - name: checks description: Check operations - name: events diff --git a/docs/api/schemas/patchwork.j2 b/docs/api/schemas/patchwork.j2 index f37d3213e..67bd403c0 100644 --- a/docs/api/schemas/patchwork.j2 +++ b/docs/api/schemas/patchwork.j2 @@ -3359,8 +3359,6 @@ tags: description: Bundle operations - name: projects description: Project operations - - name: bundles - description: Bundle operations - name: checks description: Check operations - name: events diff --git a/docs/api/schemas/v1.0/patchwork.yaml b/docs/api/schemas/v1.0/patchwork.yaml index d317f53fb..7a7405bd5 100644 --- a/docs/api/schemas/v1.0/patchwork.yaml +++ b/docs/api/schemas/v1.0/patchwork.yaml @@ -2601,8 +2601,6 @@ tags: description: Bundle operations - name: projects description: Project operations - - name: bundles - description: Bundle operations - name: checks description: Check operations - name: events diff --git a/docs/api/schemas/v1.1/patchwork.yaml b/docs/api/schemas/v1.1/patchwork.yaml index ce17d2f2d..7bf772599 100644 --- a/docs/api/schemas/v1.1/patchwork.yaml +++ b/docs/api/schemas/v1.1/patchwork.yaml @@ -2674,8 +2674,6 @@ tags: description: Bundle operations - name: projects description: Project operations - - name: bundles - description: Bundle operations - name: checks description: Check operations - name: events diff --git a/docs/api/schemas/v1.2/patchwork.yaml b/docs/api/schemas/v1.2/patchwork.yaml index dddaafe53..c0152b32c 100644 --- a/docs/api/schemas/v1.2/patchwork.yaml +++ b/docs/api/schemas/v1.2/patchwork.yaml @@ -3029,8 +3029,6 @@ tags: description: Bundle operations - name: projects description: Project operations - - name: bundles - description: Bundle operations - name: checks description: Check operations - name: events diff --git a/docs/api/schemas/v1.3/patchwork.yaml b/docs/api/schemas/v1.3/patchwork.yaml index 41b448328..e40997c2f 100644 --- a/docs/api/schemas/v1.3/patchwork.yaml +++ b/docs/api/schemas/v1.3/patchwork.yaml @@ -3218,8 +3218,6 @@ tags: description: Bundle operations - name: projects description: Project operations - - name: bundles - description: Bundle operations - name: checks description: Check operations - name: events diff --git a/docs/api/schemas/v1.4/patchwork.yaml b/docs/api/schemas/v1.4/patchwork.yaml index 036fe15f1..179384431 100644 --- a/docs/api/schemas/v1.4/patchwork.yaml +++ b/docs/api/schemas/v1.4/patchwork.yaml @@ -3237,8 +3237,6 @@ tags: description: Bundle operations - name: projects description: Project operations - - name: bundles - description: Bundle operations - name: checks description: Check operations - name: events diff --git a/patchwork/tests/unit/api/validator.py b/patchwork/tests/unit/api/validator.py index b64e8f282..df5522d78 100644 --- a/patchwork/tests/unit/api/validator.py +++ b/patchwork/tests/unit/api/validator.py @@ -11,7 +11,6 @@ from openapi_core.contrib.django import DjangoOpenAPIRequest from openapi_core.contrib.django import DjangoOpenAPIResponse from openapi_core.exceptions import OpenAPIError -from openapi_core.templating import util from openapi_core.validation.request.exceptions import SecurityValidationError from openapi_core import shortcuts from rest_framework import status @@ -32,20 +31,6 @@ _LOADED_SPECS = {} -# HACK! Workaround for https://github.com/p1c2u/openapi-core/issues/226 -def search(path_pattern, full_url_pattern): - p = util.Parser(path_pattern) - p._expression = p._expression + '$' - result = p.search(full_url_pattern) - if not result or any('/' in arg for arg in result.named.values()): - return None - - return result - - -util.search = search - - class RegexValidator(object): def __init__(self, regex): self.regex = re.compile(regex, re.IGNORECASE) diff --git a/requirements-test.txt b/requirements-test.txt index 5d3b4b11e..19b811b80 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -3,6 +3,6 @@ psycopg~=3.3.4 sqlparse~=0.6.0 python-dateutil~=2.9.0 tblib~=3.2.2 -openapi-core~=0.19.2 -jsonschema-path~=0.3.3 +openapi-core~=0.23.1 +jsonschema-path~=0.4.6 termcolor~=3.3.0 From 2dbe4bdb5b04e779b9f7c9b58c897fb1a2467e5e Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Oct 2026 23:01:34 +0100 Subject: [PATCH 2/6] docs: Replace Ubuntu 20.04 with 24.04 Package names and general process is unchanged. Signed-off-by: Stephen Finucane --- docs/deployment/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment/installation.rst b/docs/deployment/installation.rst index 361f96ca9..0c3a4c2c6 100644 --- a/docs/deployment/installation.rst +++ b/docs/deployment/installation.rst @@ -41,7 +41,7 @@ providers don't support. We address this in the appropriate section below. Requirements ------------ -For the purpose of this guide, we will assume an **Ubuntu 20.04** host: +For the purpose of this guide, we will assume an **Ubuntu 24.04** host: commands, package names and/or package versions will likely change if using a different distro or release. Similarly, usage of different package versions to the ones suggested may require slightly different configuration. From 87e0f555e905551ea7a0615a17578b35f4c654c4 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Oct 2026 22:59:40 +0100 Subject: [PATCH 3/6] docs: Update references to Django docs Use 5.2 (the most recent LTS) across the board. Signed-off-by: Stephen Finucane --- docs/deployment/configuration.rst | 6 +++--- docs/deployment/installation.rst | 8 ++++---- docs/deployment/management.rst | 2 +- docs/deployment/upgrading.rst | 2 +- docs/development/installation.rst | 2 +- patchwork/settings/base.py | 10 +++++----- patchwork/settings/dev.py | 6 +++--- patchwork/settings/production.example.py | 6 +++--- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/deployment/configuration.rst b/docs/deployment/configuration.rst index a71dd3f4b..ae60cb96b 100644 --- a/docs/deployment/configuration.rst +++ b/docs/deployment/configuration.rst @@ -27,7 +27,7 @@ Patchwork provides three settings files: heavy customization. The :ref:`deployment guide ` provides more information. -__ https://docs.djangoproject.com/en/2.2/topics/settings/ +__ https://docs.djangoproject.com/en/5.2/topics/settings/ Patchwork-specific Settings --------------------------- @@ -35,7 +35,7 @@ Patchwork-specific Settings Patchwork utilizes a number of Patchwork-only settings in addition to the `Django`__ and `Django REST Framework`__ settings. -__ https://docs.djangoproject.com/en/2.2/ref/settings/ +__ https://docs.djangoproject.com/en/5.2/ref/settings/ __ http://www.django-rest-framework.org/api-guide/settings/ ``ADMINS_HIDE`` @@ -46,7 +46,7 @@ If True, the details in `ADMINS`__ will be hidden from the *About* page .. versionadded:: 2.2 -__ https://docs.djangoproject.com/en/2.2/ref/settings/#admins +__ https://docs.djangoproject.com/en/5.2/ref/settings/#admins ``COMPAT_REDIR`` ~~~~~~~~~~~~~~~~ diff --git a/docs/deployment/installation.rst b/docs/deployment/installation.rst index 0c3a4c2c6..c6beb31a3 100644 --- a/docs/deployment/installation.rst +++ b/docs/deployment/installation.rst @@ -134,7 +134,7 @@ __ https://www.postgresql.org/docs/10/static/auth-methods.html#AUTH-PEER `latin1` encoding. Refer to the `MySQL documentation`__ for more information. - __ https://docs.djangoproject.com/en/3.1/ref/unicode/ + __ https://docs.djangoproject.com/en/5.2/ref/unicode/ __ https://dev.mysql.com/doc/refman/en/charset.html @@ -163,7 +163,7 @@ We will install this under ``/opt``, though this is only a suggestion: web server's document root as this risks the possibility that people may be able to view your code over the Web. This is a security risk. - __ https://docs.djangoproject.com/en/2.2/intro/tutorial01/#creating-a-project + __ https://docs.djangoproject.com/en/5.2/intro/tutorial01/#creating-a-project Next we require Python. If not already installed, then you should do so now. Python 3 is installed by default but you should validate this now: @@ -218,7 +218,7 @@ variables, you should export each setting using the appropriate name, such as ``DJANGO_SECRET_KEY``, ``DATABASE_NAME`` or ``EMAIL_HOST``, instead of modifying the ``production.py`` file as we've done below. -__ https://docs.djangoproject.com/en/2.2/ref/settings/ +__ https://docs.djangoproject.com/en/5.2/ref/settings/ Databases ^^^^^^^^^ @@ -441,7 +441,7 @@ address(es) from which you will be serving this domain. For example: ALLOWED_HOSTS = ('.example.com', ) -__ https://docs.djangoproject.com/en/2.2/ref/settings/#allowed-hosts +__ https://docs.djangoproject.com/en/5.2/ref/settings/#allowed-hosts Create systemd Unit File ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/deployment/management.rst b/docs/deployment/management.rst index dcee9ff51..8f9eed43d 100644 --- a/docs/deployment/management.rst +++ b/docs/deployment/management.rst @@ -25,7 +25,7 @@ documentation`_. Information on any command can also be found by passing the ./manage.py cron --help -.. _Django documentation: https://docs.djangoproject.com/en/1.8/ref/django-admin/ +.. _Django documentation: https://docs.djangoproject.com/en/5.2/ref/django-admin/ Available Commands ------------------ diff --git a/docs/deployment/upgrading.rst b/docs/deployment/upgrading.rst index 3507da414..319873347 100644 --- a/docs/deployment/upgrading.rst +++ b/docs/deployment/upgrading.rst @@ -69,4 +69,4 @@ which must be applied before starting the instance. To do this, run the For more information on migrations, refer to `the Django documentation`__. -__ https://docs.djangoproject.com/en/2.2/topics/migrations/ +__ https://docs.djangoproject.com/en/5.2/topics/migrations/ diff --git a/docs/development/installation.rst b/docs/development/installation.rst index 521df51ef..ef81af942 100644 --- a/docs/development/installation.rst +++ b/docs/development/installation.rst @@ -219,7 +219,7 @@ respectively on Debian-based Debian-based distros like Ubuntu and supported`__. You will find some tests provided by Patchwork fail and some patches you develop may fail in production due to these differences. -__ https://docs.djangoproject.com/en/2.2/ref/databases/ +__ https://docs.djangoproject.com/en/5.2/ref/databases/ __ https://www.sqlite.org/faq.html#q18 Example Installation diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py index d5dd82c41..4dd8f8ec7 100644 --- a/patchwork/settings/base.py +++ b/patchwork/settings/base.py @@ -10,7 +10,7 @@ # # Core settings -# https://docs.djangoproject.com/en/2.2/ref/settings/#core-settings +# https://docs.djangoproject.com/en/5.2/ref/settings/#core-settings # INSTALLED_APPS = [ @@ -83,7 +83,7 @@ # # Auth settings -# https://docs.djangoproject.com/en/2.2/ref/settings/#auth +# https://docs.djangoproject.com/en/5.2/ref/settings/#auth # LOGIN_URL = 'auth_login' @@ -93,7 +93,7 @@ # # Sites settings -# https://docs.djangoproject.com/en/2.2/ref/settings/#sites +# https://docs.djangoproject.com/en/5.2/ref/settings/#sites # SITE_ID = 1 @@ -101,7 +101,7 @@ # # Static files settings -# https://docs.djangoproject.com/en/2.2/ref/settings/#static-files +# https://docs.djangoproject.com/en/5.2/ref/settings/#static-files # STATIC_URL = '/static/' @@ -114,7 +114,7 @@ # # If you're using a postgres database, connecting over a local unix-domain # socket, then the following setting should work for you. Otherwise, -# see https://docs.djangoproject.com/en/2.2/ref/settings/#databases +# see https://docs.djangoproject.com/en/5.2/ref/settings/#databases if os.getenv('DATABASE_TYPE') == 'postgres': DATABASES = { diff --git a/patchwork/settings/dev.py b/patchwork/settings/dev.py index 75c4b349c..0b3ad945e 100644 --- a/patchwork/settings/dev.py +++ b/patchwork/settings/dev.py @@ -21,7 +21,7 @@ # # Core settings -# https://docs.djangoproject.com/en/2.2/ref/settings/#core-settings +# https://docs.djangoproject.com/en/5.2/ref/settings/#core-settings # ADMINS = (('Joe Bloggs', 'jbloggs@example.com'),) @@ -39,11 +39,11 @@ # # Auth settings -# https://docs.djangoproject.com/en/2.2/ref/settings/#auth +# https://docs.djangoproject.com/en/5.2/ref/settings/#auth # # Use a faster, though less secure, password hasher for faster tests -# https://docs.djangoproject.com/en/2.2/topics/testing/overview/#password-hashing +# https://docs.djangoproject.com/en/5.2/topics/testing/overview/#password-hashing PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher'] # diff --git a/patchwork/settings/production.example.py b/patchwork/settings/production.example.py index 505ade780..155aa0a69 100644 --- a/patchwork/settings/production.example.py +++ b/patchwork/settings/production.example.py @@ -13,7 +13,7 @@ # # Core settings -# https://docs.djangoproject.com/en/2.2/ref/settings/#core-settings +# https://docs.djangoproject.com/en/5.2/ref/settings/#core-settings # # Security @@ -50,8 +50,8 @@ # # Static files settings -# https://docs.djangoproject.com/en/2.2/ref/settings/#static-files -# https://docs.djangoproject.com/en/2.2/ref/contrib/staticfiles/#manifeststaticfilesstorage +# https://docs.djangoproject.com/en/5.2/ref/settings/#static-files +# https://docs.djangoproject.com/en/5.2/ref/contrib/staticfiles/#manifeststaticfilesstorage # STATIC_ROOT = os.environ.get('STATIC_ROOT', '/srv/patchwork/htdocs/static') From 5b273bf53a08db0b2228f1172e2415f14444e1eb Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Oct 2026 22:53:41 +0100 Subject: [PATCH 4/6] Fix release notes warning Signed-off-by: Stephen Finucane --- releasenotes/notes/initial-reno-68c116ae9c5259a3.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releasenotes/notes/initial-reno-68c116ae9c5259a3.yaml b/releasenotes/notes/initial-reno-68c116ae9c5259a3.yaml index a7f7a66a5..3a25cb7f2 100644 --- a/releasenotes/notes/initial-reno-68c116ae9c5259a3.yaml +++ b/releasenotes/notes/initial-reno-68c116ae9c5259a3.yaml @@ -95,7 +95,7 @@ fixes: - | Unicode characters transmitted over the XML-RPC API are now handled correctly under Python 3 -deprecated: +deprecations: - | Django 1.6 and Django 1.7 are no longer supported upstream and will not be supported in a future release. From f65f31a928d7fd8026457e8965397da1c9511648 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Oct 2026 22:52:54 +0100 Subject: [PATCH 5/6] docs: Bump API version in docs to 1.4 Signed-off-by: Stephen Finucane --- docs/api/rest/index.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/api/rest/index.rst b/docs/api/rest/index.rst index cdf910444..429a986a7 100644 --- a/docs/api/rest/index.rst +++ b/docs/api/rest/index.rst @@ -43,6 +43,11 @@ If all you want is reference guides, skip straight to :ref:`rest-api-schemas`. The API version was bumped to v1.3 in Patchwork v3.1. The older APIs are still supported. For more information, refer to :ref:`rest-api-versions`. +.. versionchanged:: 3.3 + + The API version was bumped to v1.4 in Patchwork v3.3. The older APIs are + still supported. For more information, refer to :ref:`rest-api-versions`. + Getting Started --------------- @@ -79,7 +84,7 @@ well-supported. To repeat the above example using `requests`:, run $ python >>> import json >>> import requests - >>> r = requests.get('https://patchwork.example.com/api/1.3/') + >>> r = requests.get('https://patchwork.example.com/api/1.4/') >>> print(json.dumps(r.json(), indent=2)) { "bundles": "https://patchwork.example.com/api/1.4/bundles/", @@ -275,7 +280,7 @@ Supported Versions 1.1, 2.1, ✓ 1.2, 2.2, ✓ 1.3, 3.1, ✓ - 1.4, unreleased, ✓ + 1.4, 3.3, ✓ Further information about this and more can typically be found in :doc:`the release notes `. From 3d08b2ac6b3db2746f32b76d02c93eaacbf22fa6 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Oct 2026 22:51:04 +0100 Subject: [PATCH 6/6] Release 3.3.0 Some small API changes warranting a new API version, plus about two years of dependency updates. Signed-off-by: Stephen Finucane --- docs/deployment/installation.rst | 6 +++--- releasenotes/notes/prelude-3_3-929679e6150717b5.yaml | 8 ++++++++ version.txt | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/prelude-3_3-929679e6150717b5.yaml diff --git a/docs/deployment/installation.rst b/docs/deployment/installation.rst index c6beb31a3..1dfb32a26 100644 --- a/docs/deployment/installation.rst +++ b/docs/deployment/installation.rst @@ -148,14 +148,14 @@ The first requirement is Patchwork itself. It can be downloaded like so: .. code-block:: shell - $ wget https://github.com/getpatchwork/patchwork/archive/v3.1.0.tar.gz + $ wget https://github.com/getpatchwork/patchwork/archive/v3.3.0.tar.gz We will install this under ``/opt``, though this is only a suggestion: .. code-block:: shell - $ tar -xvzf v3.1.0.tar.gz - $ sudo mv patchwork-3.1.0 /opt/patchwork + $ tar -xvzf v3.3.0.tar.gz + $ sudo mv patchwork-3.3.0 /opt/patchwork .. important:: diff --git a/releasenotes/notes/prelude-3_3-929679e6150717b5.yaml b/releasenotes/notes/prelude-3_3-929679e6150717b5.yaml new file mode 100644 index 000000000..19f04dd4f --- /dev/null +++ b/releasenotes/notes/prelude-3_3-929679e6150717b5.yaml @@ -0,0 +1,8 @@ +--- +prelude: > + The main new feature in this release is support for tracking dependencies + between series, allowing clients to apply related changes together. In + addition, mail parsing is now more reliable when handling concurrent + deliveries. As always, there are updates to the supported Python and Django + versions, along with a number of bug fixes and smaller improvements. More + information is included below. diff --git a/version.txt b/version.txt index d4f3a239f..15a279981 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.3.0.a.0 +3.3.0