Package: src:requests
Version: 2.32.3+dfsg-1
Tags: ftbfs trixie sid
User: [email protected]
Usertags: ftbfs-during-trixie-support-period

Dear maintainer:

During a rebuild of all packages in unstable in the year 2028, your package 
failed to build:

--------------------------------------------------------------------------------
[...]
 debian/rules build
dh build --with python3,sphinxdoc --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:129: Building wheel for python3.13 with "build" 
module
I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation 
--wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_requests  
* Building wheel...
<string>:7: SetuptoolsDeprecationWarning: The test command is disabled and 
references to it are deprecated.
!!

        
********************************************************************************

[... snipped ...]

        except MaxRetryError as e:
            if isinstance(e.reason, ConnectTimeoutError):
                # TODO: Remove this in 3.0.0: see #2811
                if not isinstance(e.reason, NewConnectionError):
                    raise ConnectTimeout(e, request=request)
    
            if isinstance(e.reason, ResponseError):
                raise RetryError(e, request=request)
    
            if isinstance(e.reason, _ProxyError):
                raise ProxyError(e, request=request)
    
            if isinstance(e.reason, _SSLError):
                # This branch is for urllib3 v1.22 and later.
>               raise SSLError(e, request=request)
E               requests.exceptions.SSLError: 
HTTPSConnectionPool(host='localhost', port=49275): Max retries exceeded with 
url: / (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_CERTIFICATE_EXPIRED] 
ssl/tls alert certificate expired (_ssl.c:2639)')))

