def name_from_path(path):
    name, _ = os.path.splitext(os.path.basename(path))
    try:
        return fsdecode(name)
    except UnicodeError:
        return None
Regresssion test for two bugs:
dataset/ETHPy150Open mopidy/mopidy/mopidy/m3u/translator.py/name_from_path--crossover with--dataset/ETHPy150Open miracle2k/webassets/tests/test_cache.py/TestCacheIsUsed.test_filesystem_cache