Merge ~lvoytek/ubuntu/+source/djangorestframework-filters:django4-compatibility into ubuntu/+source/djangorestframework-filters:ubuntu/devel

Proposed by Lena Voytek
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: 80e5be8e6a229f53b722ff46b5959c12ec6018a2
Proposed branch: ~lvoytek/ubuntu/+source/djangorestframework-filters:django4-compatibility
Merge into: ubuntu/+source/djangorestframework-filters:ubuntu/devel
Diff against target: 67 lines (+37/-1)
4 files modified
debian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/fix-testapp-django4-compatibility.patch (+26/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Sergio Durigan Junior (community) Approve
Canonical Server Pending
Canonical Server Reporter Pending
Review via email:

Description of the change

Fix test suite to work with Django 4.2, using re_path instead of url


To post a comment you must log in.
Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :

LGTM, +1

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, Lena.

LGTM. Does it make sense to forward the patch to Debian/upstream?


$ dput djangorestframework-filters_1.0.0.dev2-2ubuntu1_source.changes
Trying to upload package to ubuntu
Checking signature on .changes
gpg: /home/sergio/work/djangorestframework-filters/djangorestframework-filters_1.0.0.dev2-2ubuntu1_source.changes: Valid signature from 106DA1C8C3CBBF14
Checking signature on .dsc
gpg: /home/sergio/work/djangorestframework-filters/djangorestframework-filters_1.0.0.dev2-2ubuntu1.dsc: Valid signature from 106DA1C8C3CBBF14
Uploading to ubuntu (via ftp to
  Uploading djangorestframework-filters_1.0.0.dev2-2ubuntu1.dsc: done.
  Uploading djangorestframework-filters_1.0.0.dev2-2ubuntu1.debian.tar.xz: done.
  Uploading djangorestframework-filters_1.0.0.dev2-2ubuntu1_source.buildinfo: done.
  Uploading djangorestframework-filters_1.0.0.dev2-2ubuntu1_source.changes: done.
Successfully uploaded packages.

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: sergiodj, lvoytek
Uploaders: sergiodj
MP auto-approved

review: Approve
Revision history for this message
Lena Voytek (lvoytek) wrote :

Yeah I'll send this over to them. I doubt it'll ever be added upstream since there haven't been updates in a few years but a merge request should help others if they need it. Debian will also need it once they start the Django 4 transition

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 642dd49..aeb7bd7 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+djangorestframework-filters (1.0.0.dev2-2ubuntu1) mantic; urgency=medium
8+ * d/p/fix-testapp-django4-compatibility.patch: Update test suite to be
9+ compatible with Django 4 using re_path instead of the removed url
10+ function (LP: #2022089)
12+ -- Lena Voytek <> Wed, 23 Aug 2023 15:43:38 -0700
14 djangorestframework-filters (1.0.0.dev2-2) unstable; urgency=medium
16 [ Debian Janitor ]
17diff --git a/debian/control b/debian/control
18index 923fc81..6ed4bb5 100644
19--- a/debian/control
20+++ b/debian/control
21@@ -1,5 +1,6 @@
22 Source: djangorestframework-filters
23-Maintainer: Debian Python Team <>
24+Maintainer: Ubuntu Developers <>
25+XSBC-Original-Maintainer: Debian Python Team <>
26 Uploaders: Wookey <>
27 Section: python
28 Priority: optional
29diff --git a/debian/patches/fix-testapp-django4-compatibility.patch b/debian/patches/fix-testapp-django4-compatibility.patch
30new file mode 100644
31index 0000000..687ff8a
32--- /dev/null
33+++ b/debian/patches/fix-testapp-django4-compatibility.patch
34@@ -0,0 +1,26 @@
35+Description: Fix testsuite for Django 4 by updating the test application
36+ As of Django 4, the django.conf.urls.url() function was removed. The
37+ recommended replacement is to use re_path for url paths that use regex. This
38+ patch replaces instances of the url function accordingly in testapp.
39+Author: Lena Voytek <>
41+Last-Update: 2023-08-23
43+This patch header follows DEP-3:
44+--- a/tests/testapp/
45++++ b/tests/testapp/
46+@@ -1,5 +1,6 @@
48+-from django.conf.urls import include, url
49++from django.conf.urls import include
50++from django.urls import re_path
51+ from rest_framework import routers
53+ from . import views
54+@@ -15,5 +16,5 @@
57+ urlpatterns = [
58+- url(r'^', include(router.urls)),
59++ re_path(r'^', include(router.urls)),
60+ ]
61diff --git a/debian/patches/series b/debian/patches/series
62new file mode 100644
63index 0000000..c1eb23a
64--- /dev/null
65+++ b/debian/patches/series
66@@ -0,0 +1 @@


People subscribed via source and target branches

to all changes: