Skip to content

Don't use .python-version for auto-activation #472

@krystof-k

Description

@krystof-k

Too many issues will kill our team's development velocity, drastically.
Make sure you have checked all steps below.

Prerequisite

  • Make sure your problem is not listed in the common build problems.
  • Make sure no duplicated issue has already been reported in the pyenv-virtualenv issues. You should look in closed issues, too.
  • Make sure you are not asking us to help solving your specific issue.
    • GitHub issues is opened mainly for development purposes. If you want to ask someone to help solving your problem, go to some community site like Gitter, StackOverflow, etc.
  • Make sure your problem is not derived from packaging (e.g. Homebrew).
    • Please refer to the package documentation for the installation issues, etc.
  • Make sure your problem is not derived from other plugins.
    • This repository is maintaining the pyenv-virtualenv plugin only. Please refrain from reporting issues of other plugins here.

Description

  • Platform information (e.g. Ubuntu Linux 20.04): macOS Sonoma 14.2.1
  • OS architecture (e.g. amd64): arm64
  • pyenv version: 2.3.35
  • pyenv-virtualenv version: 1.1.5
  • Python version: 3.10
  • virtualenv version (if installed):
  • Please attach the debug log of a faulty Pyenv invocation as a gist

Using .python-version like this

3.10.13/envs/virtualenv

to auto-activate enviroments breaks other tools which do not expect this syntax in .python-version, e.g. GitHub setup-python action:

Warning: Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '.python-version' file.
Resolved .python-version as 3.10.13/envs/virtualenv
Installed versions
  Version 3.10.13/envs/virtualenv was not found in the local cache
  Error: The version '3.10.13/envs/virtualenv' with architecture 'x64' was not found for Ubuntu 22.04.
  The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

It would be reasonable not to use .python-version for this or at least use some non-breaking syntax (maybe a comment or something?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions