#1149756 python-urllib3: FTBFS: E ValueError: check_hostname requires server_hostname

#1149756#5
Date:
2026-10-02 19:09:47 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/202610/

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

Thanks.
--------------------------------------------------------------------------------
[...]
            if session is not None:
                raise ValueError("session can only be specified in "
                                 "client mode")
        if context.check_hostname and not server_hostname:
/usr/lib/python3.14/ssl.py:387: ValueError
=============================== warnings summary ===============================
test/contrib/test_pyopenssl.py: 15 warnings
test/with_dummyserver/test_socketlevel.py: 18 warnings
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_urllib3/build/test/with_dummyserver/test_socketlevel.py:216: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    context = ssl.SSLContext(ssl_version)

test/contrib/test_socks.py: 19 warnings
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_urllib3/build/dummyserver/socketserver.py:125: NoIPv6Warning: No IPv6 support. Falling back to IPv4.
    warnings.warn("No IPv6 support. Falling back to IPv4.", NoIPv6Warning)

test/contrib/test_socks.py::TestSOCKSWithTLS::test_basic_request
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_urllib3/build/test/contrib/test_socks.py:817: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    context = better_ssl.SSLContext(ssl.PROTOCOL_SSLv23)  # type: ignore[misc]

test/with_dummyserver/test_connectionpool.py::TestConnectionPool::test_source_address
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_urllib3/build/test/with_dummyserver/test_connectionpool.py:857: NoIPv6Warning: No IPv6 support: skipping.
    warnings.warn("No IPv6 support: skipping.", NoIPv6Warning)

test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_cert_with_string_password
test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_cert_with_bytes_password
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_urllib3/build/test/with_dummyserver/test_socketlevel.py:424: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    ssl_context = ssl_.SSLContext(ssl_.PROTOCOL_SSLv23)

test/with_dummyserver/test_socketlevel.py: 10 warnings
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_urllib3/build/test/with_dummyserver/test_socketlevel.py:451: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    context = ssl_.SSLContext(ssl_.PROTOCOL_SSLv23)

test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_load_keyfile_with_invalid_password[0]
test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_load_keyfile_with_invalid_password[1]
test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_load_keyfile_with_invalid_password[letmei0]
test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_load_keyfile_with_invalid_password[letmei1]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_urllib3/build/test/with_dummyserver/test_socketlevel.py:464: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    context = ssl_.SSLContext(ssl_.PROTOCOL_SSLv23)

test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_load_invalid_cert_file
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_urllib3/build/test/with_dummyserver/test_socketlevel.py:474: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    context = ssl_.SSLContext(ssl_.PROTOCOL_SSLv23)

#1149756#8
Date:
2026-10-05 21:47:28 UTC
From:
To:
Hello,

Bug #1149756 in python-urllib3 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-urllib3/-/commit/1f42f43780a60c2d8e179bca71b0e207c9972fc0
------------------------------------------------------------------------
Pass server_hostname in test_start_closed_socket

Closes: #1149756
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1149756

#1149756#15
Date:
2026-10-05 22:06:09 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-urllib3, 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 1149756@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 python-urllib3 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, 05 Oct 2026 22:43:33 +0100
Source: python-urllib3
Architecture: source
Version: 2.8.0-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
Closes: 1149756
Changes:
 python-urllib3 (2.8.0-2) unstable; urgency=medium
 .
   * Team upload.
   * Pass server_hostname in test_start_closed_socket (closes: #1149756).
Checksums-Sha1:
 a59f9b9817330f94769dd806c25c29c4af4d3d18 3045 python-urllib3_2.8.0-2.dsc
 474c2b718628d31cbb479c02d5ac2a67db435c12 39404 python-urllib3_2.8.0-2.debian.tar.xz
 d29d9b120b6932d08b8d7d64ead5f5ebfe32d5bc 1024624 python-urllib3_2.8.0-2.git.tar.xz
 6e68155d1e28f82278e548dcf28cae64e704c773 17752 python-urllib3_2.8.0-2_source.buildinfo
Checksums-Sha256:
 459df6745c56d071f8eb0dc5afa9aaa94382c61c167c02517def63dec59c16fc 3045 python-urllib3_2.8.0-2.dsc
 946345e6f648ee6c9f6e52f5fd840bda27946ff4d885d0069e89d972cd85135e 39404 python-urllib3_2.8.0-2.debian.tar.xz
 123acfd807152eec010e3513d169da3b7bbe330661c3dfbd079d6cd0e5a92cb8 1024624 python-urllib3_2.8.0-2.git.tar.xz
 889c5bd226c5da34703483f84c75920294743697b81cef76ce256de3e44bed64 17752 python-urllib3_2.8.0-2_source.buildinfo
Files:
 152eb257244e455181d65ddff5267779 3045 python optional python-urllib3_2.8.0-2.dsc
 06fdc61045c25f8257aaa0d2aba5dd12 39404 python optional python-urllib3_2.8.0-2.debian.tar.xz
 f4e4fff847ee8c6835897b3a2522b815 1024624 python None python-urllib3_2.8.0-2.git.tar.xz
 f24e77afb62b6bae2860de2a1f6dac78 17752 python optional python-urllib3_2.8.0-2_source.buildinfo
Git-Tag-Info: tag=9aeb9c9511b25abcfbcaeef5588b23e71bffa71c fp=ac0a4ff12611b6fccf01c111393587d97d86500b
Git-Tag-Tagger: Colin Watson <cjwatson@debian.org>
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmrEGzMACgkQYG0ITkaD
wHl1xxAAlKYm7rj2sBN1hs/x7wdghr1azlAQLTl23PXIdipkCI9v13Vo+nZDpRrv
caQuskbgTpEnmPAH/z4+NB2SyoXirtqyYmjsTssbfg2+i9vIuT5iZIbbPG7WIOMo
ibMgSi2q45shFs/+O4iVtQsGqlHkk18XCwUn5vgg2vfpFlQLHDcNRPar20sQa+R/
IMBjdbWwAxEIV/9mkelUv20oUE1KpVjDbtpdqaVTYHrpLZ/+bJsgMrRXI/DICj2q
7cLXBXV7JYsfuP/8t5xG6FmWS1BE0WJ4ICVpQmACxCLSPqYoH7HOHnRnPGNS40t9
pVRa8+ORNH9r+qx+IzQLbzcWe47eKMeKZPn/+qWHvgXyldvQU8q9HOIEdDY6qU4K
pZQ2/LXeMDMTAcQUwkwupuFWjpI9o/n7Qd63ByMQe+BPwfy0PxSJXxQUKHNH5ouL
cpae+OYjmj6iFta6077uWe3/yNDVz72YtNDMBEoBVD6gNBWRvUHThl4sm1jMjWdm
d2NwI5AvB0KP9HwvDwc+tVaTUqIDQqEDXPGCg85oGM+9Uwu8tZilfxdEp9Tflusb
XgW2/E14CLvFyZa6zMqbdklOqsPVr18xCn8tzBLP5wSZxwD7snnz38HAsW6DwEI7
rj3eXYWYL4mW9f6R+U6eBffb2WgsfzbT3C81Aes6RHJVNDYLSYI=
=VLfU
-----END PGP SIGNATURE-----