Closed
Description
Proposed change
Make sure there's only one path to a 'default' python version when Python is unspecified.
Currently CondaBuildPack allows python_version
to be an empty string, while PythonBuildPack does not.
Alternative options
Leave it as-is, which means more work to update the default Python version (missed in #1219, suggesting it's a problem).
Who would use this feature?
Maintainers updating the default Python version, users trying to understand how a default Python is chosen
How much effort will adding it take?
Not too much, I think. It should mostly involve ensuring a Python version is set to a default value, rather than allowing it to be an empty string. It should be:
- remove the
environment.lock
that lacks a Python version, and - whenever
python_version
would be empty, followmajor_pythons.get["3"]
, as is done here, but not currently in every case - assert/assume that python_version is never empty once resolved
this will allow us to assume/ensure that python_version
is never empty.
Who can do this work?
Anyone who wants to read through the Python logic of the base conda buildpack and freeze.py.