Merge ~athos-ribeiro/ubuntu/+source/python-django:fix-test-regression into ubuntu/+source/python-django:ubuntu/devel

Proposed by Athos Ribeiro
Status: Merged
Approved by: Sergio Durigan Junior
Approved revision: ec9727446342ab682786400710bfbfec5fcb56a0
Merged at revision: ec9727446342ab682786400710bfbfec5fcb56a0
Proposed branch: ~athos-ribeiro/ubuntu/+source/python-django:fix-test-regression
Merge into: ubuntu/+source/python-django:ubuntu/devel
Diff against target: 63 lines (+29/-1)
4 files modified
debian/changelog (+6/-0)
debian/control (+2/-1)
debian/patches/0006-test-subparser-regression.patch (+20/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior (community) Approve
Canonical Server Pending
Review via email: mp+409600@code.launchpad.net

Description of the change

This patch fixes a python-django ftbfs failure, as described in https://bugs.launchpad.net/ubuntu/+source/python-django/+bug/1945993

A PPA with the proposed change is available at https://launchpad.net/~athos-ribeiro/+archive/ubuntu/django-regression/+packages

I also ran the dep8 test suite for this package. Here is the output summary:

autopkgtest [18:19:12]: @@@@@@@@@@@@@@@@@@@@ summary
command1 PASS
command2 PASS

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

I'll take a look at this one.

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

Thanks for the MP, Athos.

I'm leaving a few comments regarding the DEP-3 headers; let me know when you adjust it and I will gladly take another look.

I have a more general comment regarding this part of the bug description:

> The bug has also been fixed in Debian [3], however, Debian unstable has migrated to python-django
> 3. Hence, we should add a delta for impish, which can be dropped later for the jj series when we
> move to django 3.

Upon looking at the Debian commit you linked:

https://salsa.debian.org/python-team/packages/python-django/-/blob/debian/sid/debian/patches/0006-Skip-a-test-that-is-fixed-upstream.patch

I noticed that they're simply skipping the test, and not really fixing the problem like you did here. Maybe it's worth really submitting the fix to the Debian package so that it's properly included in the next release, otherwise we will end up with different approaches to the same problem when we merge this package during the JJ cycle. WDYT?

review: Needs Fixing
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks for the review, Sergio!

I addressed your comments and I will follow your suggestion on submitting this to Debian. The reason I did not do it initially was that 4.0a1 already has the fix, and was already pushed to experimental.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Upstream released a new 3.2.8 version that includes this fix, which was already pushed to Debian unstable a few hours ago.

Hence, once again, I made some changes in the dep3 headers.

However, I am now wondering if it wouldn't be better to just sync the package from Debian instead to pull in the fix and avoid introducing the delta. WDYT?

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

As per the changes (see attached commit history below), the new minor release consists of documentation changes and bug fixes. Would we still need to file a FFe in this case?

4540e976d4 (tag: 3.2.8) [3.2.x] Bumped version for 3.2.8 release.
65367b0500 [3.2.x] Added release date for 3.2.7.
51e4dbfeb2 [3.2.x] Refs #27694 -- Doc'd lookups that can be chained with HStoreField key transforms.
031ffc5c84 [3.2.x] Corrected field and model check messages in docs.
7607fe922f [3.2.x] Removed obsolete GEOS 3.5 requirement note.
6760f4fa25 [3.2.x] Fixed #33083 -- Fixed selecting all items in the admin changelist when actions are both top and bottom.
e235c7815a [3.2.x] Fixed broken links and redirects in docs.
51e76c922f [3.2.x] Used :rfc: role in docs/topics/conditional-view-processing.txt.
d4a587a5fa [3.2.x] Fixed #33077 -- Fixed links to related models for admin's readonly fields in custom admin site.
561a1c0905 [3.2.x] Fixed typo in docs/intro/reusable-apps.txt.
454ee4d3b8 [3.2.x] Corrected outputs and made cosmetic edits in GeoDjango tutorial.
b51e0a37cf [3.2.x] Doc'd Jinja2 form renderer.
a7be74d017 [3.2.x] Clarified type of Window()'s partition_by and order_by arguments.
54684a3ec0 [3.2.x] Refs #31055 -- Doc'd 'databases' argument of check functions.
1f86ff31b1 [3.2.x] Fixed typo in docs/topics/i18n/formatting.txt.
b61f44c339 [3.2.x] Fixed #33082 -- Fixed CommandTests.test_subparser_invalid_option on Python 3.9.7+.
707239eabf [3.2.x] Added stub release notes for Django 3.2.8.
d5710f405a [3.2.x] Post-release version bump.
45a0c54b67 (tag: 3.2.7) [3.2.x] Bumped version for 3.2.7 release.

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

Thanks for the follow up, Athos.

As we discussed during standup, Debian unstable/experimental are ahead of Ubuntu Impish by a lot, so I think it makes sense to carry this as a delta. Also, thanks for bringing it to my attention that Debian experimental already has the 4.0a version; in this case, I agree that it forwarding the patch to them is not required.

Having said that, I'm happy with the changes you've made so I'll go ahead and sponsor the package. Thanks again!

review: Approve

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 6deb982..01b2283 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+python-django (2:2.2.24-1ubuntu1) impish; urgency=medium
7+
8+ * d/p/test_subparser_regression.patch: Fix test regression (LP: #1945993)
9+
10+ -- Athos Ribeiro <athos.ribeiro@canonical.com> Mon, 04 Oct 2021 10:56:57 -0300
11+
12 python-django (2:2.2.24-1) unstable; urgency=medium
13
14 * New upstream security release. (Closes: #989394)
15diff --git a/debian/control b/debian/control
16index 888f714..4d6f99d 100644
17--- a/debian/control
18+++ b/debian/control
19@@ -1,7 +1,8 @@
20 Source: python-django
21 Section: python
22 Priority: optional
23-Maintainer: Debian Python Team <team+python@tracker.debian.org>
24+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
25+XSBC-Original-Maintainer: Debian Python Team <team+python@tracker.debian.org>
26 Uploaders:
27 Luke Faraone <lfaraone@debian.org>,
28 Raphaƫl Hertzog <hertzog@debian.org>,
29diff --git a/debian/patches/0006-test-subparser-regression.patch b/debian/patches/0006-test-subparser-regression.patch
30new file mode 100644
31index 0000000..6c7e3ff
32--- /dev/null
33+++ b/debian/patches/0006-test-subparser-regression.patch
34@@ -0,0 +1,20 @@
35+Description: Fix test suite to support Python 3.9 changes to argparse
36+
37+Applied-Upstream: 3.2.8
38+Author: Mariusz Felisiak <felisiak.mariusz@gmail.com>
39+Bug: https://code.djangoproject.com/ticket/33082
40+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-django/+bug/1945993
41+Last-Update: 2021-10-04
42+Origin: upstream, https://github.com/django/django/commit/b61f44c339830ea53663415f00cbd17e2fd5aa43
43+
44+--- a/tests/user_commands/tests.py
45++++ b/tests/user_commands/tests.py
46+@@ -218,7 +218,7 @@
47+ self.assertIn('bar', out.getvalue())
48+
49+ def test_subparser_invalid_option(self):
50+- msg = "Error: invalid choice: 'test' (choose from 'foo')"
51++ msg = "invalid choice: 'test' (choose from 'foo')"
52+ with self.assertRaisesMessage(CommandError, msg):
53+ management.call_command('subparser', 'test', 12)
54+
55diff --git a/debian/patches/series b/debian/patches/series
56index 75da922..08cb34f 100644
57--- a/debian/patches/series
58+++ b/debian/patches/series
59@@ -3,3 +3,4 @@
60 0004-Use-locally-installed-documentation-sources.patch
61 0004-Set-the-default-shebang-to-new-projects-to-use-Pytho.patch
62 0005-Use-usr-bin-env-python3-shebang-for-django-admin.py.patch
63+0006-test-subparser-regression.patch

Subscribers

People subscribed via source and target branches