Skip to content

Support the .python-version file #6

@edmorley

Description

@edmorley

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:

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions