Giter Site home page Giter Site logo

pyenv-pip-upgrade's People

Contributors

smac89 avatar zyrikby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pyenv-pip-upgrade's Issues

[POTENTIAL BUG] Cannot update specific virtualenv, tab completion is producing unexpected results

First of all, this is an awesome plugin.

To the issue:

I cannot seem to specify a specific virtualenv. I have many virtualenv's managed with pyenv so I cannot test the --all option to see if it is an issue with something in my global environment.

  • OS: macOS Big Sur 10.16
  • Shell: zsh
  • pyenv version: 2.0.6

Errors:

$ pyenv pip-upgrade 3.9.0/envs/siemens_po-fastapi-nano                                                                                                                                         
/Users/red_rocket/.pyenv/plugins/pyenv-pip-upgrade/bin/pyenv-pip-upgrade: line 107: pyenvs_to_update[@]: unbound variable

Worth noting calling the command with no arguments returns a similar error:

$ pyenv pip-upgrade                                                                                                                                                                            
/Users/red_rocket/.pyenv/plugins/pyenv-pip-upgrade/bin/pyenv-pip-upgrade: line 80: $1: unbound variable

Also see number 5 below using full path as arg instead, outputs different error

Reproducing:

  1. Ensuring plugin installed successfully by checking if --help arg
$ pyenv pip-upgrade --help                                                                                                                                                                     
Usage: pyenv pip-upgrade [OPTIONS] <pyenv_env1> [<pyenv_env2> ...]
       pyenv pip-upgrade [OPTIONS] --all

This command update all packages to the latest versions of particular or all
pyenv environments excluding system. By default, pip-upgrade update all
outdated packages of an environment at once. New pip versions will generate an
error if the environment contains packages with conflicting dependencies. In
this case, you can add option '--sequential' to update packages sequentially,
however, the lately updated package will have precedence in this case
overriding the dependencies of the packages updated before.

ARGUMENTS:
  --all - to update all environments

OPTIONS:
  --sequential - update all outdated packages one by one
  1. Attempting tab completion (seems treat each env as an entire block, perhaps related to zsh)

out

  1. Attempting to run on single environment as per README example:
$ pyenv pip-upgrade 3.9.0/envs/siemens_po-fastapi-nano                                                                                                                                         
/Users/red_rocket/.pyenv/plugins/pyenv-pip-upgrade/bin/pyenv-pip-upgrade: line 107: pyenvs_to_update[@]: unbound variable
  1. Listing all envs (from your blog post)
$ ls -al ~/.pyenv/versions/                                                                                                                                                                    
total 0
drwxr-xr-x 26 red_rocket staff 832 Sep 10 16:53 .
drwxr-xr-x  7 red_rocket staff 224 Sep 10 17:08 ..
drwxr-xr-x  7 red_rocket staff 224 May 11  2020 3.8.2
drwxr-xr-x  7 red_rocket staff 224 Jun 29 15:49 3.9.0
lrwxr-xr-x  1 red_rocket staff  48 May 20  2020 JCA -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/JCA
lrwxr-xr-x  1 red_rocket staff  53 May 19  2020 biofrost -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/biofrost
lrwxr-xr-x  1 red_rocket staff  53 Aug 22  2020 claviate -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/claviate
lrwxr-xr-x  1 red_rocket staff  57 Aug 25 15:05 claviate-api -> /Users/red_rocket/.pyenv/versions/3.9.0/envs/claviate-api
lrwxr-xr-x  1 red_rocket staff  62 Aug 25 14:38 claviate-platform -> /Users/red_rocket/.pyenv/versions/3.9.0/envs/claviate-platform
lrwxr-xr-x  1 red_rocket staff  71 Sep  3 15:41 claviate-platform-detector -> /Users/red_rocket/.pyenv/versions/3.9.0/envs/claviate-platform-detector
lrwxr-xr-x  1 red_rocket staff  57 Aug 27  2020 claviate_api -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/claviate_api
lrwxr-xr-x  1 red_rocket staff  51 Sep 18  2020 conmet -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/conmet
lrwxr-xr-x  1 red_rocket staff  57 May 11  2020 django-learn -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/django-learn
lrwxr-xr-x  1 red_rocket staff  51 May 15  2020 fp_pwn -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/fp_pwn
lrwxr-xr-x  1 red_rocket staff  53 Aug 17  2020 intelowl -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/intelowl
lrwxr-xr-x  1 red_rocket staff  55 Jun  1  2020 learn_kube -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/learn_kube
lrwxr-xr-x  1 red_rocket staff  55 Aug 25 04:49 md_to_conf -> /Users/red_rocket/.pyenv/versions/3.9.0/envs/md_to_conf
lrwxr-xr-x  1 red_rocket staff  72 Aug 31 00:29 metaltoad-claviate-platform -> /Users/red_rocket/.pyenv/versions/3.9.0/envs/metaltoad-claviate-platform
lrwxr-xr-x  1 red_rocket staff  60 May 12  2020 news_aggregator -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/news_aggregator
lrwxr-xr-x  1 red_rocket staff  48 Sep  3 12:07 opb -> /Users/red_rocket/.pyenv/versions/3.9.0/envs/opb
lrwxr-xr-x  1 red_rocket staff  55 Sep  8 20:17 siemens_po -> /Users/red_rocket/.pyenv/versions/3.9.0/envs/siemens_po
lrwxr-xr-x  1 red_rocket staff  68 Sep 10 16:53 siemens_po-fastapi-nano -> /Users/red_rocket/.pyenv/versions/3.9.0/envs/siemens_po-fastapi-nano
lrwxr-xr-x  1 red_rocket staff  55 May 31  2020 socialscan -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/socialscan
lrwxr-xr-x  1 red_rocket staff  51 Aug 31 14:46 thales -> /Users/red_rocket/.pyenv/versions/3.9.0/envs/thales
lrwxr-xr-x  1 red_rocket staff  60 May 23  2020 world_destroyer -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/world_destroyer
lrwxr-xr-x  1 red_rocket staff  53 May 31  2020 x-docker -> /Users/red_rocket/.pyenv/versions/3.8.2/envs/x-docker
  1. Attempting to use the full path to the env as input arg returns same error
$ pyenv pip-upgrade /Users/red_rocket/.pyenv/versions/3.9.0/envs/siemens_po-fastapi-nano                                                                                                       

[ERROR]: Invalid arguments detected: /Users/red_rocket/.pyenv/versions/3.9.0/envs/siemens_po-fastapi-nano
Usage: pyenv pip-upgrade [OPTIONS] <pyenv_env1> [<pyenv_env2> ...]
       pyenv pip-upgrade [OPTIONS] --all

This command update all packages to the latest versions of particular or all
pyenv environments excluding system. By default, pip-upgrade update all
outdated packages of an environment at once. New pip versions will generate an
error if the environment contains packages with conflicting dependencies. In
this case, you can add option '--sequential' to update packages sequentially,
however, the lately updated package will have precedence in this case
overriding the dependencies of the packages updated before.

ARGUMENTS:
  --all - to update all environments

OPTIONS:
  --sequential - update all outdated packages one by one

Again, this plugin looks incredible, and would love to help contribute if this is some sort of environment-specific issue (zsh, osx, etc.)

EDIT: Also from your blog post I have used pyenv versions --bare --skip-aliases and attempted to use that output as an arg, same error.

MacOS ZSH version?

In zsh there's no builtin readarray command, however it does have a one line expression which achieves the basic syntax of readarray -t.

myarray=("${(@f)$(command)}")

Are you looking to provide a macOS version of this plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.