Merge ~lvoytek/ubuntu/+source/django-menu-generator-ng:fix-django4-compatibility into ubuntu/+source/django-menu-generator-ng:ubuntu/devel

Proposed by Lena Voytek
Status: Work in progress
Proposed branch: ~lvoytek/ubuntu/+source/django-menu-generator-ng:fix-django4-compatibility
Merge into: ubuntu/+source/django-menu-generator-ng:ubuntu/devel
Diff against target: 68 lines (+38/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/django4-compatibility.patch (+28/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lucas Kanashiro (community) Needs Information
Canonical Server Reporter Pending
Review via email: mp+448093@code.launchpad.net

Description of the change

Adding Django 4.2 support for the transition in mantic. The package just needed a fix in its urls test file, using re_path instead of the removed url() function.

PPA building against 4.2: https://launchpad.net/~lvoytek/+archive/ubuntu/django-4-mantic
PPA building against 3.2 (currently in Ubuntu): https://launchpad.net/~lvoytek/+archive/ubuntu/django3-mantic

To post a comment you must log in.
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for this MP Lena! I see you are trying to make this package work with Django 4 but it seems to me dead upstream, not sure if it worth to be kept in the archive TBH. The last and unique upload to Debian was in 2021:

https://tracker.debian.org/pkg/django-menu-generator-ng

The upstream git repo is archived:

https://edugit.org/AlekSIS/libs/django-menu-generator-ng

It's never migrated to Debian testing, it is stuck in unstable since the initial upload.

Moreover, it has no reverse dependencies:

$ reverse-depends -r mantic src:django-menu-generator-ng
No reverse dependencies found
$ reverse-depends -r mantic src:django-menu-generator-ng -a source
No reverse dependencies found

So my advice here would be to file a RM bug against the Debian and Ubuntu. IMHO this is the best way out of unblocking the Django 4 transition.

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

I think that's fair. I'll go ahead and file bugs for it since that'll likely be more convenient long term.

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

Added Ubuntu bug for removal here: https://bugs.launchpad.net/ubuntu/+source/django-menu-generator-ng/+bug/2029421

I'll change this mp to work in progress for now

Unmerged commits

00c1a3d... by Lena Voytek

changelog

88b7c7c... by Lena Voytek

update maintainer

0323490... by Lena Voytek

* django4-compatibility.patch: Fix Django 4 compatibility with re_path
  (LP: #2022089)

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 de0a779..ff4b721 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+django-menu-generator-ng (1.2.3-1ubuntu1) mantic; urgency=medium
7+
8+ * django4-compatibility.patch: Fix Django 4 compatibility with re_path
9+ (LP: #2022089)
10+
11+ -- Lena Voytek <lena.voytek@canonical.com> Mon, 31 Jul 2023 15:16:10 -0700
12+
13 django-menu-generator-ng (1.2.3-1) unstable; urgency=low
14
15 * Initial release
16diff --git a/debian/control b/debian/control
17index f49fb7e..eb0555b 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,5 +1,6 @@
21 Source: django-menu-generator-ng
22-Maintainer: Debian Python Team <team+python@tracker.debian.org>
23+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
24+XSBC-Original-Maintainer: Debian Python Team <team+python@tracker.debian.org>
25 Uploaders: Dominik George <natureshadow@debian.org>
26 Section: python
27 Priority: optional
28diff --git a/debian/patches/django4-compatibility.patch b/debian/patches/django4-compatibility.patch
29new file mode 100644
30index 0000000..157afbd
31--- /dev/null
32+++ b/debian/patches/django4-compatibility.patch
33@@ -0,0 +1,28 @@
34+Description: Fix compatibility with Django 4 by replacing django.conf.urls with re_path
35+ As of Django 4, the django.conf.urls.url() function was removed. The
36+ recommended replacement is to use re_path for url paths that use regex. This
37+ patch replaces instances of the url function accordingly.
38+Author: Lena Voytek <lena.voytek@canonical.com>
39+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/mantic/+source/django-menu-generator-ng/+bug/2022089
40+Last-Update: 2023-07-31
41+---
42+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
43+--- a/menu_generator/tests/urls.py
44++++ b/menu_generator/tests/urls.py
45+@@ -1,11 +1,11 @@
46+-from django.conf.urls import url
47++from django.urls import re_path
48+
49+ def testview(request):
50+ return 'foo'
51+
52+ urlpatterns = [
53+- url(r'named-url', lambda: 'foo', name='named_url'),
54+- url(r'named-with-params/(?P<pk>\d+)/', lambda: 'foo', name='named_with_params'),
55+- url(r'known-view', testview, name='known_view'),
56+- url(r'', lambda: 'foo'),
57++ re_path(r'named-url', lambda: 'foo', name='named_url'),
58++ re_path(r'named-with-params/(?P<pk>\d+)/', lambda: 'foo', name='named_with_params'),
59++ re_path(r'known-view', testview, name='known_view'),
60++ re_path(r'', lambda: 'foo'),
61+ ]
62diff --git a/debian/patches/series b/debian/patches/series
63new file mode 100644
64index 0000000..2c430ea
65--- /dev/null
66+++ b/debian/patches/series
67@@ -0,0 +1 @@
68+django4-compatibility.patch

Subscribers

People subscribed via source and target branches

to all changes: