Bug 2458685 - awscli2 fails to build with Python 3.15: AssertionError: At index 8 diff: b'\x00' != b'\x02' in 15 tests
Summary: awscli2 fails to build with Python 3.15: AssertionError: At index 8 diff: b'\...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: awscli2
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nikola Forró
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-04-15 13:44 UTC by Karolina Surma
Modified: 2026-04-20 18:28 UTC (History)
5 users (show)

Fixed In Version: awscli2-2.34.29-1.fc45
Clone Of:
Environment:
Last Closed: 2026-04-20 18:28:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-04-15 13:44:07 UTC
awscli2 fails to build with Python 3.15.0a8.

There's 15 test failures with different tracebacks, ultimately leading to the AssertionError displayed here:

___________________________ test_only_compress_once ____________________________
[gw0] linux -- Python 3.15.0 /usr/bin/python3

    @mock.patch.object(botocore.compress, 'gzip_compress', static_compress)
    @mock.patch.object(botocore.compress, 'COMPRESSION_MAPPING', MOCK_COMPRESSION)
    @pytest.mark.skipif(
        sys.version_info < (3, 8), reason='requires python3.8 or higher'
    )
    def test_only_compress_once():
        request_dict = _request_dict()
        maybe_compress_request(
            COMPRESSION_CONFIG_128_BYTES,
            request_dict,
            OP_MULTIPLE_COMPRESSIONS,
        )
>       assert_request_compressed(request_dict, REQUEST_BODY_COMPRESSED)

tests/unit/botocore/test_compress.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/unit/botocore/test_compress.py:139: in assert_request_compressed
    _assert_compression_body(request_dict['body'], expected_body)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

compressed_body = b'\x1f\x8b\x08\x00\x01\x00\x00\x00\x00\xffsL.\xc9\xcc\xcf\xb3\r(-\xf1M-)\xcaLvI,IT\x0bK-*\x06\x89\x1a\x19\x18\x1a\xe8\...\\0\x13\xab\xaa\xd0\xbc\xcc\x12[\xa7\xca\x92\xd4b\xac\xd2a\x899\xa5\xa9\xb6\x86F\x16\x00\x1e\xdd\t\xfd\x9e\x00\x00\x00'
expected_body = b'\x1f\x8b\x08\x00\x01\x00\x00\x00\x02\xffsL.\xc9\xcc\xcf\xb3\r(-\xf1M-)\xcaLvI,IT\x0bK-*\x06\x89\x1a\x19\x18\x1a\xe8\...\\0\x13\xab\xaa\xd0\xbc\xcc\x12[\xa7\xca\x92\xd4b\xac\xd2a\x899\xa5\xa9\xb6\x86F\x16\x00\x1e\xdd\t\xfd\x9e\x00\x00\x00'

    def _assert_compression_body(compressed_body, expected_body):
        data = compressed_body
        if hasattr(compressed_body, 'read'):
            data = compressed_body.read()
>       assert data == expected_body
E       AssertionError: assert b'\x1f\x8b\x0...e\x00\x00\x00' == b'\x1f\x8b\x0...e\x00\x00\x00'
E         
E         At index 8 diff: b'\x00' != b'\x02'
E         
E         Full diff:
E         - (b'\x1f\x8b\x08\x00\x01\x00\x00\x00\x02\xffsL.\xc9\xcc\xcf\xb3\r(-\xf1M-)'
E         ?                                       ^
E         + (b'\x1f\x8b\x08\x00\x01\x00\x00\x00\x00\xffsL.\xc9\xcc\xcf\xb3\r(-\xf1M-)'...
E         
E         ...Full output truncated (5 lines hidden), use '-vv' to show

tests/unit/botocore/test_compress.py:130: AssertionError

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/10319072-awscli2/

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

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.


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