Bug 2431658

Summary: python-msrest fails to build with Python 3.15: AssertionErrors in two TestServiceClient::test_client_send
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-msrestAssignee: Jeremy Cline <jeremy>
Status: POST --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jeremy, ksurma, mhroncok, python-packagers-sig, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2412434    

Description Karolina Surma 2026-01-21 15:08:02 UTC
python-msrest fails to build with Python 3.15.0a5.

______________________ TestServiceClient.test_client_send ______________________

self = <tests.test_client.TestServiceClient testMethod=test_client_send>

    def test_client_send(self):
        current_ua = self.cfg.user_agent
    
        client = ServiceClient(self.creds, self.cfg)
        client.config.keep_alive = True
    
        req_response = requests.Response()
        req_response._content = br'{"real": true}'  # Has to be valid bytes JSON
        req_response._content_consumed = True
        req_response.status_code = 200
    
        def side_effect(*args, **kwargs):
            return req_response
    
        session = mock.create_autospec(requests.Session)
        session.request.side_effect = side_effect
        session.adapters = {
            "http://": HTTPAdapter(),
            "https://": HTTPAdapter(),
        }
        # Be sure the mock does not trick me
        assert not hasattr(session.resolve_redirects, 'is_msrest_patched')
    
        client.config.pipeline._sender.driver.session = session
    
        client.config.credentials.signed_session.return_value = session
        client.config.credentials.refresh_session.return_value = session
    
        request = ClientRequest('GET', '/')
        client.send(request, stream=False)
        session.request.call_count = 0
        session.request.assert_called_with(
            'GET',
            '/',
            allow_redirects=True,
            cert=None,
            headers={
                'User-Agent': current_ua,
                'Test': 'true'  # From global config
            },
            stream=False,
            timeout=100,
            verify=True
        )
        assert session.resolve_redirects.is_msrest_patched
    
        client.send(request, headers={'id':'1234'}, content={'Test':'Data'}, stream=False)
        session.request.assert_called_with(
            'GET',
            '/',
            data='{"Test": "Data"}',
            allow_redirects=True,
            cert=None,
            headers={
                'User-Agent': current_ua,
                'Content-Length': '16',
                'id':'1234',
                'Test': 'true'  # From global config
            },
            stream=False,
            timeout=100,
            verify=True
        )
>       self.assertEqual(session.request.call_count, 1)
E       AssertionError: 2 != 1

FAILED tests/asynctests/test_async_client.py::TestServiceClient::test_client_send
FAILED tests/test_client.py::TestServiceClient::test_client_send - AssertionE...

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10039028-python-msrest/

For all our attempts to build python-msrest with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-msrest/

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

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
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 Jeremy Cline 2026-01-21 16:00:21 UTC
It looks like msrest is deprecated upstream[0] so I think the work here will be to make sure there are no lingering dependencies on it and then retiring it.

[0] https://github.com/Azure/msrest-for-python?tab=readme-ov-file#disclaimer

Comment 2 Jeremy Cline 2026-01-21 16:37:42 UTC
Related, I filed https://github.com/Azure/azure-cli/issues/32681

Comment 3 Miro Hrončok 2026-05-29 08:40:03 UTC
There are many dependencies:

azure-cli-0:2.85.0-2.fc45.src
python-azure-ai-formrecognizer-0:3.2.0-16.fc44.src
python-azure-ai-textanalytics-0:5.2.0-16.fc44.src
python-azure-data-tables-0:12.4.0-19.fc44.src
python-azure-functions-devops-build-0:0.0.22-19.fc44.src
python-azure-graphrbac-1:0.60.0-24.fc44.src
python-azure-keyvault-1:1.1.0-25.fc44.src
python-azure-loganalytics-0:0.1.0-26.fc44.src
python-azure-mgmt-advisor-0:9.0.0-24.fc44.src
python-azure-mgmt-appcontainers-0:2.0.0-14.fc44.src
python-azure-mgmt-applicationinsights-0:1.0.0-22.fc44.src
python-azure-mgmt-batchai-1:7.0.0b1-22.fc44.src
python-azure-mgmt-billing-0:6.0.0-24.fc44.src
python-azure-mgmt-botservice-1:2.0.0~b3-17.fc44.src
python-azure-mgmt-cdn-0:12.0.0-18.fc44.src
python-azure-mgmt-cognitiveservices-0:14.1.0-2.fc44.src
python-azure-mgmt-core-1:1.6.0-2.fc44.src
python-azure-mgmt-cosmosdb-0:9.9.0-1.fc45.src
python-azure-mgmt-databoxedge-1:1.0.0-23.fc44.src
python-azure-mgmt-datalake-store-1:1.1.0~b1-7.fc44.src
python-azure-mgmt-datamigration-1:10.0.0-21.fc44.src
python-azure-mgmt-devtestlabs-1:4.0.0-23.fc44.src
python-azure-mgmt-dns-0:8.0.0-24.fc44.src
python-azure-mgmt-eventgrid-0:10.2.0~b2-15.fc44.src
python-azure-mgmt-extendedlocation-0:1.0.0b2-23.fc44.src
python-azure-mgmt-hdinsight-0:9.1.0~b2-2.fc44.src
python-azure-mgmt-iotcentral-2:10.0.0~b1-18.fc44.src
python-azure-mgmt-iothubprovisioningservices-0:1.1.0-19.fc44.src
python-azure-mgmt-kusto-1:0.3.0-23.fc44.src
python-azure-mgmt-loganalytics-1:13.0.0~b4-18.fc44.src
python-azure-mgmt-managedservices-1:1.0.0-20.fc44.src
python-azure-mgmt-managementgroups-1:1.0.0-18.fc44.src
python-azure-mgmt-maps-1:2.0.0-23.fc44.src
python-azure-mgmt-marketplaceordering-0:1.1.0-24.fc44.src
python-azure-mgmt-media-1:9.0.0-18.fc44.src
python-azure-mgmt-policyinsights-1:1.1.0~b4-11.fc44.src
python-azure-mgmt-privatedns-0:1.0.0-23.fc44.src
python-azure-mgmt-rdbms-1:10.2.0~b17-8.fc44.src
python-azure-mgmt-search-0:9.0.0-14.fc44.src
python-azure-mgmt-sqlvirtualmachine-0:1.0.0~b5-14.fc44.src
python-azure-mgmt-storage-0:24.0.0-2.fc44.src
python-azure-mgmt-subscription-1:3.0.0-16.fc44.src
python-azure-mgmt-support-0:6.0.0-14.fc44.src
python-azure-mgmt-synapse-1:2.1.0~b5-16.fc44.src
python-azure-mgmt-trafficmanager-0:1.0.0-19.fc44.src
python-azure-multiapi-storage-0:1.6.0-2.fc44.src
python-azure-synapse-accesscontrol-1:0.5.0-23.fc44.src
python-azure-synapse-managedprivateendpoints-0:0.4.0-15.fc44.src
python-azure-synapse-spark-1:0.7.0-6.fc44.src
python-msrestazure-0:0.6.4-28.fc44.src
python-pydo-0:0.33.0-3.fc45.src
python-vsts-0:0.1.25-21.fc44.src
python-vsts-cd-manager-0:1.0.2-21.fc45.src
python3-azure-ai-formrecognizer-0:3.2.0-16.fc44.noarch
python3-azure-ai-textanalytics-0:5.2.0-16.fc44.noarch
python3-azure-data-tables-0:12.4.0-19.fc44.noarch
python3-azure-functions-devops-build-0:0.0.22-19.fc44.noarch
python3-azure-graphrbac-1:0.60.0-24.fc44.noarch
python3-azure-keyvault-1:1.1.0-25.fc44.noarch
python3-azure-loganalytics-0:0.1.0-26.fc44.noarch
python3-azure-mgmt-advisor-0:9.0.0-24.fc44.noarch
python3-azure-mgmt-appcontainers-0:2.0.0-14.fc44.noarch
python3-azure-mgmt-applicationinsights-0:1.0.0-22.fc44.noarch
python3-azure-mgmt-batchai-1:7.0.0b1-22.fc44.noarch
python3-azure-mgmt-billing-0:6.0.0-24.fc44.noarch
python3-azure-mgmt-botservice-1:2.0.0~b3-17.fc44.noarch
python3-azure-mgmt-cdn-0:12.0.0-18.fc44.noarch
python3-azure-mgmt-cognitiveservices-0:14.1.0-2.fc44.noarch
python3-azure-mgmt-cosmosdb-0:9.9.0-1.fc45.noarch
python3-azure-mgmt-databoxedge-1:1.0.0-23.fc44.noarch
python3-azure-mgmt-datalake-store-1:1.1.0~b1-7.fc44.noarch
python3-azure-mgmt-datamigration-1:10.0.0-21.fc44.noarch
python3-azure-mgmt-devtestlabs-1:4.0.0-23.fc44.noarch
python3-azure-mgmt-dns-0:8.0.0-24.fc44.noarch
python3-azure-mgmt-eventgrid-0:10.2.0~b2-15.fc44.noarch
python3-azure-mgmt-extendedlocation-0:1.0.0b2-23.fc44.noarch
python3-azure-mgmt-hdinsight-0:9.1.0~b2-2.fc44.noarch
python3-azure-mgmt-iotcentral-2:10.0.0~b1-18.fc44.noarch
python3-azure-mgmt-iothubprovisioningservices-0:1.1.0-19.fc44.noarch
python3-azure-mgmt-kusto-1:0.3.0-23.fc44.noarch
python3-azure-mgmt-loganalytics-1:13.0.0~b4-18.fc44.noarch
python3-azure-mgmt-managedservices-1:1.0.0-20.fc44.noarch
python3-azure-mgmt-managementgroups-1:1.0.0-18.fc44.noarch
python3-azure-mgmt-maps-1:2.0.0-23.fc44.noarch
python3-azure-mgmt-marketplaceordering-0:1.1.0-24.fc44.noarch
python3-azure-mgmt-media-1:9.0.0-18.fc44.noarch
python3-azure-mgmt-policyinsights-1:1.1.0~b4-11.fc44.noarch
python3-azure-mgmt-privatedns-0:1.0.0-23.fc44.noarch
python3-azure-mgmt-search-0:9.0.0-14.fc44.noarch
python3-azure-mgmt-sqlvirtualmachine-0:1.0.0~b5-14.fc44.noarch
python3-azure-mgmt-storage-0:24.0.0-2.fc44.noarch
python3-azure-mgmt-subscription-1:3.0.0-16.fc44.noarch
python3-azure-mgmt-support-0:6.0.0-14.fc44.noarch
python3-azure-mgmt-synapse-1:2.1.0~b5-16.fc44.noarch
python3-azure-mgmt-trafficmanager-0:1.0.0-19.fc44.noarch
python3-azure-multiapi-storage-0:1.6.0-2.fc44.noarch
python3-azure-synapse-accesscontrol-1:0.5.0-23.fc44.noarch
python3-azure-synapse-managedprivateendpoints-0:0.4.0-15.fc44.noarch
python3-azure-synapse-spark-1:0.7.0-6.fc44.noarch
python3-msrest+async-0:0.7.1-19.20221014git2d8fd04.fc44.noarch
python3-msrestazure-0:0.6.4-28.fc44.noarch
python3-pydo-0:0.33.0-3.fc45.noarch
python3-vsts-0:0.1.25-21.fc44.noarch
python3-vsts-cd-manager-0:1.0.2-21.fc45.noarch

Comment 4 Tomáš Hrnčiar 2026-06-01 13:38:27 UTC
PR: https://src.fedoraproject.org/rpms/python-msrest/pull-request/3