#1126978 python-django: FTBFS with gettext 0.26

#1126978#5
Date:
2026-02-04 18:55:57 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable using gettext 0.26
(yet to be uploaded for Debian), this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/gettext/build-logs/

I've written this page to explain how to reproduce the problem:

https://people.debian.org/~sanvila/gettext/

This bug will be raised to important once gettext is uploaded for
experimental, and RC once gettext is uploaded for unstable, but
I still don't know when I will be able to do that. If you fix
this bug, it would help to have gettext in unstable sooner.

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-django, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
test_empty_default_database (test_runner.tests.EmptyDefaultDatabaseTest.test_empty_default_database)
An empty default database in settings does not raise an ImproperlyConfigured ... ok
test_bad_test_runner (test_runner.tests.ManageCommandTests.test_bad_test_runner) ... ok
test_custom_test_runner (test_runner.tests.ManageCommandTests.test_custom_test_runner) ... ok
test_time_recorded (test_runner.tests.ManageCommandTests.test_time_recorded) ... ok
test_run_checks_passes_and_teardown_raises (test_runner.tests.RunTestsExceptionHandlingTests.test_run_checks_passes_and_teardown_raises)
Exceptions on teardown are surfaced if no exceptions happen during ... ok
test_run_checks_raises (test_runner.tests.RunTestsExceptionHandlingTests.test_run_checks_raises)
Teardown functions are run when run_checks() raises SystemCheckError. ... ok
test_run_checks_raises_and_teardown_raises (test_runner.tests.RunTestsExceptionHandlingTests.test_run_checks_raises_and_teardown_raises)
SystemCheckError is surfaced when run_checks() raises SystemCheckError ... ok

======================================================================
FAIL: test_msgfmt_error_including_non_ascii (i18n.test_compilation.CompilationErrorHandling.test_msgfmt_error_including_non_ascii)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/tests/i18n/test_compilation.py", line 224, in test_msgfmt_error_including_non_ascii
    self.assertIn("' cannot start a field name", stderr.getvalue())
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: "' cannot start a field name" not found in "Execution of msgfmt failed: /tmp/django__7khf47c/i18n_23u0gib5/commands/locale/ko/LC_MESSAGES/django.po:24: 'msgstr' is not a valid Python brace format string, unlike 'msgid'. Reason: In the directive number 0, a field name starts with a character that is not alphanumerical or underscore.\nmsgfmt: found 1 fatal error\n"
---------------------------------------------------------------------- Ran 16378 tests in 365.595s FAILED (failures=1, skipped=1288, expected failures=5) Destroying test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')... Destroying test database for alias 'other' ('file:memorydb_other?mode=memory&cache=shared')... Exception ignored while finalizing database connection <sqlite3.Connection object at 0x7fcd9af2b4c0>: ResourceWarning: unclosed database in <sqlite3.Connection object at 0x7fcd9af2b4c0> make[1]: *** [debian/rules:23: override_dh_auto_test] Error 1 make[1]: Leaving directory '/<<PKGBUILDDIR>>' make: *** [debian/rules:9: binary] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2 --------------------------------------------------------------------------------
#1126978#10
Date:
2026-04-08 21:43:55 UTC
From:
To:
forwarded 1126978 https://github.com/django/django/commit/5005b527cb9c7a2bfc76daa7f717bf7e3064e9ce
tags 1126978 patch
thanks

This seems to be fixed upstream, but I have not tested it.

#1126978#21
Date:
2026-06-08 16:27:25 UTC
From:
To:
Hello,

Bug #1126978 in python-django reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/python-team/packages/python-django/-/commit/46932c641b2b8254204dd36bcaa5722e3f9eea76

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1126978

#1126978#28
Date:
2026-06-08 16:33:54 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-django, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1126978@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Chris Lamb <lamby@debian.org> (supplier of updated python-django package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 08 Jun 2026 09:24:04 -0700
Source: python-django
Built-For-Profiles: nocheck
Architecture: source
Version: 3:5.2.15-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Chris Lamb <lamby@debian.org>
Closes: 1126978
Changes:
 python-django (3:5.2.15-2) unstable; urgency=medium
 .
   * Apply a patch from upstream to fix a FTBFS with gettext 0.26.
     (Closes: #1126978)
Checksums-Sha1:
 7c0e355af6e15b68677f19d3be50f168bb649787 2790 python-django_5.2.15-2.dsc
 6e078d321061d67427e784ca577cb84a1ab3067a 38484 python-django_5.2.15-2.debian.tar.xz
 eda54a9eec903b8367c1bc6ed6fa2144ad4dc88a 8159 python-django_5.2.15-2_amd64.buildinfo
Checksums-Sha256:
 78ac825fe507fb75fee42904bd3516c6759cedce2ef70955103f5496400cd046 2790 python-django_5.2.15-2.dsc
 8a4d39427f28b906c05e99b7488227718fc244abd4fed0f63cbfa640ee1845e7 38484 python-django_5.2.15-2.debian.tar.xz
 f2f7ddc49f53ee33dbb6eeabc3a3828f183c60df94c3a8eff0c5dc31e20de9b5 8159 python-django_5.2.15-2_amd64.buildinfo
Files:
 2d65192964d581a78cc5509aec2f3a30 2790 python optional python-django_5.2.15-2.dsc
 76be959ac169fb52c33cec962dcbd287 38484 python optional python-django_5.2.15-2.debian.tar.xz
 e326c16748a4f48aa9ed709e404348d6 8159 python optional python-django_5.2.15-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAmom7XEACgkQHpU+J9Qx
HljvlRAAjwGQczXa1/1+4zrjSE8QHxVf8i1YGdYA6wdrdsTkQgq5QUSpYVLJr8rc
rEaxaMskOSnawq+vE2DPTvyliqvPohCMYcVL5aj0ZWDmXKAOJ1H4fn8ZOtZnWpw2
GQtg6w4Uyc1vxV01vOHIyb/IzCNCqWE2o3fMb5/QxduXWWcKrRCh7Ob4sLTB0CLi
w7ukg0JdkYG/F3tBLxfiI5qFppNSzu8Ip3dhSb9Cs79Enq8dyS5yFP10cUNtaGon
ni4wk92is+I8RivJnTAsQt1NqSqGEGG32Uhs9DJl+2GGKbmDP2mLFfmIE18I5Nxs
oXAtgE2mQte8sNCpYR/PZNhXTCqeOQmVRZ3v5YG+6Qv529gUmPKCiQ8WVacrQe8j
LKskAILdLjAKtdT1rSmGG2XLyBWHhEjPvfqJbbKj4aKrELqMnyPmhpNVzuHtJaS7
Dfk87pkmVX4zFrojzYItf4RMO8Fqton/i8CEI7qnLHfJ2GbISWSqWsfEY5umjjn5
tdr1l+zEtWbDYCqikNOSjp9Ewtl7Qe86q/c8oKlYVAQp/16eF6uyeNNGKMpTsUbL
boYna6Q+5z3cQP/9+KMM5LIrtGjn//W+Tlny/AA8HEsWAsQmjAmyFgypz+lvL4MQ
Wn1yxwYbUML/M5jM6JSJ3zhrpucuQvZAuxH4HZaSpMDQttZxHJU=
=PsM4
-----END PGP SIGNATURE-----