Bug 2270931 - python-cheroot fails to build in Fedora 40/Rawhide: AssertionError: assert 'wrong version number' in '[SSL] record layer failure (_ssl.c:1033)
Summary: python-cheroot fails to build in Fedora 40/Rawhide: AssertionError: assert 'w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cheroot
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Radez
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F40FTBFS F41FTBFS PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-03-22 09:42 UTC by Karolina Surma
Modified: 2024-04-02 16:12 UTC (History)
5 users (show)

Fixed In Version: python-cheroot-10.0.0-6.fc41
Clone Of:
Environment:
Last Closed: 2024-04-02 16:12:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github cherrypy cheroot issues 645 0 None open Failing test with openssl 3.2.0 (test_https_over_http_error) 2024-04-02 15:49:36 UTC

Description Karolina Surma 2024-03-22 09:42:17 UTC
python-cheroot fails to build in Fedora 40 and Rawhide.

=================================== FAILURES ===================================
_____________________ test_https_over_http_error[0.0.0.0] ______________________
http_server = <generator object http_server.<locals>.start_srv at 0x7f3569a02b50>
ip_addr = '0.0.0.0'
    @pytest.mark.parametrize(
        'ip_addr',
        (
            ANY_INTERFACE_IPV4,
            ANY_INTERFACE_IPV6,
        ),
    )
    def test_https_over_http_error(http_server, ip_addr):
        """Ensure that connecting over HTTPS to HTTP port is handled."""
        httpserver = http_server.send((ip_addr, EPHEMERAL_PORT))
        interface, _host, port = _get_conn_data(httpserver.bind_addr)
        with pytest.raises(ssl.SSLError) as ssl_err:
            http.client.HTTPSConnection(
                '{interface}:{port}'.format(
                    interface=interface,
                    port=port,
                ),
            ).request('GET', '/')
        expected_substring = (
            'wrong version number' if IS_ABOVE_OPENSSL10
            else 'unknown protocol'
        )
>       assert expected_substring in ssl_err.value.args[-1]
E       AssertionError: assert 'wrong version number' in '[SSL] record layer failure (_ssl.c:1000)'
_host      = '0.0.0.0'
expected_substring = 'wrong version number'
http_server = <generator object http_server.<locals>.start_srv at 0x7f3569a02b50>
httpserver = <cheroot.server.HTTPServer object at 0x7f3569a04590>
interface  = '127.0.0.1'
ip_addr    = '0.0.0.0'
port       = 52619
ssl_err    = <ExceptionInfo SSLError(1, '[SSL] record layer failure (_ssl.c:1000)') tblen=10>
cheroot/test/test_ssl.py:603: AssertionError
________________________ test_https_over_http_error[::] ________________________
http_server = <generator object http_server.<locals>.start_srv at 0x7f3569a49cb0>
ip_addr = '::'
    @pytest.mark.parametrize(
        'ip_addr',
        (
            ANY_INTERFACE_IPV4,
            ANY_INTERFACE_IPV6,
        ),
    )
    def test_https_over_http_error(http_server, ip_addr):
        """Ensure that connecting over HTTPS to HTTP port is handled."""
        httpserver = http_server.send((ip_addr, EPHEMERAL_PORT))
        interface, _host, port = _get_conn_data(httpserver.bind_addr)
        with pytest.raises(ssl.SSLError) as ssl_err:
            http.client.HTTPSConnection(
                '{interface}:{port}'.format(
                    interface=interface,
                    port=port,
                ),
            ).request('GET', '/')
        expected_substring = (
            'wrong version number' if IS_ABOVE_OPENSSL10
            else 'unknown protocol'
        )
>       assert expected_substring in ssl_err.value.args[-1]
E       AssertionError: assert 'wrong version number' in '[SSL] record layer failure (_ssl.c:1000)'
_host      = '::'
expected_substring = 'wrong version number'
http_server = <generator object http_server.<locals>.start_srv at 0x7f3569a49cb0>
httpserver = <cheroot.server.HTTPServer object at 0x7f3569a5bce0>
interface  = '::1'
ip_addr    = '::'
port       = 46261
ssl_err    = <ExceptionInfo SSLError(1, '[SSL] record layer failure (_ssl.c:1000)') tblen=10>
cheroot/test/test_ssl.py:603: AssertionError
- generated xml file: /builddir/build/BUILD/cheroot-10.0.0/.test-results/pytest/test.xml -
=========================== short test summary info ============================
SKIPPED [1] cheroot/test/test_wsgi.py:39: unconditional skip
XFAIL cheroot/test/test_conn.py::test_Chunked_Encoding - Headers from earlier request leak into the request line for a subsequent request, resulting in 400 instead of 413. See cherrypy/cheroot#69 for details.
XFAIL cheroot/test/test_conn.py::test_598 - Sometimes this test fails due to low timeout. Ref: https://github.com/cherrypy/cherrypy/issues/598
XFAIL cheroot/test/test_core.py::test_large_request - https://github.com/cherrypy/cheroot/issues/106
FAILED cheroot/test/test_ssl.py::test_https_over_http_error[0.0.0.0] - Assert...
FAILED cheroot/test/test_ssl.py::test_https_over_http_error[::] - AssertionEr...
======== 2 failed, 176 passed, 1 skipped, 3 xfailed in 88.87s (0:01:28) ========

Comment 1 Fedora Update System 2024-04-02 16:07:29 UTC
FEDORA-2024-86abff151c (python-cheroot-10.0.0-6.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-86abff151c

Comment 2 Fedora Update System 2024-04-02 16:12:20 UTC
FEDORA-2024-86abff151c (python-cheroot-10.0.0-6.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.