Bug 2584118 - ramalama fails to build with Python 3.16: test_list_models_timezones_in_utc: AssertionError
Summary: ramalama fails to build with Python 3.16: test_list_models_timezones_in_utc: ...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: ramalama
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Smoogen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.16
TreeView+ depends on / blocked
 
Reported: 2026-11-25 12:40 UTC by Karolina Surma
Modified: 2026-11-25 12:40 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-11-25 12:40:27 UTC
ramalama fails to build with Python 3.16.0a2.

______________________ test_list_models_timezones_in_utc _______________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fbe99204590>

    def test_list_models_timezones_in_utc(monkeypatch):
        label_output = (
            '{"name":"oci://localhost/demo:latest","modified":"2026-01-01 00:00:00 +0000","size":123,"ID":"sha256:a"},'
        )
        manifest_output = (
            '{"name":"oci://localhost/manifest:latest","modified":"2026-01-01 00:00:00 +0000","size":234,"ID":"sha256:b"},'
        )
        artifact_output = (
            '{"name":"oci://localhost/artifact:latest","created":"2026-01-01 00:00:00 +0000","size":"1KB","ID":"sha256:c"},'
        )
        artifact_inspect_output = {
            "Manifest": {
                "artifactType": oci_tools.oci_annotations.ArtifactTypeModelManifest,
            }
        }
    
        def fake_run_cmd(args, **kwargs):
            if args[:4] == ["podman", "images", "--filter", "label=org.containers.type"]:
                return _result(label_output)
            if args[:4] == ["podman", "images", "--filter", "manifest=true"]:
                return _result(manifest_output)
            if args[:3] == ["podman", "artifact", "ls"]:
                return _result(artifact_output)
            if args[:3] == ["podman", "artifact", "inspect"]:
                return _result(json.dumps(artifact_inspect_output))
            raise AssertionError(f"Unexpected command: {args}")
    
        monkeypatch.setattr(oci_tools, "run_cmd", fake_run_cmd)
        monkeypatch.setattr(oci_tools, "engine_supports_manifest_attributes", lambda engine: False)
    
        models = oci_tools.list_models(EngineArgs(engine="podman"))
>       assert all(isinstance(m['modified'], datetime) for m in models)
E       assert False
E        +  where False = all(<generator object test_list_models_timezones_in_utc.<locals>.<genexpr> at 0x7fbe9946bf10>)

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.16/fedora-rawhide-x86_64/11359730-ramalama/

For all our attempts to build ramalama with Python 3.16, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.16/package/ramalama/

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

Let us know here if you have any questions.

Python 3.16 is planned to be included in Fedora 47.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.16.
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.