Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's more than one way to get the default Python version #1243

Closed
minrk opened this issue Feb 8, 2023 · 0 comments · Fixed by #1249
Closed

There's more than one way to get the default Python version #1243

minrk opened this issue Feb 8, 2023 · 0 comments · Fixed by #1249
Labels
maintenance Under the hood fixes and improvements needs: discussion

Comments

@minrk
Copy link
Member

minrk commented Feb 8, 2023

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:

  1. remove the environment.lock that lacks a Python version, and
  2. whenever python_version would be empty, follow major_pythons.get["3"], as is done here, but not currently in every case
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Under the hood fixes and improvements needs: discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant