#1143299 djangorestframework: FTBFS: E TypeError: a bytes-like object is required, not '_TemporaryFileWrapper'

#1143299#5
Date:
2026-08-01 22:35:22 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, 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/build-logs/202608/

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:djangorestframework, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
   debian/rules execute_after_dh_auto_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rm -rf docs.debian
rm -rf .mypy_cache
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild

[... snipped ...]

tests/test_encoders.py ..........                                        [ 15%]
tests/test_exceptions.py ........                                        [ 16%]
tests/test_fields.py ......................                              [ 17%]
tests/test_filters.py ......................................             [ 20%]
tests/test_generics.py ..........................................        [ 22%]
tests/test_htmlrenderer.py .........                                     [ 23%]
tests/test_lazy_hyperlinks.py .                                          [ 23%]
tests/test_metadata.py ....                                              [ 23%]
tests/test_middleware.py ......                                          [ 24%]
tests/test_model_serializer.py ..................s...................... [ 26%]
.................                                                        [ 27%]
tests/test_multitable_inheritance.py ...                                 [ 28%]
tests/test_negotiation.py ...........                                    [ 28%]
tests/test_one_to_one_with_inheritance.py .                              [ 28%]
tests/test_pagination.py ...........                                     [ 29%]
tests/test_parsers.py ............                                       [ 30%]
tests/test_permissions.py .............................................. [ 33%]
....                                                                     [ 33%]
tests/test_prefetch_related.py ...                                       [ 33%]
tests/test_relations_hyperlink.py ......................                 [ 35%]
tests/test_relations_pk.py ....................................          [ 37%]
tests/test_relations_slug.py ...............                             [ 38%]
tests/test_renderers.py ...............................................  [ 41%]
tests/test_request.py ...........................                        [ 43%]
tests/test_requests_client.py ..........                                 [ 43%]
tests/test_response.py ...................                               [ 44%]
tests/test_reverse.py ...                                                [ 45%]
tests/test_routers.py .................................................. [ 48%]
..........                                                               [ 48%]
tests/test_serializer_bulk_update.py .....                               [ 49%]
tests/test_serializer_lists.py .                                         [ 49%]
tests/test_serializer_nested.py ..                                       [ 49%]
tests/test_settings.py .....                                             [ 49%]
tests/test_status.py .                                                   [ 49%]
tests/test_templatetags.py ..........................                    [ 51%]
tests/test_testing.py ........................                           [ 53%]
tests/test_throttling.py .............................                   [ 54%]
tests/test_urlpatterns.py ...........                                    [ 55%]
tests/test_utils.py ........................                             [ 57%]
tests/test_validation.py ..............                                  [ 58%]
tests/test_validation_error.py .....                                     [ 58%]
tests/test_validators.py ............................................... [ 61%]
....                                                                     [ 61%]
tests/test_versioning.py ..........                                      [ 62%]
tests/test_views.py .......                                              [ 62%]
tests/test_viewsets.py ..................                                [ 63%]
tests/test_write_only_fields.py ..                                       [ 64%]
tests/test_atomic_requests.py .                                          [ 64%]
tests/importable/test_installed.py ...                                   [ 64%]
tests/schemas/test_coreapi.py .....                                      [ 64%]
tests/test_bound_fields.py ...........                                   [ 65%]
tests/test_description.py .                                              [ 65%]
tests/test_exceptions.py ..                                              [ 65%]
tests/test_fields.py ................................................... [ 68%]
........................................................................ [ 73%]
..............................................sss....................... [ 78%]
........................................................................ [ 82%]
............................                                             [ 84%]
tests/test_filters.py ....                                               [ 84%]
tests/test_metadata.py ..........                                        [ 85%]
tests/test_pagination.py .........................................       [ 87%]
tests/test_relations.py ................................................ [ 91%]
......                                                                   [ 91%]
tests/test_renderers.py .........                                        [ 91%]
tests/test_serializer.py ............................................... [ 95%]
.........                                                                [ 95%]
tests/test_serializer_lists.py ..................................        [ 97%]
tests/test_serializer_nested.py ................                         [ 98%]
tests/test_templates.py ..                                               [ 98%]
tests/test_testing.py .                                                  [ 98%]
tests/test_versioning.py ................                                [100%]

