Code Monkey home page Code Monkey logo

pyenv-update's Introduction

pyenv-update

Build Status

pyenv-update is a pyenv plugin that provides a pyenv update command to update pyenv and its plugins.

This plugin was inspired from rbenv-update.

Installation

Installing as a pyenv plugin

Installing pyenv-update as a pyenv plugin will give you access to the pyenv update command.

$ git clone https://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update

Usage

To update pyenv and plugins (including pyenv-update itself), just type pyenv update.

$ pyenv update

Version History

20130531

  • Initial public release.

License

(The MIT License)

  • Copyright (c) 2013 Yamashita, Yuu

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pyenv-update's People

Contributors

alefpereira avatar anton-petrov avatar cewood avatar jawshooah avatar jimmywan avatar joshfriend avatar kroeschl avatar minddrive avatar native-api avatar paw-lu avatar toramanlis avatar wjv avatar yyuu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyenv-update's Issues

Feature request: prominent notification of breaking changes when updating

Please consider displaying warnings, preferably with a prompt to continue or abort, when an update will break things.

Motivation:

In pyenv/pyenv#2009 both me and the OP were facing the issue of pyenv suddenly breaking after the update to 2.0. Turns out the installation instructions had changed, and we needed to pass an extra flag somewhere. This was apparently documented in the README, which one is supposed to read during installation. However, this wasn't an installation, it was an update from the commandline, which shouldn't require a visit to the github repo to check the README again.

Many other applications already display warnings when an update requires manual intervention or special attention due to incompatible changes. Debian's package management system is a great example of that. I believe it would be a good idea to keep a changelog of breaking changes, linked to the release numbers, and have pyenv update display the relevant ones when updating between versions.

fatal: could not create leading directories of '/plugins/pyenv-update': Read-only file system

Very recently (2-3 days ago) I got the following error when I open a new shell (MacOS-latest):

fatal: could not create leading directories of '/plugins/pyenv-virtualenv': Read-only file system
fatal: could not create leading directories of '/plugins/pyenv-update': Read-only file system

Nothing changed and googling reported nothing. To be honest I am not surprised that these paths are invalid, thus being "read only". I am not sure what is causing this problem with pyenv as I see it only with plugins, other stuff seems to be working fine.

support to change the code source of pyenv and all its plugins

A new feature is need for this tool.

We had previously download and install pyenv and its plugins with pyenv-installer, all code are downloaded from "github.com". But now, for some reason, we can not access github.com directly, so we had to update the pyenv from code in 'hub.fastgit.xxx' like, to install newer version of python.

Will there be any support to run "pyenv update" on specified souce? then we can "git pull" from my specified code source. or else I should change each file in the .git path, replacing "github.com" to "hub.fastgit", by hand. It is wearisome, and it is dangerous for the pyenv I had installed.

Feature request: provide a way for "pyenv update" to consider only (stable) releases

As far as I understand https://github.com/pyenv/pyenv-update/blob/master/bin/pyenv-update, what it does is just update all of pyenv to the most recent commit of the master branch.

Given the recent confusion about changes introduced with v2.0.0, I would have loved to skip all intermediate updates until v2.0.0 was actually released. Is there a way to do that? I would be fine with just jumping from release to release (and maybe cherry-pick a commit from time to time to build a newly released Python).

It seems one can use $PYENV_BRANCH to switch to (or at least stay on) one particular branch, but that variable is not documented as far as I can see, and I have no idea which branch would be suited for this.

Fail to merge: "merge: origin - not something we can merge"

after #19, I got fail to merge the main pyenv repo, but the rest repos are normal to merge.

the git error message is merge: origin - not something we can merge

❯ pyenv update
Updating /Users/Xiangyu/.pyenv...
From https://github.com/pyenv/pyenv
 * branch              master     -> FETCH_HEAD
merge: origin - not something we can merge
Updating /Users/Xiangyu/.pyenv/plugins/pyenv-doctor...
From https://github.com/pyenv/pyenv-doctor
 * branch            master     -> FETCH_HEAD
Already up to date.
Updating /Users/Xiangyu/.pyenv/plugins/pyenv-update...
From https://github.com/pyenv/pyenv-update
 * branch            master     -> FETCH_HEAD
Already up to date.

