Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/api/rest/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------

Expand Down Expand Up @@ -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/",
Expand Down Expand Up @@ -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 </releases/index>`.
Expand Down
2 changes: 0 additions & 2 deletions docs/api/schemas/latest/patchwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/api/schemas/patchwork.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/api/schemas/v1.0/patchwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/api/schemas/v1.1/patchwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/api/schemas/v1.2/patchwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/api/schemas/v1.3/patchwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions docs/api/schemas/v1.4/patchwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/deployment/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ Patchwork provides three settings files:
heavy customization. The :ref:`deployment guide <deployment-settings>`
provides more information.

__ https://docs.djangoproject.com/en/2.2/topics/settings/
__ https://docs.djangoproject.com/en/5.2/topics/settings/

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``
Expand All @@ -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``
~~~~~~~~~~~~~~~~
Expand Down
16 changes: 8 additions & 8 deletions docs/deployment/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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


Expand All @@ -148,22 +148,22 @@ 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::

Per the `Django documentation`__, source code should not be placed in your
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:
Expand Down Expand Up @@ -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
^^^^^^^^^
Expand Down Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/upgrading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion docs/development/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions patchwork/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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'
Expand All @@ -93,15 +93,15 @@

#
# 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


#
# 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/'
Expand All @@ -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 = {
Expand Down
6 changes: 3 additions & 3 deletions patchwork/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),)
Expand All @@ -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']

#
Expand Down
6 changes: 3 additions & 3 deletions patchwork/settings/production.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down
15 changes: 0 additions & 15 deletions patchwork/tests/unit/api/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion releasenotes/notes/initial-reno-68c116ae9c5259a3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions releasenotes/notes/prelude-3_3-929679e6150717b5.yaml
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.0.a.0
3.3.0
Loading