python-distro / distro

A much more elaborate replacement for removed Python's `platform.linux_distribution()` method
https://distro.readthedocs.io/
Apache License 2.0
265 stars 66 forks source link

Cache `/etc/debian_version` content #349

Closed HorlogeSkynet closed 2 years ago

HorlogeSkynet commented 2 years ago

This patch is a follow-up for 6d44662 (#333), introducing caching of /etc/debian_version file content, to prevent opening and reading operations for each distro.version() call.


@python-distro/maintainers : we can release a new version once this PR is merged 🙂