Bug 2365645

Summary: python-webob fails to build with Python 3.14: test_interrupted_request: AssertionError: False disconnect alert
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-webobAssignee: Fedora Infrastructure SIG <infra-sig>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: infra-sig, ksurma, mhroncok, mrunge, ondrejj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-webob-1.8.9-3.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-06-07 06:42:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2322407    

Description Karolina Surma 2025-05-12 15:00:47 UTC
python-webob fails to build with Python 3.14.0b1.

___________________________ test_interrupted_request ___________________________

req = <Request at 0x7f8a2511a440 POST http://localhost.localdomain:60291/readline>

    def _req_int_readline(req):
        try:
>           assert req.body_file.readline() == b'a=b\n'

tests/test_in_wsgiref.py:91: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <LimitedLengthFile(<_io.BufferedReader name=-1>, maxlen=100000)>
buff = <memory at 0x7f8a24fc6140>

    def readinto(self, buff):
        if not self.remaining:
            return 0
        sz0 = min(len(buff), self.remaining)
        data = self.file.read(sz0)
        sz = len(data)
        self.remaining -= sz
        if sz < sz0 and self.remaining:
>           raise DisconnectionError(
                "The client disconnected while sending the body "
                "(%d more bytes were expected)" % (self.remaining,)
            )
E           webob.request.DisconnectionError: The client disconnected while sending the body (89994 more bytes were expected)

../BUILDROOT/usr/lib/python3.14/site-packages/webob/request.py:1542: DisconnectionError

During handling of the above exception, another exception occurred:

serve = <function serve.<locals>._serve at 0x7f8a25172f00>

    @pytest.mark.usefixtures("serve")
    def test_interrupted_request(serve):
        with serve(_test_app_req_interrupt) as server:
            for path in _test_ops_req_interrupt:
                _send_interrupted_req(server, path)
                try:
                    res = _global_res.get(timeout=1)
                except Empty:
                    raise AssertionError("Error during test %s", path)
                if res is not None:
                    print("Error during test:", path)
>                   reraise(res)

tests/test_in_wsgiref.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../BUILDROOT/usr/lib/python3.14/site-packages/webob/compat.py:78: in reraise
    raise exc
tests/test_in_wsgiref.py:74: in _test_app_req_interrupt
    op(req)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

req = <Request at 0x7f8a2511a440 POST http://localhost.localdomain:60291/readline>

    def _req_int_readline(req):
        try:
            assert req.body_file.readline() == b'a=b\n'
        except IOError:
            # too early to detect disconnect
>           raise AssertionError("False disconnect alert")
E           AssertionError: False disconnect alert

tests/test_in_wsgiref.py:94: AssertionError
----------------------------- Captured stdout call -----------------------------
Error during test: /readline

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14-b1/fedora-rawhide-x86_64/09023757-python-webob/

For all our attempts to build python-webob with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14-b1/package/python-webob/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14-b1/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2025-06-07 06:30:00 UTC
Blocks python-webtest, python-beaker.

python3-beaker is Recommened by python3-mako is Required by rhytmbox and installed out of the box on Workstation.

When we want to run OpenQA tests, python3-beaker cannot be updated and the test fails.

Comment 2 Miro Hrončok 2025-06-07 06:42:19 UTC
Skipped the test for now. The mentioned dependent packages build.