We should support the .python-version file as a means for specifying what Python version an app is using.
This file format (used by pyenv and others) now also supports specifying Python versions in the X.Y format (and not just X.Y.Z), making it a strong contender over the Heroku-specific runtime.txt file.
Officially supported syntax:
3.12.6
3.12
- comments (lines starting with
#)
- blank lines
- pyenv supports specifying multiple versions, however, this buildpack can't, so we'll either want to only use the first version, or error if there are multiple versions specified
Unofficially supported syntax:
...though the python- forms are undocumented and likely going to be deprecated soon (pyenv/pyenv#3054 (comment)), so I'm leaning towards not supporting them.
For more background, see:
We should support the
.python-versionfile as a means for specifying what Python version an app is using.This file format (used by pyenv and others) now also supports specifying Python versions in the X.Y format (and not just X.Y.Z), making it a strong contender over the Heroku-specific
runtime.txtfile.Officially supported syntax:
3.12.63.12#)Unofficially supported syntax:
python-3.12.6python-3.12(though this currently has a bug: The auto-resolution of latest versions feature doesn't work withpython-prefixes (egpython-3.12) pyenv/pyenv#3054)...though the
python-forms are undocumented and likely going to be deprecated soon (pyenv/pyenv#3054 (comment)), so I'm leaning towards not supporting them.For more background, see: