Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1901915

Summary: python-zeep fails to build with Python 3.10: TypeError: StreamReader.__init__() missing 1 required positional argument: 'limit'
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-zeepAssignee: Georg Sauthoff <fedora>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fedora, mhroncok, thrnciar
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-07 16:47:34 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: 1890881    

Description Miro Hrončok 2020-11-26 12:22:05 UTC
python-zeep fails to build with Python 3.10.0a2.

__________________________________ test_post ___________________________________

event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>

    @pytest.mark.requests
    @pytest.mark.asyncio
    async def test_post(event_loop):
        cache = stub(get=lambda url: None, add=lambda url, content: None)
        transport = asyncio.AsyncTransport(loop=event_loop, cache=cache)
    
        envelope = etree.Element("Envelope")
    
        with aioresponses() as m:
            m.post("http://tests.python-zeep.org/test.xml", body="x")
>           result = await transport.post_xml(
                "http://tests.python-zeep.org/test.xml", envelope=envelope, headers={}
            )

tests/test_asyncio_transport.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/zeep/asyncio/transport.py:107: in post_xml
    response = await self.post(address, message, headers)
src/zeep/asyncio/transport.py:90: in post
    response = await self.session.post(
/usr/lib64/python3.10/unittest/mock.py:2165: in _execute_mock_call
    result = await effect(*args, **kwargs)
/usr/lib/python3.10/site-packages/aioresponses/core.py:388: in _request_mock
    response = await self.match(method, url, **kwargs)
/usr/lib/python3.10/site-packages/aioresponses/core.py:334: in match
    response_or_exc = await matcher.build_response(
/usr/lib/python3.10/site-packages/aioresponses/core.py:190: in build_response
    resp = self._build_response(
/usr/lib/python3.10/site-packages/aioresponses/core.py:171: in _build_response
    resp.content = stream_reader_factory(loop)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

loop = <Mock id='140329107758576'>

    def stream_reader_factory(
            loop: 'Optional[asyncio.AbstractEventLoop]' = None
    ):
        protocol = ResponseHandler(loop=loop)
>       return StreamReader(protocol, loop=loop)
E       TypeError: StreamReader.__init__() missing 1 required positional argument: 'limit'

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01787124-python-zeep/

For all our attempts to build python-zeep with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-zeep/

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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 Georg Sauthoff 2020-12-05 10:58:57 UTC
I've pushed python-zeep 4 to rawhide. Can you retrigger your build?

Comment 2 Miro Hrončok 2020-12-05 11:51:44 UTC
It happens automatically after a push to dist-git: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-zeep/

Thanks for the fix.

Comment 3 Miro Hrončok 2020-12-05 16:13:05 UTC
However:

- nothing provides python3.10dist(requests-file) >= 1.5.1 needed by python3-zeep-4.0.0-1.fc34.noarch

Comment 4 Georg Sauthoff 2020-12-06 18:14:48 UTC
(In reply to Miro Hrončok from comment #3)
> However:
> 
> - nothing provides python3.10dist(requests-file) >= 1.5.1 needed by
> python3-zeep-4.0.0-1.fc34.noarch

Strange, it just recently built successfully on Rawhide:

https://koji.fedoraproject.org/koji/buildinfo?buildID=1655670


So, it looks like python-requests-file failed to build in your Copr environment?


But I can't find any python-requests-file bugzilla ticket regarding Python 3.10 build failure.

Comment 5 Georg Sauthoff 2020-12-06 22:50:12 UTC
Ok, so this comes from zeep's setup.py whose install_requires reads `requests-file>=1.5.1` - which is apparently picked up by the automatic python dependency generator.


Color me surprised that the koji build process doesn't include a sanity check which verifies that the dependencies in the produced RPM are actually available!


Wouldn't that be useful to have such a check integrated?


So I've opened a ticket against python-requests-file for making 1.5.1 available in rawhide.

Comment 6 Miro Hrončok 2020-12-07 09:58:41 UTC
> Wouldn't that be useful to have such a check integrated?

It would definitively be useful. In fact, there is sch check, except it happens a tad late.

See https://bodhi.fedoraproject.org/updates/FEDORA-2020-2a728df2de -- the Automated tests tab, fedora-ci.koji-build.rpmdeplint.functional:

Problems with dependency set:
conflicting requests: nothing provides python3.9dist(requests-file) >= 1.5.1 needed by python3-zeep-4.0.0-1.fc34.noarch

Comment 7 Miro Hrončok 2020-12-07 16:47:34 UTC
Closing this in favor of bz1905177.