error: unknown option `no-rebase'

Haven't been able to use pyenv update on my CentOS 7 install the last few weeks. I even tried deleting and re-installing the plugin. All the parts it tries to update give me the error:

error: unknown option no-rebase'`

On: CentOS 7:
3.10.0-1062.1.2.el7.x86_64

Used to work, not sure what changed.

k3npo ~ -> pyenv update     
Updating /home/k3npo/.pyenv...
error: unknown option `no-rebase'
usage: git fetch [<options>] [<repository> [<refspec>...]]
   or: git fetch [<options>] <group>
   or: git fetch --multiple [<options>] [(<repository> | <group>)...]
   or: git fetch --all [<options>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --all                 fetch from all remotes
    -a, --append          append to .git/FETCH_HEAD instead of overwriting
    --upload-pack <path>  path to upload pack on remote end
    -f, --force           force overwrite of local branch
    -m, --multiple        fetch from multiple remotes
    -t, --tags            fetch all tags and associated objects
    -n                    do not fetch all tags (--no-tags)
    -p, --prune           prune remote-tracking branches no longer on remote
    --recurse-submodules[=<on-demand>]
                          control recursive fetching of submodules
    --dry-run             dry run
    -k, --keep            keep downloaded pack
    -u, --update-head-ok  allow updating of HEAD ref
    --progress            force progress reporting
    --depth <depth>       deepen history of shallow clone
    --unshallow           convert to a complete repository


Updating /home/k3npo/.pyenv/plugins/pyenv-doctor...
error: unknown option `no-rebase'
usage: git fetch [<options>] [<repository> [<refspec>...]]
   or: git fetch [<options>] <group>
   or: git fetch --multiple [<options>] [(<repository> | <group>)...]
   or: git fetch --all [<options>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --all                 fetch from all remotes
    -a, --append          append to .git/FETCH_HEAD instead of overwriting
    --upload-pack <path>  path to upload pack on remote end
    -f, --force           force overwrite of local branch
    -m, --multiple        fetch from multiple remotes
    -t, --tags            fetch all tags and associated objects
    -n                    do not fetch all tags (--no-tags)
    -p, --prune           prune remote-tracking branches no longer on remote
    --recurse-submodules[=<on-demand>]
                          control recursive fetching of submodules
    --dry-run             dry run
    -k, --keep            keep downloaded pack
    -u, --update-head-ok  allow updating of HEAD ref
    --progress            force progress reporting
    --depth <depth>       deepen history of shallow clone
    --unshallow           convert to a complete repository

Updating /home/k3npo/.pyenv/plugins/pyenv-pip-update...
error: unknown option `no-rebase'
usage: git fetch [<options>] [<repository> [<refspec>...]]
   or: git fetch [<options>] <group>
   or: git fetch --multiple [<options>] [(<repository> | <group>)...]
   or: git fetch --all [<options>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --all                 fetch from all remotes
    -a, --append          append to .git/FETCH_HEAD instead of overwriting
    --upload-pack <path>  path to upload pack on remote end
    -f, --force           force overwrite of local branch
    -m, --multiple        fetch from multiple remotes
    -t, --tags            fetch all tags and associated objects
    -n                    do not fetch all tags (--no-tags)
    -p, --prune           prune remote-tracking branches no longer on remote
    --recurse-submodules[=<on-demand>]
                          control recursive fetching of submodules
    --dry-run             dry run
    -k, --keep            keep downloaded pack
    -u, --update-head-ok  allow updating of HEAD ref
    --progress            force progress reporting
    --depth <depth>       deepen history of shallow clone
    --unshallow           convert to a complete repository

Updating /home/k3npo/.pyenv/plugins/pyenv-update...
error: unknown option `no-rebase'
usage: git fetch [<options>] [<repository> [<refspec>...]]
   or: git fetch [<options>] <group>
   or: git fetch --multiple [<options>] [(<repository> | <group>)...]
   or: git fetch --all [<options>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --all                 fetch from all remotes
    -a, --append          append to .git/FETCH_HEAD instead of overwriting
    --upload-pack <path>  path to upload pack on remote end
    -f, --force           force overwrite of local branch
    -m, --multiple        fetch from multiple remotes
    -t, --tags            fetch all tags and associated objects
    -n                    do not fetch all tags (--no-tags)
    -p, --prune           prune remote-tracking branches no longer on remote
    --recurse-submodules[=<on-demand>]
                          control recursive fetching of submodules
    --dry-run             dry run
    -k, --keep            keep downloaded pack
    -u, --update-head-ok  allow updating of HEAD ref
    --progress            force progress reporting
    --depth <depth>       deepen history of shallow clone
    --unshallow           convert to a complete repository

pyenv is not being updated

❯ pyenv --version
pyenv 2.3.5

❯ pyenv update    
Updating /Users/jimbrannlund/.pyenv/plugins/pyenv-doctor...
From https://github.com/pyenv/pyenv-doctor
 * branch            master     -> FETCH_HEAD
Already up to date.
Updating /Users/jimbrannlund/.pyenv/plugins/pyenv-update...
From https://github.com/pyenv/pyenv-update
 * branch            master     -> FETCH_HEAD
Already up to date.

❯ pyenv --version
pyenv 2.3.5

Latest version as of writing this is 2.3.26

pyenv update fails - pyenv-update with connection timed out

Only this plugin compains, so it is nothing with github, only this repo:

(base) mortenb@mb:~$ pyenv update
Updating /home/mortenb/.pyenv...
From https://github.com/pyenv/pyenv
 * branch              master     -> FETCH_HEAD
Already up to date.
Updating /home/mortenb/.pyenv/plugins/pyenv-update...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out


Updating /home/mortenb/.pyenv/plugins/pyenv-virtualenv...
remote: Enumerating objects: 21, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 21 (delta 13), reused 18 (delta 13), pack-reused 0
Unpacking objects: 100% (21/21), 6.45 KiB | 550.00 KiB/s, done.
From https://github.com/yyuu/pyenv-virtualenv
 * branch            master     -> FETCH_HEAD
   91609e2..c6ff093  master     -> origin/master
Updating 91609e2..c6ff093
Fast-forward
 bin/pyenv-sh-activate      |  4 ++--
 bin/pyenv-sh-deactivate    |  6 +++---
 bin/pyenv-virtualenv       | 15 ++++++++++++---
 bin/pyenv-virtualenv-init  |  2 ++
 test/activate.bats         | 28 ++++++++++++++--------------
 test/conda-activate.bats   | 16 ++++++++--------
 test/conda-deactivate.bats | 12 ++++++------
 test/deactivate.bats       | 42 +++++++++++++++++++++---------------------
 8 files changed, 68 insertions(+), 57 deletions(-)

As you see it continues with other plugins.

`pyenv update` no longer works on CentOS 7

Linux-4.19.76-linuxkit-x86_64-with-centos-7.9.2009-Core (Docker container)
pyenv 2.0.6
git version 1.8.3.1

The pyenv update command no longer works on CentOS 7 due to the addition of the --no-rebase option to a git pull command:

# pyenv update
Updating /root/.pyenv...
error: unknown option `no-rebase'
usage: git fetch [<options>] [<repository> [<refspec>...]]
   or: git fetch [<options>] <group>
   or: git fetch --multiple [<options>] [(<repository> | <group>)...]
   or: git fetch --all [<options>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --all                 fetch from all remotes
    -a, --append          append to .git/FETCH_HEAD instead of overwriting
    --upload-pack <path>  path to upload pack on remote end
    -f, --force           force overwrite of local branch
    -m, --multiple        fetch from multiple remotes
    -t, --tags            fetch all tags and associated objects
    -n                    do not fetch all tags (--no-tags)
    -p, --prune           prune remote-tracking branches no longer on remote
    --recurse-submodules[=<on-demand>]
                          control recursive fetching of submodules
    --dry-run             dry run
    -k, --keep            keep downloaded pack
    -u, --update-head-ok  allow updating of HEAD ref
    --progress            force progress reporting
    --depth <depth>       deepen history of shallow clone
    --unshallow           convert to a complete repository

Unfortunately, CentOS 7 is stuck with an ancient version of Git, but I don't see why --no-rebase is needed here.

"fatal: Could not read from remote repository" for git://github.com

I try to clone this repository as follows, but failed:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.10
Release:	22.10
Codename:	kinetic

$ git clone git://github.com/pyenv/pyenv-update.git
Cloning into 'pyenv-update'...
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Any tips for this problem?

Regards,
Zhao

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.