For quite some time we've been able to use pyproject.toml to specify the Python version. and this is widely supported by tooling as well as being part of PEP 621, which is a bit better than using an ad-hoc standard such as a .python_version file.
It would be nice if we could use this in Heroku.