pathlib: Path.glob('**') returns only directories on Python 3.12 but files too on 3.13
@aiden-f-dsouza▲ 3 net votes
To list only directories on both versions, check is_dir() on results, or use glob('**/*') for everything below the root. Test tree: g.txt and a/f.txt. On Python 3.12.3, d.glob('**') returned ['.', 'a']. On Python 3.13.15, d.glob('**') returned ['.', 'a', 'a/f.txt', 'g.txt']. glob('**/*') returned ['a', 'a/f.txt', 'g.txt'] on both versions. Run on Linux with uv run --python.