[Debian-med-packaging] Bug#1153508: FTBFS with platformdirs 4.14

Stefano Rivera stefanor at debian.org
Mon Nov 9 10:40:34 GMT 2026


Package: python3-datacache
Version: 1.27.1-1
Severity: serious
Tags: ftbfs patch
Forwarded: https://github.com/openvax/datacache/issues/138

Sorry, I didn't spot this before uploading platfarmdirs 4.14, but it 
causes a (presumably consequential) test failure in datacache:

____ test_linux_caches_follow_an_absolute_xdg_cache_home[ {tmp}/xdg \t-xdg] ____

platform_home = <function platform_home.<locals>.simulate at 0x7f5403644510>
tmp_path = PosixPath('/tmp/pytest-of-sbuild/pytest-0/test_linux_caches_follow_an_ab5')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f5403419da0>
xdg = ' {tmp}/xdg \t', under = 'xdg'

    @pytest.mark.skipif(os.name != "posix", reason="POSIX path separators")
    @pytest.mark.parametrize("xdg, under", [
        (None, ".cache"),
        ("", ".cache"),
        ("relative/cache", ".cache"),  # Never relative to the working directory.
        ("~/cache", ".cache"),  # Not expanded: relative, as XDG specifies.
        ("{tmp}/xdg", "xdg"),
        (" {tmp}/xdg \t", "xdg"),  # Stripped, which platformdirs before 4.6 didn't do.
    ])
    def test_linux_caches_follow_an_absolute_xdg_cache_home(platform_home, tmp_path, monkeypatch, xdg, under):
        platform_home(platformdirs.unix.Unix)
        if xdg is not None:
            monkeypatch.setenv("XDG_CACHE_HOME", xdg.format(tmp=tmp_path))
>       assert get_data_dir("example") == str(tmp_path / under / "example")
E       AssertionError: assert '/tmp/pytest-...cache/example' == '/tmp/pytest-...5/xdg/example'
E         
E         Skipping 53 identical leading characters in diff, use -v to show
E         - ow_an_ab5/xdg/example
E         ?           ^^^
E         + ow_an_ab5/.cache/example
E         ?           ^^^^^^

tests/test_cache_paths.py:180: AssertionError
=========================== short test summary info ============================
FAILED tests/test_cache_paths.py::test_linux_caches_follow_an_absolute_xdg_cache_home[ {tmp}/xdg \t-xdg]

This should be resolved with:

https://github.com/openvax/datacache/pull/144

Stefano



More information about the Debian-med-packaging mailing list