Bug 2279993

Summary: python-setuptools-rust fails to build: test_metadata_cargo_log: assert "TRACE cargo::util::config" in captured.err
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-setuptools-rustAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: rawhideCC: cheimes, ftrivino, ksurma, mhroncok, python-packagers-sig
Target Milestone: ---   
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: 2024-05-31 11:00:26 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: 2244836, 2260875    

Description Karolina Surma 2024-05-10 12:11:49 UTC
python-setuptools-rust fails to build with Python 3.13.0b1.

=================================== FAILURES ===================================
___________________________ test_metadata_cargo_log ____________________________

capfd = <_pytest.capture.CaptureFixture object at 0x7fd673d99d30>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd673e476f0>
hello_world_bin = <setuptools_rust.extension.RustBin object at 0x7fd673bd2350>

    def test_metadata_cargo_log(
        capfd: CaptureFixture, monkeypatch: MonkeyPatch, hello_world_bin: RustBin
    ) -> None:
        monkeypatch.setenv("CARGO_LOG", "trace")
    
        # With quiet unset, no stdout, plenty of logging stderr
        hello_world_bin.metadata(quiet=False)
        captured = capfd.readouterr()
        assert captured.out == ""
>       assert "TRACE cargo::util::config" in captured.err
E       assert 'TRACE cargo::util::config' in '   0.000029328s TRACE cargo: start="2024-05-10T08:46:42.121347431Z"\nwarning: `/builddir/build/BUILD/setuptools-rust-...: "registry `crates-io`",\n        },\n        NormalOrDev,\n    ): {\n        "default",\n        "std",\n    },\n}\n'
E        +  where '   0.000029328s TRACE cargo: start="2024-05-10T08:46:42.121347431Z"\nwarning: `/builddir/build/BUILD/setuptools-rust-...: "registry `crates-io`",\n        },\n        NormalOrDev,\n    ): {\n        "default",\n        "std",\n    },\n}\n' = CaptureResult(out='', err='   0.000029328s TRACE cargo: start="2024-05-10T08:46:42.121347431Z"\nwarning: `/builddir/bu... "registry `crates-io`",\n        },\n        NormalOrDev,\n    ): {\n        "default",\n        "std",\n    },\n}\n').err

tests/test_extension.py:45: AssertionError
=========================== short test summary info ============================
FAILED tests/test_extension.py::test_metadata_cargo_log - assert 'TRACE cargo...
============= 1 failed, 7 passed, 2 deselected, 1 warning in 0.34s =============

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07434153-python-setuptools-rust/

For all our attempts to build python-setuptools-rust with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-setuptools-rust/

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

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Karolina Surma 2024-05-29 12:32:38 UTC
This is blocking cryptography so we need to solve this problem this week.

Comment 2 Miro Hrončok 2024-05-29 12:42:16 UTC
setuptools-rust 1.9.0 exists, while we are at 1.7.0

Comment 4 Miro Hrončok 2024-05-29 12:47:25 UTC
Same failure happens in https://koschei.fedoraproject.org/package/python-setuptools-rust