requests/adapters.py:698: SSLError
=============================== warnings summary ===============================
tests/test_requests.py::TestRequests::test_set_basicauth[42-42]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_requests/build/requests/auth.py:36: 
DeprecationWarning: Non-string usernames will no longer be supported in 
Requests 3.0.0. Please convert the object you've passed in (42) to a string or 
bytes object in the near future to avoid problems.
    warnings.warn(

tests/test_requests.py::TestRequests::test_set_basicauth[42-42]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_requests/build/requests/auth.py:46: 
DeprecationWarning: Non-string passwords will no longer be supported in 
Requests 3.0.0. Please convert the object you've passed in (<class 'int'>) to a 
string or bytes object in the near future to avoid problems.
    warnings.warn(

tests/test_requests.py::TestRequests::test_set_basicauth[None-None]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_requests/build/requests/auth.py:36: 
DeprecationWarning: Non-string usernames will no longer be supported in 
Requests 3.0.0. Please convert the object you've passed in (None) to a string 
or bytes object in the near future to avoid problems.
    warnings.warn(

tests/test_requests.py::TestRequests::test_set_basicauth[None-None]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_requests/build/requests/auth.py:46: 
DeprecationWarning: Non-string passwords will no longer be supported in 
Requests 3.0.0. Please convert the object you've passed in (<class 'NoneType'>) 
to a string or bytes object in the near future to avoid problems.
    warnings.warn(

tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_tls_settings_verify_True
tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_tls_settings_verify_bundle_expired_cert
tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_tls_settings_verify_bundle_unexpired_cert
tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_mtls_settings
  /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1099: 
InsecureRequestWarning: Unverified HTTPS request is being made to host 
'localhost'. Adding certificate verification is strongly advised. See: 
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
    warnings.warn(

tests/test_testserver.py::TestTestServer::test_server_closes
  /usr/lib/python3/dist-packages/_pytest/python.py:159: ResourceWarning: 
unclosed <socket.socket fd=13, family=2, type=1, proto=0, laddr=('0.0.0.0', 
36956)>
    result = testfunction(**testargs)
  Enable tracemalloc to get traceback where the object was allocated.
  See 
https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings
 for more info.

tests/test_testserver.py::TestTestServer::test_basic_waiting_server
  /usr/lib/python3/dist-packages/_pytest/python.py:159: ResourceWarning: 
unclosed <socket.socket fd=14, family=2, type=1, proto=0, laddr=('127.0.0.1', 
44010)>
    result = testfunction(**testargs)
  Enable tracemalloc to get traceback where the object was allocated.
  See 
https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings
 for more info.

tests/test_utils.py::TestContentEncodingDetection::test_none
tests/test_utils.py::TestContentEncodingDetection::test_pragmas[<meta 
charset="UTF-8">]
tests/test_utils.py::TestContentEncodingDetection::test_pragmas[<meta 
http-equiv="Content-type" content="text/html;charset=UTF-8">]
tests/test_utils.py::TestContentEncodingDetection::test_pragmas[<meta 
http-equiv="Content-type" content="text/html;charset=UTF-8" />]
tests/test_utils.py::TestContentEncodingDetection::test_pragmas[<?xml 
version="1.0" encoding="UTF-8"?>]
tests/test_utils.py::TestContentEncodingDetection::test_precedence
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_requests/build/requests/utils.py:494: 
DeprecationWarning: In requests 3.0, get_encodings_from_content will be 
removed. For more information, please see the discussion on issue #2266. (This 
warning should only appear once.)
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED 
tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_mtls_settings
=== 1 failed, 423 passed, 15 skipped, 167 deselected, 16 warnings in 37.40s ====
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_requests/build; python3.13 -m pytest 
tests -k "not test_use_proxy_from_environment and not TestGetEnvironProxies and 
not test_mixed_case_scheme_acceptable and not test_HTTP_200_OK_GET_ALTERNATIVE 
and not test_unicode_get and not test_HTTP_302_ALLOW_REDIRECT_GET and not 
test_HTTP_307_ALLOW_REDIRECT_POST and not 
test_HTTP_307_ALLOW_REDIRECT_POST_WITH_SEEKABLE and not 
test_HTTP_302_TOO_MANY_REDIRECTS and not 
test_HTTP_302_TOO_MANY_REDIRECTS_WITH_PARAMS and not 
test_http_301_changes_post_to_get and not 
test_http_301_doesnt_change_head_to_get and not 
test_http_302_changes_post_to_get and not 
test_http_302_doesnt_change_head_to_get and not 
test_http_303_changes_post_to_get and not 
test_http_303_doesnt_change_head_to_get and not 
test_header_and_body_removal_on_redirect and not 
test_transfer_enc_removal_on_redirect and not 
test_fragment_maintained_on_redirect and not test_HTTP_
 200_OK_GET_WITH_PARAMS and not test_HTTP_200_OK_GET_WITH_MIXED_PARAMS and not 
test_set_cookie_on_301 and not test_cookie_sent_on_redirect and not 
test_cookie_removed_on_expire and not test_cookie_quote_wrapped and not 
test_cookie_persists_via_api and not 
test_request_cookie_overrides_session_cookie and not 
test_request_cookies_not_persisted and not test_generic_cookiejar_works and not 
test_param_cookiejar_works and not test_cookielib_cookiejar_on_redirect and not 
test_requests_in_history_are_not_overridden and not 
test_history_is_always_a_list and not test_user_agent_transfers and not 
test_HTTP_200_OK_HEAD and not test_HTTP_200_OK_PUT and not 
test_BASICAUTH_TUPLE_HTTP_200_OK_GET and not 
test_proxy_authorization_preserved_on_request and not test_basicauth_with_netrc 
and not test_DIGEST_HTTP_200_OK_GET and not test_DIGEST_AUTH_RETURNS_COOKIE and 
not test_DIGEST_AUTH_SETS_SESSION_COOKIES and not test_DIGEST_STREAM and not 
test_DIGESTAUTH_WRONG_HTTP_401_GET and not test_DIGESTAUTH_QUOTE
 S_QOP_VALUE and not test_POSTBIN_GET_POST_FILES and not 
test_invalid_files_input and not test_POSTBIN_SEEKED_OBJECT_WITH_NO_ITER and 
not test_POSTBIN_GET_POST_FILES_WITH_DATA and not test_post_with_custom_mapping 
and not test_conflicting_post_params and not test_request_ok_set and not 
test_status_raising and not test_decompress_gzip and not 
test_unicode_header_name and not test_pyopenssl_redirect and not 
test_http_with_certificate and not test_certificate_failure and not 
test_urlencoded_get_query_multivalued_param and not 
test_different_encodings_dont_break_post and not test_unicode_multipart_post 
and not test_unicode_method_name and not 
test_unicode_method_name_with_request_object and not test_custom_content_type 
and not test_hook_receives_request_arguments and not test_prepared_request_hook 
and not test_prepared_from_session and not test_request_with_bytestring_host 
and not test_time_elapsed_blank and not 
test_request_and_response_are_pickleable and not test_prepared_request_is_pi
 ckleable and not test_prepared_request_with_file_is_pickleable and not 
test_prepared_request_with_hook_is_pickleable and not test_session_pickling and 
not test_fixes_1329 and not test_uppercase_scheme_redirect and not 
test_header_remove_is_case_insensitive and not 
test_params_are_merged_case_sensitive and not test_header_validation and not 
test_auth_is_stripped_on_http_downgrade and not 
test_auth_is_retained_for_redirect_on_host and not 
test_manual_redirect_with_partial_body_read and not 
test_redirect_with_wrong_gzipped_header and not test_requests_history_is_saved 
and not test_json_param_post_content_type_works and not 
test_response_iter_lines and not test_response_context_manager and not 
test_unconsumed_session_response_closes_connection and not 
test_response_json_when_content_is_None and not test_custom_redirect_mixin and 
not test_stream_timeout and not test_none_timeout and not test_read_timeout and 
not test_connect_timeout and not test_total_timeout_connect and not test_encoded
 _methods and not test_proxy_env_vars_override_default and not 
test_urllib3_retries and not test_redirecting_to_bad_url and not 
test_json_decode_compatibility and not test_set_environ and not 
test_json_decode_persists_doc_attr and not test_header_with_subclass_types and 
not test_urllib3_pool_connection_closed"
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_requests/build; 
python3.12 -m pytest tests -k "not test_use_proxy_from_environment and not 
TestGetEnvironProxies and not test_mixed_case_scheme_acceptable and not 
test_HTTP_200_OK_GET_ALTERNATIVE and not test_unicode_get and not 
test_HTTP_302_ALLOW_REDIRECT_GET and not test_HTTP_307_ALLOW_REDIRECT_POST and 
not test_HTTP_307_ALLOW_REDIRECT_POST_WITH_SEEKABLE and not 
test_HTTP_302_TOO_MANY_REDIRECTS and not 
test_HTTP_302_TOO_MANY_REDIRECTS_WITH_PARAMS and not 
test_http_301_changes_post_to_get and not 
test_http_301_doesnt_change_head_to_get and not 
test_http_302_changes_post_to_get and not 
test_http_302_doesnt_change_head_to_get and not 
test_http_303_changes_post_to_get and not 
test_http_303_doesnt_change_head_to_get and not 
test_header_and_body_removal_on_redirect and not 
test_transfer_enc_removal_on_redirect and not 
test_fragment_maintained_on_redirect and not test_HTTP_200_OK_GET_WITH_PARAMS 
and not test_HTTP_200_OK_GET_
 WITH_MIXED_PARAMS and not test_set_cookie_on_301 and not 
test_cookie_sent_on_redirect and not test_cookie_removed_on_expire and not 
test_cookie_quote_wrapped and not test_cookie_persists_via_api and not 
test_request_cookie_overrides_session_cookie and not 
test_request_cookies_not_persisted and not test_generic_cookiejar_works and not 
test_param_cookiejar_works and not test_cookielib_cookiejar_on_redirect and not 
test_requests_in_history_are_not_overridden and not 
test_history_is_always_a_list and not test_user_agent_transfers and not 
test_HTTP_200_OK_HEAD and not test_HTTP_200_OK_PUT and not 
test_BASICAUTH_TUPLE_HTTP_200_OK_GET and not 
test_proxy_authorization_preserved_on_request and not test_basicauth_with_netrc 
and not test_DIGEST_HTTP_200_OK_GET and not test_DIGEST_AUTH_RETURNS_COOKIE and 
not test_DIGEST_AUTH_SETS_SESSION_COOKIES and not test_DIGEST_STREAM and not 
test_DIGESTAUTH_WRONG_HTTP_401_GET and not test_DIGESTAUTH_QUOTES_QOP_VALUE and 
not test_POSTBIN_GET_POST_FILES and 
 not test_invalid_files_input and not test_POSTBIN_SEEKED_OBJECT_WITH_NO_ITER 
and not test_POSTBIN_GET_POST_FILES_WITH_DATA and not 
test_post_with_custom_mapping and not test_conflicting_post_params and not 
test_request_ok_set and not test_status_raising and not test_decompress_gzip 
and not test_unicode_header_name and not test_pyopenssl_redirect and not 
test_http_with_certificate and not test_certificate_failure and not 
test_urlencoded_get_query_multivalued_param and not 
test_different_encodings_dont_break_post and not test_unicode_multipart_post 
and not test_unicode_method_name and not 
test_unicode_method_name_with_request_object and not test_custom_content_type 
and not test_hook_receives_request_arguments and not test_prepared_request_hook 
and not test_prepared_from_session and not test_request_with_bytestring_host 
and not test_time_elapsed_blank and not 
test_request_and_response_are_pickleable and not 
test_prepared_request_is_pickleable and not test_prepared_request_with_file_is_
 pickleable and not test_prepared_request_with_hook_is_pickleable and not 
test_session_pickling and not test_fixes_1329 and not 
test_uppercase_scheme_redirect and not test_header_remove_is_case_insensitive 
and not test_params_are_merged_case_sensitive and not test_header_validation 
and not test_auth_is_stripped_on_http_downgrade and not 
test_auth_is_retained_for_redirect_on_host and not 
test_manual_redirect_with_partial_body_read and not 
test_redirect_with_wrong_gzipped_header and not test_requests_history_is_saved 
and not test_json_param_post_content_type_works and not 
test_response_iter_lines and not test_response_context_manager and not 
test_unconsumed_session_response_closes_connection and not 
test_response_json_when_content_is_None and not test_custom_redirect_mixin and 
not test_stream_timeout and not test_none_timeout and not test_read_timeout and 
not test_connect_timeout and not test_total_timeout_connect and not 
test_encoded_methods and not test_proxy_env_vars_override_defaul
 t and not test_urllib3_retries and not test_redirecting_to_bad_url and not 
test_json_decode_compatibility and not test_set_environ and not 
test_json_decode_persists_doc_attr and not test_header_with_subclass_types and 
not test_urllib3_pool_connection_closed"
============================= test session starts ==============================
platform linux -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_requests/build
configfile: pyproject.toml
plugins: mock-3.14.0, typeguard-4.4.1, httpbin-2.1.0
collected 606 items / 167 deselected / 439 selected

tests/test_adapters.py .                                                 [  0%]
tests/test_help.py ...                                                   [  0%]
tests/test_hooks.py ...                                                  [  1%]
tests/test_lowlevel.py ...........                                       [  4%]
tests/test_packages.py ...                                               [  4%]
tests/test_requests.py ................................................. [ 15%]
.......s................................................................ [ 32%]
........................................................................ [ 48%]
.............F.                                                          [ 52%]
tests/test_structures.py ....................                            [ 56%]
tests/test_testserver.py ......s....                                     [ 59%]
tests/test_utils.py ..s................................................. [ 71%]
........................................................................ [ 87%]
...........................................ssssssssssss                  [100%]

=================================== FAILURES ===================================
______ TestPreparingURLs.test_different_connection_pool_for_mtls_settings ______
urllib3.exceptions.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_EXPIRED] ssl/tls 
alert certificate expired (_ssl.c:2571)

The above exception was the direct cause of the following exception:

self = <requests.adapters.HTTPAdapter object at 0x7f08ca0fe7b0>
request = <PreparedRequest [GET]>, stream = False
timeout = Timeout(connect=None, read=None, total=None), verify = False
cert = ('tests/certs/mtls/client/client.pem', 
'tests/certs/mtls/client/client.key')
proxies = OrderedDict()

    def send(
        self, request, stream=False, timeout=None, verify=True, cert=None, 
proxies=None
    ):
        """Sends PreparedRequest object. Returns Response object.
    
        :param request: The :class:`PreparedRequest <PreparedRequest>` being 
sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls 
whether
            we verify the server's TLS certificate, or a string, in which case 
it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the 
request.
        :rtype: requests.Response
        """
    
        try:
            conn = self.get_connection_with_tls_context(
                request, verify, proxies=proxies, cert=cert
            )
        except LocationValueError as e:
            raise InvalidURL(e, request=request)
    
        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(
            request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies,
        )
    
        chunked = not (request.body is None or "Content-Length" in 
request.headers)
    
        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError:
                raise ValueError(
                    f"Invalid timeout {timeout}. Pass a (connect, read) timeout 
tuple, "
                    f"or a single float to set both timeouts to the same value."
                )
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)
    
        try:
>           resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked,
            )

requests/adapters.py:667: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:843: in urlopen
    retries = retries.increment(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Retry(total=0, connect=None, read=False, redirect=None, status=None)
method = 'GET', url = '/', response = None
error = SSLError(SSLError(1, '[SSL: SSLV3_ALERT_CERTIFICATE_EXPIRED] ssl/tls 
alert certificate expired (_ssl.c:2571)'))
_pool = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f08ca0ffb00>
_stacktrace = <traceback object at 0x7f08ca887e00>

    def increment(
        self,
        method: str | None = None,
        url: str | None = None,
        response: BaseHTTPResponse | None = None,
        error: Exception | None = None,
        _pool: ConnectionPool | None = None,
        _stacktrace: TracebackType | None = None,
    ) -> Self:
        """Return a new Retry object with incremented retry counters.
    
        :param response: A response object, or None, if the server did not
            return a response.
        :type response: :class:`~urllib3.response.BaseHTTPResponse`
        :param Exception error: An error encountered during the request, or
            None if the response was received successfully.
    
        :return: A new ``Retry`` object.
        """
        if self.total is False and error:
            # Disabled, indicate to re-raise the error.
            raise reraise(type(error), error, _stacktrace)
    
        total = self.total
        if total is not None:
            total -= 1
    
        connect = self.connect
        read = self.read
        redirect = self.redirect
        status_count = self.status
        other = self.other
        cause = "unknown"
        status = None
        redirect_location = None
    
        if error and self._is_connection_error(error):
            # Connect retry?
            if connect is False:
                raise reraise(type(error), error, _stacktrace)
            elif connect is not None:
                connect -= 1
    
        elif error and self._is_read_error(error):
            # Read retry?
            if read is False or method is None or not 
self._is_method_retryable(method):
                raise reraise(type(error), error, _stacktrace)
            elif read is not None:
                read -= 1
    
        elif error:
            # Other retry?
            if other is not None:
                other -= 1
    
        elif response and response.get_redirect_location():
            # Redirect retry?
            if redirect is not None:
                redirect -= 1
            cause = "too many redirects"
            response_redirect_location = response.get_redirect_location()
            if response_redirect_location:
                redirect_location = response_redirect_location
            status = response.status
    
        else:
            # Incrementing because of a server error like a 500 in
            # status_forcelist and the given method is in the allowed_methods
            cause = ResponseError.GENERIC_ERROR
            if response and response.status:
                if status_count is not None:
                    status_count -= 1
                cause = 
ResponseError.SPECIFIC_ERROR.format(status_code=response.status)
                status = response.status
    
        history = self.history + (
            RequestHistory(method, url, error, status, redirect_location),
        )
    
        new_retry = self.new(
            total=total,
            connect=connect,
            read=read,
            redirect=redirect,
            status=status_count,
            other=other,
            history=history,
        )
    
        if new_retry.is_exhausted():
            reason = error or ResponseError(cause)
>           raise MaxRetryError(_pool, url, reason) from reason  # type: 
> ignore[arg-type]
E           urllib3.exceptions.MaxRetryError: 
HTTPSConnectionPool(host='localhost', port=50363): Max retries exceeded with 
url: / (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_CERTIFICATE_EXPIRED] 
ssl/tls alert certificate expired (_ssl.c:2571)')))

/usr/lib/python3/dist-packages/urllib3/util/retry.py:519: MaxRetryError

During handling of the above exception, another exception occurred:

self = <tests.test_requests.TestPreparingURLs object at 0x7f08ca3e71d0>

    def test_different_connection_pool_for_mtls_settings(self):
        client_cert = None
    
        def response_handler(sock):
            nonlocal client_cert
            client_cert = sock.getpeercert()
            consume_socket_content(sock, timeout=0.5)
            sock.send(
                b"HTTP/1.1 200 OK\r\n"
                b"Content-Length: 18\r\n\r\n"
                b'\xff\xfe{\x00"\x00K0"\x00=\x00"\x00\xab0"\x00\r\n'
            )
    
        s = requests.Session()
        close_server = threading.Event()
        server = TLSServer(
            handler=response_handler,
            wait_to_close_event=close_server,
            requests_to_handle=2,
            cert_chain="tests/certs/expired/server/server.pem",
            keyfile="tests/certs/expired/server/server.key",
            mutual_tls=True,
            cacert="tests/certs/expired/ca/ca.crt",
        )
    
        cert = (
            "tests/certs/mtls/client/client.pem",
            "tests/certs/mtls/client/client.key",
        )
        with server as (host, port):
            url = f"https://{host}:{port}";
>           r1 = s.get(url, verify=False, cert=cert)

tests/test_requests.py:2961: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
requests/sessions.py:602: in get
    return self.request("GET", url, **kwargs)
requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <requests.adapters.HTTPAdapter object at 0x7f08ca0fe7b0>
request = <PreparedRequest [GET]>, stream = False
timeout = Timeout(connect=None, read=None, total=None), verify = False
cert = ('tests/certs/mtls/client/client.pem', 
'tests/certs/mtls/client/client.key')
proxies = OrderedDict()

    def send(
        self, request, stream=False, timeout=None, verify=True, cert=None, 
proxies=None
    ):
        """Sends PreparedRequest object. Returns Response object.
    
        :param request: The :class:`PreparedRequest <PreparedRequest>` being 
sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls 
whether
            we verify the server's TLS certificate, or a string, in which case 
it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the 
request.
        :rtype: requests.Response
        """
    
        try:
            conn = self.get_connection_with_tls_context(
                request, verify, proxies=proxies, cert=cert
            )
        except LocationValueError as e:
            raise InvalidURL(e, request=request)
    
        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(
            request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies,
        )
    
        chunked = not (request.body is None or "Content-Length" in 
request.headers)
    
        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError:
                raise ValueError(
                    f"Invalid timeout {timeout}. Pass a (connect, read) timeout 
tuple, "
                    f"or a single float to set both timeouts to the same value."
                )
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)
    
        try:
            resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked,
            )
    
        except (ProtocolError, OSError) as err:
            raise ConnectionError(err, request=request)
    
        except MaxRetryError as e:
            if isinstance(e.reason, ConnectTimeoutError):
                # TODO: Remove this in 3.0.0: see #2811
                if not isinstance(e.reason, NewConnectionError):
                    raise ConnectTimeout(e, request=request)
    
            if isinstance(e.reason, ResponseError):
                raise RetryError(e, request=request)
    
            if isinstance(e.reason, _ProxyError):
                raise ProxyError(e, request=request)
    
            if isinstance(e.reason, _SSLError):
                # This branch is for urllib3 v1.22 and later.
>               raise SSLError(e, request=request)
E               requests.exceptions.SSLError: 
HTTPSConnectionPool(host='localhost', port=50363): Max retries exceeded with 
url: / (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_CERTIFICATE_EXPIRED] 
ssl/tls alert certificate expired (_ssl.c:2571)')))

requests/adapters.py:698: SSLError
=============================== warnings summary ===============================
tests/test_requests.py::TestRequests::test_set_basicauth[42-42]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_requests/build/requests/auth.py:36: 
DeprecationWarning: Non-string usernames will no longer be supported in 
Requests 3.0.0. Please convert the object you've passed in (42) to a string or 
bytes object in the near future to avoid problems.
    warnings.warn(

tests/test_requests.py::TestRequests::test_set_basicauth[42-42]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_requests/build/requests/auth.py:46: 
DeprecationWarning: Non-string passwords will no longer be supported in 
Requests 3.0.0. Please convert the object you've passed in (<class 'int'>) to a 
string or bytes object in the near future to avoid problems.
    warnings.warn(

tests/test_requests.py::TestRequests::test_set_basicauth[None-None]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_requests/build/requests/auth.py:36: 
DeprecationWarning: Non-string usernames will no longer be supported in 
Requests 3.0.0. Please convert the object you've passed in (None) to a string 
or bytes object in the near future to avoid problems.
    warnings.warn(

tests/test_requests.py::TestRequests::test_set_basicauth[None-None]
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_requests/build/requests/auth.py:46: 
DeprecationWarning: Non-string passwords will no longer be supported in 
Requests 3.0.0. Please convert the object you've passed in (<class 'NoneType'>) 
to a string or bytes object in the near future to avoid problems.
    warnings.warn(

tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_tls_settings_verify_True
tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_tls_settings_verify_bundle_expired_cert
tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_tls_settings_verify_bundle_unexpired_cert
tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_mtls_settings
  /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1099: 
InsecureRequestWarning: Unverified HTTPS request is being made to host 
'localhost'. Adding certificate verification is strongly advised. See: 
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
    warnings.warn(

tests/test_testserver.py::TestTestServer::test_server_closes
  /usr/lib/python3/dist-packages/_pytest/python.py:159: ResourceWarning: 
unclosed <socket.socket fd=13, family=2, type=1, proto=0, laddr=('0.0.0.0', 
58082)>
    result = testfunction(**testargs)
  Enable tracemalloc to get traceback where the object was allocated.
  See 
https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings
 for more info.

tests/test_testserver.py::TestTestServer::test_basic_waiting_server
  /usr/lib/python3/dist-packages/_pytest/python.py:159: ResourceWarning: 
unclosed <socket.socket fd=14, family=2, type=1, proto=0, laddr=('127.0.0.1', 
56170)>
    result = testfunction(**testargs)
  Enable tracemalloc to get traceback where the object was allocated.
  See 
https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings
 for more info.

tests/test_utils.py::TestContentEncodingDetection::test_none
tests/test_utils.py::TestContentEncodingDetection::test_pragmas[<meta 
charset="UTF-8">]
tests/test_utils.py::TestContentEncodingDetection::test_pragmas[<meta 
http-equiv="Content-type" content="text/html;charset=UTF-8">]
tests/test_utils.py::TestContentEncodingDetection::test_pragmas[<meta 
http-equiv="Content-type" content="text/html;charset=UTF-8" />]
tests/test_utils.py::TestContentEncodingDetection::test_pragmas[<?xml 
version="1.0" encoding="UTF-8"?>]
tests/test_utils.py::TestContentEncodingDetection::test_precedence
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_requests/build/requests/utils.py:494: 
DeprecationWarning: In requests 3.0, get_encodings_from_content will be 
removed. For more information, please see the discussion on issue #2266. (This 
warning should only appear once.)
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED 
tests/test_requests.py::TestPreparingURLs::test_different_connection_pool_for_mtls_settings
=== 1 failed, 423 passed, 15 skipped, 167 deselected, 16 warnings in 37.45s ====
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_requests/build; python3.12 -m pytest 
tests -k "not test_use_proxy_from_environment and not TestGetEnvironProxies and 
not test_mixed_case_scheme_acceptable and not test_HTTP_200_OK_GET_ALTERNATIVE 
and not test_unicode_get and not test_HTTP_302_ALLOW_REDIRECT_GET and not 
test_HTTP_307_ALLOW_REDIRECT_POST and not 
test_HTTP_307_ALLOW_REDIRECT_POST_WITH_SEEKABLE and not 
test_HTTP_302_TOO_MANY_REDIRECTS and not 
test_HTTP_302_TOO_MANY_REDIRECTS_WITH_PARAMS and not 
test_http_301_changes_post_to_get and not 
test_http_301_doesnt_change_head_to_get and not 
test_http_302_changes_post_to_get and not 
test_http_302_doesnt_change_head_to_get and not 
test_http_303_changes_post_to_get and not 
test_http_303_doesnt_change_head_to_get and not 
test_header_and_body_removal_on_redirect and not 
test_transfer_enc_removal_on_redirect and not 
test_fragment_maintained_on_redirect and not test_HTTP_
 200_OK_GET_WITH_PARAMS and not test_HTTP_200_OK_GET_WITH_MIXED_PARAMS and not 
test_set_cookie_on_301 and not test_cookie_sent_on_redirect and not 
test_cookie_removed_on_expire and not test_cookie_quote_wrapped and not 
test_cookie_persists_via_api and not 
test_request_cookie_overrides_session_cookie and not 
test_request_cookies_not_persisted and not test_generic_cookiejar_works and not 
test_param_cookiejar_works and not test_cookielib_cookiejar_on_redirect and not 
test_requests_in_history_are_not_overridden and not 
test_history_is_always_a_list and not test_user_agent_transfers and not 
test_HTTP_200_OK_HEAD and not test_HTTP_200_OK_PUT and not 
test_BASICAUTH_TUPLE_HTTP_200_OK_GET and not 
test_proxy_authorization_preserved_on_request and not test_basicauth_with_netrc 
and not test_DIGEST_HTTP_200_OK_GET and not test_DIGEST_AUTH_RETURNS_COOKIE and 
not test_DIGEST_AUTH_SETS_SESSION_COOKIES and not test_DIGEST_STREAM and not 
test_DIGESTAUTH_WRONG_HTTP_401_GET and not test_DIGESTAUTH_QUOTE
 S_QOP_VALUE and not test_POSTBIN_GET_POST_FILES and not 
test_invalid_files_input and not test_POSTBIN_SEEKED_OBJECT_WITH_NO_ITER and 
not test_POSTBIN_GET_POST_FILES_WITH_DATA and not test_post_with_custom_mapping 
and not test_conflicting_post_params and not test_request_ok_set and not 
test_status_raising and not test_decompress_gzip and not 
test_unicode_header_name and not test_pyopenssl_redirect and not 
test_http_with_certificate and not test_certificate_failure and not 
test_urlencoded_get_query_multivalued_param and not 
test_different_encodings_dont_break_post and not test_unicode_multipart_post 
and not test_unicode_method_name and not 
test_unicode_method_name_with_request_object and not test_custom_content_type 
and not test_hook_receives_request_arguments and not test_prepared_request_hook 
and not test_prepared_from_session and not test_request_with_bytestring_host 
and not test_time_elapsed_blank and not 
test_request_and_response_are_pickleable and not test_prepared_request_is_pi
 ckleable and not test_prepared_request_with_file_is_pickleable and not 
test_prepared_request_with_hook_is_pickleable and not test_session_pickling and 
not test_fixes_1329 and not test_uppercase_scheme_redirect and not 
test_header_remove_is_case_insensitive and not 
test_params_are_merged_case_sensitive and not test_header_validation and not 
test_auth_is_stripped_on_http_downgrade and not 
test_auth_is_retained_for_redirect_on_host and not 
test_manual_redirect_with_partial_body_read and not 
test_redirect_with_wrong_gzipped_header and not test_requests_history_is_saved 
and not test_json_param_post_content_type_works and not 
test_response_iter_lines and not test_response_context_manager and not 
test_unconsumed_session_response_closes_connection and not 
test_response_json_when_content_is_None and not test_custom_redirect_mixin and 
not test_stream_timeout and not test_none_timeout and not test_read_timeout and 
not test_connect_timeout and not test_total_timeout_connect and not test_encoded
 _methods and not test_proxy_env_vars_override_default and not 
test_urllib3_retries and not test_redirecting_to_bad_url and not 
test_json_decode_compatibility and not test_set_environ and not 
test_json_decode_persists_doc_attr and not test_header_with_subclass_types and 
not test_urllib3_pool_connection_closed"
dh_auto_test: error: pybuild --test -i python{version} -p "3.13 3.12" returned 
exit code 13
make: *** [debian/rules:116: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

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

About the archive rebuild: This is an effort to keep trixie free from FTBFS bugs
during its lifetime as a supported distribution, as explained here:

https://lists.debian.org/debian-devel/2024/05/msg00414.html

(While they are not yet, please note that the bugs will be RC for trixie)

The build was made using sbuild and a reduced chroot with only
build-essential packages.

If you could not 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 affects, so that this is still visible in the BTS web
page for this package.

Thanks.

Reply via email to