=================================== FAILURES ===================================

#1143299#10
Date:
2026-08-02 18:50:23 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
djangorestframework, 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 1143299@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <cjwatson@debian.org> (supplier of updated djangorestframework 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: Sun, 02 Aug 2026 19:30:08 +0100
Source: djangorestframework
Architecture: source
Version: 3.17.1-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
Closes: 1143299
Changes:
 djangorestframework (3.17.1-1) unstable; urgency=medium
 .
   * Team upload.
   * New upstream release.
     - Drop deprecated coreapi support (closes: #1143299).
Checksums-Sha1:
 91d9ce5bf0be7088cb2c3622df3d026267a7af43 3021 djangorestframework_3.17.1-1.dsc
 d0f837d20db7b3f98a54bf4b441a569408c309d3 11674142 djangorestframework_3.17.1.orig.tar.gz
 fbf41f2a2de12487b5df31415ded2e63d39da0db 298272 djangorestframework_3.17.1-1.debian.tar.xz
 d5cbc81f878004df6787b4c29d611f9cd5783bd3 9009 djangorestframework_3.17.1-1_source.buildinfo
Checksums-Sha256:
 2729a4ac516f2cb8022a6c25894ca4aa39b5dded6fea395b17fcd054ba25d6eb 3021 djangorestframework_3.17.1-1.dsc
 47af39efbdc46be16495320122372b51551f672a715f0c04ae394445a9576d5f 11674142 djangorestframework_3.17.1.orig.tar.gz
 66c62ffd981c8825a4eb551c05423da218f0ef887d1c68702899b1676e7c7f65 298272 djangorestframework_3.17.1-1.debian.tar.xz
 af631daf4e620d8fd321e993ccfcdfbd28206e09e0515a770b055cf685eb30ff 9009 djangorestframework_3.17.1-1_source.buildinfo
Files:
 0519646fce357856d5f469e95b65cbf3 3021 python optional djangorestframework_3.17.1-1.dsc
 897cf6a52956ca4821e9395ed701cace 11674142 python optional djangorestframework_3.17.1.orig.tar.gz
 ecf1e4122575c91dc9bbe85798b839e3 298272 python optional djangorestframework_3.17.1-1.debian.tar.xz
 7a2cda4c632a925fe90fa3c1ec0673ff 9009 python optional djangorestframework_3.17.1-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAmpvjNQACgkQOTWH2X2G
UAsw6Q/+KkEbRjqUgu/tg+xRK/Q/pxTUd/SthaTiU5tZwdKfR537FtlmVJdiS1d5
Xudwfgni0X6WRwzkug1Cr+rSPSvfp7+HDkS1W8aq7em7df1FEuZWTQDgHFdo+xA2
yOX9HVDHUqkDzFyrBZObVpY99OGAFgQSD7DSDMfnmBJKdDarL81dZ6vMgnCW7ciV
4QsaVUaMm83+I9lboxs9j271FtLLU7WKg7q2UzEyPwawXp3bpWQKbaZWKMlU0VRu
YRn8C6egECpMXDryCihcze662QnsjlTbeOPLc+XFtrlg5bpqXYp8haAKfMoa5oPm
3uXYmE0Ggq0M1xicInlj0MkczH/xiSVvMILRyHAItxbvKMqO/OeQbRZt0nvm19we
/H6VDbNJMwwXhVeMKhj6EwTf5G1+BdLrIq4LHoA8T+MDuC2veTqosB5wCIu37j7d
WMZWvBfjg8iz7tn2IbM6NjUbpsAOQcvizpqqsYfGyjzigVbj8D4kydIu7p9zUusK
HU90bwPPS4TqQhrKTkZzrbe5iRwk/7Ic3i6dvm1Zs01TEGSVEBXb6pj7Ic9IU4tI
7qjohKTn6V8rmHVuyO9BgfjaA8d9m3uGdfej91ZtCZ0ikPMA1qJxgWH+3wjRSqpx
0TOcCW2p69CrrN+UJ8wv0XcpKnAhyzHf7NQqSmaOfWsSsGk8qdc=
=zfiy
-----END PGP SIGNATURE-----