🗽 Like yarn outdated/upgrade, but for pip. Upgrade all your pip packages and automate your Python Dependency Management.

Overview

pipupgrade

The missing command for pip

Table of Contents

Features

  • Updates system packages and local packages.
  • Discovers packages present within multiple Python Environments.
  • Updates packages mentioned within a requirements.txt file (Also pins up-to-date versions if mentioned).
  • Smart requirements.txt detector.
  • Pipfile support.
  • Detects semantic version to avoid updates that break changes. Also ensures to avoid child dependencies that break changes.
  • View Dependency Graph.
  • Parallel updates (blazingly fast).
  • Python 2.7+ and Python 3.4+ compatible. Also pip 9+, pip 10+, pip 18+ and pip 19.0.1+ compatible.
  • Automate your Dependencies by installing pipupgrade in your CI workflow.
  • Zero Dependencies!

Quick Start

$ pip install pipupgrade

Check out installation for more details.

Usage

Basic Usage

That's basically it! Run the help for more details...

$ pipupgrade --help
usage: pipupgrade [--pip-path PIP_PATH] [-y] [-c]
                  [--upgrade-type {major,minor,patch} [{major,minor,patch} ...]]
                  [-l] [-f {table,tree,json,yaml}] [-a] [--pip] [-s]
                  [-r REQUIREMENTS] [--pipfile PIPFILE] [-i] [-p PROJECT]
                  [--git-username GIT_USERNAME] [--git-email GIT_EMAIL]
                  [--pull-request] [--github-access-token GITHUB_ACCESS_TOKEN]
                  [--github-reponame GITHUB_REPONAME]
                  [--github-username GITHUB_USERNAME]
                  [--target-branch TARGET_BRANCH] [-j JOBS] [-u]
                  [--no-included-requirements] [--no-cache] [-o OUTPUT]
                  [--ignore-error] [--force] [--no-color] [-V] [-v] [-h]
                  [packages [packages ...]]

pipupgrade (v VERSION)

UPGRADE ALL THE PIP PACKAGES!

positional arguments:
  packages              Packages to Upgrade. (default: None)

optional arguments:
  --ignore IGNORE       Ignore packages to upgrade. (default: None)
  --pip-path PIP_PATH   Path to pip executable to be used. (default: None)
  -y, --yes             Confirm for all dialogs. (default: 0)
  -c, --check           Perform a dry-run, avoid updating packages. (default:
                        0)
  --upgrade-type {major,minor,patch} [{major,minor,patch} ...]
                        Upgrade Type (default: ['minor', 'patch'])
  -l, --latest          Update all packages to latest. (default: 0)
  -f {table,tree,json,yaml}, --format {table,tree,json,yaml}
                        Display packages format. (default: table)
  -a, --all             List all packages. (default: 0)
  --pip                 Update pip. (default: 0)
  -s, --self            Update pipupgrade. (default: False)
  -r REQUIREMENTS, --requirements REQUIREMENTS
                        Path(s) to requirements.txt file. (default: None)
  --pipfile PIPFILE     Path(s) to Pipfile (default: None)
  -i, --interactive     Interactive Mode. (default: 0)
  -p PROJECT, --project PROJECT
                        Path(s) to Project (default: None)
  --git-username GIT_USERNAME
                        Git Username (default: None)
  --git-email GIT_EMAIL
                        Git Email (default: None)
  --pull-request        Perform a Pull Request. (default: False)
  --github-access-token GITHUB_ACCESS_TOKEN
                        GitHub Access Token (default: None)
  --github-reponame GITHUB_REPONAME
                        Target GitHub Repository Name (default: None)
  --github-username GITHUB_USERNAME
                        Target GitHub Username (default: None)
  --target-branch TARGET_BRANCH
                        Target Branch (default: master)
  -j JOBS, --jobs JOBS  Number of Jobs to be used. (default: 4)
  -u, --user            Install to the Python user install directory for
                        environment variables and user configuration.
                        (default: 0)
  --no-included-requirements
                        Avoid updating included requirements. (default: 0)
  --no-cache            Avoid fetching latest updates from PyPI server.
                        (default: 0)
  -o OUTPUT, --output OUTPUT
                        Print Output to File. (default: None)
  --ignore-error        Ignore Error in case of upgrade failure. (default: 0)
  --force               Force search for files within a project. (default: 0)
  --no-color            Avoid colored output. (default: 0)
  -V, --verbose         Display verbose output. (default: False)
  -v, --version         Show pipupgrade's version number and exit.
  -h, --help            Show this help message and exit.

Docker

Using pipupgrade's Docker Image to generate a Pull Request can be done as follows:

" \ -e "PIPUPGRADE_GIT_EMAIL= " \ -e "PIPUPGRADE_GITHUB_REPONAME= " \ -e "PIPUPGRADE_GITHUB_USERNAME= " \ --rm \ -it \ -v $(pwd):/path/to/project \ achillesrasquinha/pipupgrade \ --project /path/to/project \ --pull-request \ --force \ --yes \ --verbose ">
$ docker run \
    -e "PIPUPGRADE_GIT_USERNAME=
      
       " \
    -e "PIPUPGRADE_GIT_EMAIL=
       
        " \
    -e "PIPUPGRADE_GITHUB_REPONAME=
        
         " \
    -e "PIPUPGRADE_GITHUB_USERNAME=
         
          " \
    --rm \
    -it \
    -v $(pwd):/path/to/project \
      achillesrasquinha/pipupgrade \
        --project /path/to/project \
        --pull-request \
        --force \
        --yes \
        --verbose

         
        
       
      

Similar Packages

pipupgrade attempts to provide an all-in-one solution as compared to the following packages:

Known Issues

License

This repository has been released under the MIT License.


Made with ❤️ using boilpy.
Comments
  • Crashes on invocation

    Crashes on invocation

    $ pipupgrade
    Checking...
    Traceback (most recent call last):
      File "/usr/local/bin/pipupgrade", line 10, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.7/site-packages/pipupgrade/cli/__init__.py", line 14, in wrapper
        return fn(**params)
      File "/usr/local/lib/python3.7/site-packages/pipupgrade/commands/__init__.py", line 162, in command
        format = "json", pip_exec = pip_)
      File "/usr/local/lib/python3.7/site-packages/pipupgrade/_pip.py", line 65, in call
        return popen(*params, output = True)
      File "/usr/local/lib/python3.7/site-packages/pipupgrade/util/system.py", line 69, in popen
        raise sp.CalledProcessError(code, command)
    subprocess.CalledProcessError: Command 'None list --outdated --format json' returned non-zero exit status 127.
    

    Also happens with no flags and --latest --yes

    macOS 10.14.4 Python 3.7.3 pip 19.0.3

    opened by dschuessler 19
  • pipupgrade incorrectly detects two pyenv-installed pip bins ('pip' & 'pip3'), from *single* Python install env, as from separate 'installed distributions'

    pipupgrade incorrectly detects two pyenv-installed pip bins ('pip' & 'pip3'), from *single* Python install env, as from separate 'installed distributions'

    i've installed python 3.8-dev via pyenv

    	pyenv global
    		3.8-dev
    	python -V
    		Python 3.8.2+
    

    for this installed env, pip & pip3 are identical

    	pip -V
    		pip 20.0.2 from /usr/local/pyenv/versions/3.8-dev/lib/python3.8/site-packages/pip (python 3.8)
    	pip3 -V
    		pip 20.0.2 from /usr/local/pyenv/versions/3.8-dev/lib/python3.8/site-packages/pip (python 3.8)
    

    and function identically.

    i.e., they're of the same 'installed distribution'.

    i've pip-installed 'pipupgrade`

    	pip show pipupgrade
    		Name: pipupgrade
    		Version: 1.6.8
    		Summary: UPGRADE ALL THE PIP PACKAGES!
    		Home-page: https://github.com/achillesrasquinha/pipupgrade
    		Author: Achilles Rasquinha
    		Author-email: [email protected]
    		License: MIT
    		Location: /usr/local/src/pyenv/versions/3.8-dev/lib/python3.8/site-packages
    		Requires:
    		Required-by:
    

    on exec, pipupgrade sees TWO 'installed distributions', one for each of the two identical/redudndant pip/pip3 instances

    e.g.,

    pipupgrade --verbose --check
    	2020-03-04 18:30:01,358 | INFO | Executing command: /usr/local/pyenv/versions/3.8-dev/bin/pip --version
    	2020-03-04 18:30:01,477 | INFO | Executing command: /usr/local/pyenv/versions/3.8-dev/bin/pip3 --version
    	2020-03-04 18:30:01,600 | INFO | Environment: {'version': '1.6.8', 'python_version': '3.8.2+', 'os': 'Linux-5.5.7-24.g1004bce-default-x86_64-with-glibc2.2.5', 'config': {'path': {'BASE': '/usr/local/pyenv/versions/3.8-dev/lib/python3.8/site-packages/pipupgrade', 'DATA': '/usr/local/pyenv/versions/3.8-dev/lib/python3.8/site-packages/pipupgrade/data', 'CACHE': '/root/.pipupgrade'}}, 'pip_executables': [{'executable': '/usr/local/pyenv/versions/3.8-dev/bin/pip', 'version': 'pip 20.0.2 from /usr/local/pyenv/versions/3.8-dev/lib/python3.8/site-packages/pip (python 3.8)'}, {'executable': '/usr/local/pyenv/versions/3.8-dev/bin/pip3', 'version': 'pip 20.0.2 from /usr/local/pyenv/versions/3.8-dev/lib/python3.8/site-packages/pip (python 3.8)'}], 'settings': {'settings': {'version': '1.6.8', 'cache_timeout': '86400', 'jobs': '16'}}}
    	2020-03-04 18:30:01,600 | INFO | Arguments Passed: {'packages': [], 'pip_path': None, 'requirements': None, 'pipfile': None, 'project': None, 'pull_request': False, 'git_username': None, 'git_email': None, 'github_access_token': None, 'github_reponame': None, 'github_username': None, 'target_branch': 'master', 'latest': 0, 'format': 'table', 'all': 0, 'pip': 0, 'self': False, 'jobs': 16, 'user': 0, 'check': True, 'interactive': 0, 'yes': 0, 'no_included_requirements': 0, 'no_cache': 0, 'no_color': 0, 'output': None, 'ignore_error': 0, 'force': 0, 'verbose': True}
    	Checking...
    	2020-03-04 18:30:01,604 | INFO | `pip` executables found: ['/usr/local/pyenv/versions/3.8-dev/bin/pip', '/usr/local/pyenv/versions/3.8-dev/bin/pip3']
    	2020-03-04 18:30:01,604 | INFO | Using 16 jobs...
    	2020-03-04 18:30:01,617 | INFO | Fetching installed packages for /usr/local/pyenv/versions/3.8-dev/bin/pip...
    	2020-03-04 18:30:01,617 | INFO | Fetching installed packages for /usr/local/pyenv/versions/3.8-dev/bin/pip3...
    	2020-03-04 18:30:01,618 | INFO | Executing command: /usr/local/pyenv/versions/3.8-dev/bin/pip list --outdated --format json
    	2020-03-04 18:30:01,618 | INFO | Executing command: /usr/local/pyenv/versions/3.8-dev/bin/pip3 list --outdated --format json
    	2020-03-04 18:30:16,038 | INFO | 6 packages found for /usr/local/pyenv/versions/3.8-dev/bin/pip.
    	2020-03-04 18:30:16,051 | INFO | Initializing Package {'name': 'coveralls', 'version': '1.10.0', 'latest_version': '1.11.1', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,052 | INFO | Fetching package coveralls information from DB...
    	2020-03-04 18:30:16,051 | INFO | Initializing Package {'name': 'base58', 'version': '1.0.3', 'latest_version': '2.0.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,052 | INFO | Fetching package base58 information from DB...
    	2020-03-04 18:30:16,052 | INFO | Initializing Package {'name': 'flake8-2020', 'version': '1.5.0', 'latest_version': '1.6.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,052 | INFO | Fetching package flake8-2020 information from DB...
    	2020-03-04 18:30:16,052 | INFO | Initializing Package {'name': 'pyupgrade', 'version': '1.26.2', 'latest_version': '2.1.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,052 | INFO | Initializing Package {'name': 'Sphinx', 'version': '2.3.1', 'latest_version': '2.4.3', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,052 | INFO | Initializing Package {'name': 'tox', 'version': '3.14.3', 'latest_version': '3.14.5', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,052 | INFO | Fetching package pyupgrade information from DB...
    	2020-03-04 18:30:16,052 | INFO | Fetching package tox information from DB...
    	2020-03-04 18:30:16,052 | INFO | Fetching package Sphinx information from DB...
    	2020-03-04 18:30:16,052 | INFO | Using cached info for package <Package coveralls (1.10.0)>.
    	2020-03-04 18:30:16,052 | INFO | Using cached info for package <Package base58 (1.0.3)>.
    	2020-03-04 18:30:16,053 | INFO | Using cached info for package <Package flake8-2020 (1.5.0)>.
    	2020-03-04 18:30:16,053 | INFO | Using cached info for package <Package pyupgrade (1.26.2)>.
    	2020-03-04 18:30:16,053 | INFO | Using cached info for package <Package tox (3.14.3)>.
    	2020-03-04 18:30:16,053 | INFO | Using cached info for package <Package Sphinx (2.3.1)>.
    	2020-03-04 18:30:16,057 | INFO | Packages within `pip` /usr/local/pyenv/versions/3.8-dev/bin/pip found: [<Package base58 (1.0.3)>, <Package coveralls (1.10.0)>, <Package flake8-2020 (1.5.0)>, <Package pyupgrade (1.26.2)>, <Package Sphinx (2.3.1)>, <Package tox (3.14.3)>]...
    	2020-03-04 18:30:16,289 | INFO | 6 packages found for /usr/local/pyenv/versions/3.8-dev/bin/pip3.
    	2020-03-04 18:30:16,307 | INFO | Initializing Package {'name': 'coveralls', 'version': '1.10.0', 'latest_version': '1.11.1', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,307 | INFO | Initializing Package {'name': 'base58', 'version': '1.0.3', 'latest_version': '2.0.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,307 | INFO | Initializing Package {'name': 'flake8-2020', 'version': '1.5.0', 'latest_version': '1.6.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,307 | INFO | Fetching package coveralls information from DB...
    	2020-03-04 18:30:16,307 | INFO | Initializing Package {'name': 'Sphinx', 'version': '2.3.1', 'latest_version': '2.4.3', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,307 | INFO | Initializing Package {'name': 'tox', 'version': '3.14.3', 'latest_version': '3.14.5', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,308 | INFO | Fetching package base58 information from DB...
    	2020-03-04 18:30:16,308 | INFO | Fetching package flake8-2020 information from DB...
    	2020-03-04 18:30:16,308 | INFO | Fetching package tox information from DB...
    	2020-03-04 18:30:16,308 | INFO | Fetching package Sphinx information from DB...
    	2020-03-04 18:30:16,307 | INFO | Initializing Package {'name': 'pyupgrade', 'version': '1.26.2', 'latest_version': '2.1.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
    	2020-03-04 18:30:16,308 | INFO | Fetching package pyupgrade information from DB...
    	2020-03-04 18:30:16,308 | INFO | Using cached info for package <Package Sphinx (2.3.1)>.
    	2020-03-04 18:30:16,308 | INFO | Using cached info for package <Package tox (3.14.3)>.
    	2020-03-04 18:30:16,308 | INFO | Using cached info for package <Package flake8-2020 (1.5.0)>.
    	2020-03-04 18:30:16,308 | INFO | Using cached info for package <Package coveralls (1.10.0)>.
    	2020-03-04 18:30:16,309 | INFO | Using cached info for package <Package pyupgrade (1.26.2)>.
    	2020-03-04 18:30:16,309 | INFO | Using cached info for package <Package base58 (1.0.3)>.
    	2020-03-04 18:30:16,313 | INFO | Packages within `pip` /usr/local/pyenv/versions/3.8-dev/bin/pip3 found: [<Package base58 (1.0.3)>, <Package coveralls (1.10.0)>, <Package flake8-2020 (1.5.0)>, <Package pyupgrade (1.26.2)>, <Package Sphinx (2.3.1)>, <Package tox (3.14.3)>]...
    	2020-03-04 18:30:16,318 | INFO | Updating registries: [<pipupgrade.model.registry.Registry object at 0x7f026a065190>, <pipupgrade.model.registry.Registry object at 0x7f026a0657c0>]...
    
    	Source: Installed Distributions (/usr/local/pyenv/versions/3.8-dev/bin/pip)
    
    	Name        Current Version Latest Version Home Page
    	----------- --------------- -------------- ----------------------------------------------------
    	base58      1.0.3           2.0.0          https://github.com/keis/base58
    	coveralls   1.10.0          1.11.1         http://github.com/coveralls-clients/coveralls-python
    	flake8-2020 1.5.0           1.6.0          https://github.com/asottile/flake8-2020
    	pyupgrade   1.26.2          2.1.0          https://github.com/asottile/pyupgrade
    	Sphinx      2.3.1           2.4.3          http://sphinx-doc.org/
    	tox         3.14.3          3.14.5         http://tox.readthedocs.org
    
    
    	Source: Installed Distributions (/usr/local/pyenv/versions/3.8-dev/bin/pip3)
    
    	Name        Current Version Latest Version Home Page
    	----------- --------------- -------------- ----------------------------------------------------
    	base58      1.0.3           2.0.0          https://github.com/keis/base58
    	coveralls   1.10.0          1.11.1         http://github.com/coveralls-clients/coveralls-python
    	flake8-2020 1.5.0           1.6.0          https://github.com/asottile/flake8-2020
    	pyupgrade   1.26.2          2.1.0          https://github.com/asottile/pyupgrade
    	Sphinx      2.3.1           2.4.3          http://sphinx-doc.org/
    	tox         3.14.3          3.14.5         http://tox.readthedocs.org
    

    an upgrade will attempt, incorrectly, to install/upgrade for EACH of the detected pip instances -- 'pip' & 'pip3'

    enhancement help wanted 
    opened by pgnd 17
  • ImportError: cannot import name 'get_installed_distributions'

    ImportError: cannot import name 'get_installed_distributions'

    Error: pipupgrade
    Traceback (most recent call last): File "/usr/local/bin/pipupgrade", line 7, in from pipupgrade.main import main File "/usr/local/lib/python3.6/site-packages/pipupgrade/main.py", line 5, in from pipupgrade.commands import command as main File "/usr/local/lib/python3.6/site-packages/pipupgrade/commands/init.py", line 4, in from pipupgrade import _pip File "/usr/local/lib/python3.6/site-packages/pipupgrade/_pip.py", line 7, in from pip import get_installed_distributions ImportError: cannot import name 'get_installed_distributions'

    opened by kazishariar 16
  • Windows subsystem: Ubuntu error when

    Windows subsystem: Ubuntu error when "pipupgrade --latest --yes"

    Printout:

    Checking...
    Traceback (most recent call last):
      File "/home/can/.local/bin/pipupgrade", line 11, in <module>
        sys.exit(main())
      File "/home/can/.local/lib/python3.6/site-packages/pipupgrade/cli/__init__.py", line 14, in wrapper
        return fn(**params)
      File "/home/can/.local/lib/python3.6/site-packages/pipupgrade/commands/__init__.py", line 178, in command
        format = "json", pip_exec = pip_)
      File "/home/can/.local/lib/python3.6/site-packages/pipupgrade/_pip.py", line 69, in call
        return popen(*params, output = True)
      File "/home/can/.local/lib/python3.6/site-packages/pipupgrade/util/system.py", line 70, in popen
        raise sp.CalledProcessError(code, command)
    subprocess.CalledProcessError: Command '/usr/bin/pip3 list --outdated --format json' returned non-zero exit status 2.
    
    opened by caniko 14
  • pipupgrade stuck on Checking... excessive resource usage

    pipupgrade stuck on Checking... excessive resource usage

    What's the bug all about?

    pipupgrade is stuck on "Checking...".

    It seems to need a lot of resources (Mem/CPU), which is not feasible on simpler hardware like the Raspberry Pi Zero WH I'm on. Can't seem to handle its needs :/

    Linux pizerowh 5.10.17+ #1421 Thu May 27 13:58:02 BST 2021 armv6l GNU/Linux
    

    Screen Shot 2021-06-13 at 3 26 48 PM Screen Shot 2021-06-13 at 3 25 20 PM Screen Shot 2021-06-13 at 3 24 23 PM

    What command led to this issue?

    $ pipupgrade --check
    

    Logs

    Please paste the logs using pipupgrade --verbose

    "$ pipupgrade --check --verbose
    2021-06-13 15:29:49,228 | INFO | Environment: {'version': '1.9.0', 'python_version': '3.7.3', 'os': 'Linux-5.10.17+-armv6l-with-debian-10.9', 'config': {'path': {'BASE': '/home/pi/.local/lib/python3.7/site-packages/pipupgrade', 'DATA': '/home/pi/.local/lib/python3.7/site-packages/pipupgrade/data', 'CACHE': '/home/pi/.config/pipupgrade', 'JOBS': '/home/pi/.local/lib/python3.7/site-packages/pipupgrade/jobs'}}, 'settings': {'settings': {'version': '1.9.0', 'cache_timeout': '86400', 'jobs': '1'}}}
    2021-06-13 15:29:49,232 | INFO | Arguments Passed: {'args': (), 'kwargs': {'ARGUMENTS': <class 'inspect._empty'>, 'packages': [], 'ignore': None, 'pip_path': None, 'yes': 0, 'check': True, 'upgrade_type': ['minor', 'patch'], 'latest': 0, 'format': 'table', 'all': 0, 'pip': 0, 'self': False, 'requirements': None, 'pipfile': None, 'interactive': 0, 'project': None, 'git_username': None, 'git_email': None, 'pull_request': False, 'github_access_token': None, 'github_reponame': None, 'github_username': None, 'target_branch': 'master', 'jobs': 4, 'user': 0, 'no_included_requirements': 0, 'no_cache': 0, 'output': None, 'ignore_error': 0, 'force': 0, 'no_color': 0, 'verbose': True}, 'a': <pipupgrade.to_params.<locals>.O object at 0xb672def0>}
    Checking...
    2021-06-13 15:29:49,306 | INFO | `pip` executables found: ['/home/pi/.local/bin/pip', '/home/pi/.local/bin/pip3', '/usr/bin/pip2']
    2021-06-13 15:29:49,309 | INFO | Using 4 jobs...
    2021-06-13 15:29:49,623 | INFO | Fetching installed packages for /home/pi/.local/bin/pip...
    2021-06-13 15:29:49,633 | INFO | Fetching installed packages for /home/pi/.local/bin/pip3...
    2021-06-13 15:29:49,641 | INFO | Fetching installed packages for /usr/bin/pip2...
    2021-06-13 15:29:49,664 | INFO | Executing command: /home/pi/.local/bin/pip list --outdated --format json
    2021-06-13 15:29:49,669 | INFO | Executing command: /home/pi/.local/bin/pip3 list --outdated --format json
    2021-06-13 15:29:49,673 | INFO | Executing command: /usr/bin/pip2 list --outdated --format json"
    
    bug duplicate 
    opened by sgreadly 10
  • Command returned non zero exit status since pip is not callable (LISTED POTENTIAL FIX)

    Command returned non zero exit status since pip is not callable (LISTED POTENTIAL FIX)

    What's the bug all about?

    When running any command that checks the pip packages, I get an error since when running the command pip list --format json it says the module pip is not callable. This could be fixed by using this instead: /usr/bin/python3 -m pip list --format json

    What command led to this issue?

    Please type the exact command that led to this issue.

    $ pipupgrade -a
    OR
    $ pipupgrade --check
    OR
    $ pipupgrade --latest --yes
    

    Logs

    Please paste the logs using pipupgrade --verbose

    [email protected]:~/<REDACTED> $ pipupgrade -a --verbose
    2020-02-05 13:07:56,317 | INFO | Environment: {'python_version': '3.7.3', 'os': 'Linux-4.19.75-v7l+-armv7l-with-debian-10.1'}
    2020-02-05 13:07:56,317 | INFO | Arguments Passed: {'packages': [], 'pip_path': None, 'requirements': None, 'pipfile': None, 'project': None, 'pull_request': False, 'git_username': None, 'git_email': None, 'github_access_token': None, 'github_reponame': None, 'github_username': None, 'target_branch': 'master', 'latest': 0, 'format': 'table', 'all': True, 'pip': 0, 'self': False, 'jobs': 4, 'user': 0, 'check': 0, 'interactive': 0, 'yes': 0, 'no_included_requirements': 0, 'no_cache': 0, 'no_color': 0, 'output': None, 'ignore_error': 0, 'force': 0, 'verbose': True}
    Checking...
    2020-02-05 13:07:56,322 | INFO | `pip` executables found: ['/usr/bin/pip', '/usr/bin/pip3', '/usr/bin/pip2']
    2020-02-05 13:07:56,322 | INFO | Using 4 jobs...
    2020-02-05 13:07:56,356 | INFO | Fetching installed packages for /usr/bin/pip...
    2020-02-05 13:07:56,356 | INFO | Fetching installed packages for /usr/bin/pip3...
    2020-02-05 13:07:56,357 | INFO | Fetching installed packages for /usr/bin/pip2...
    2020-02-05 13:07:56,358 | INFO | Executing command: /usr/bin/pip list --format json
    2020-02-05 13:07:56,359 | INFO | Executing command: /usr/bin/pip3 list --format json
    2020-02-05 13:07:56,359 | INFO | Executing command: /usr/bin/pip2 list --format json
    multiprocessing.pool.RemoteTraceback:
    """
    Traceback (most recent call last):
      File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker
        result = (True, func(*args, **kwds))
      File "/home/pi/.local/lib/python3.7/site-packages/pipupgrade/commands/helper.py", line 309, in get_registry_from_pip
        format = "json", pip_exec = pip_path, output = True)
      File "/home/pi/.local/lib/python3.7/site-packages/pipupgrade/_pip.py", line 74, in call
        output = popen(*params, output = output, raise_err = raise_err)
      File "/home/pi/.local/lib/python3.7/site-packages/pipupgrade/util/system.py", line 79, in popen
        raise PopenError(code, command)
    pipupgrade.exception.PopenError: Command '/usr/bin/pip3 list --format json' returned non-zero exit status 1.
    """
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/home/pi/.local/bin/pipupgrade", line 10, in <module>
        sys.exit(main())
      File "/home/pi/.local/lib/python3.7/site-packages/pipupgrade/cli/__init__.py", line 15, in wrapper
        return fn(**params)
      File "/home/pi/.local/lib/python3.7/site-packages/pipupgrade/commands/__init__.py", line 168, in command
        pip_path
      File "/usr/lib/python3.7/multiprocessing/pool.py", line 748, in next
        raise value
    pipupgrade.exception.PopenError: Command '/usr/bin/pip3 list --format json' returned non-zero exit status 1.
    
    bug 
    opened by Column01 10
  • TypeError: strptime() argument 1 must be str, not datetime.datetime after upgrading to 1.8.2

    TypeError: strptime() argument 1 must be str, not datetime.datetime after upgrading to 1.8.2

    After upgrade to 1.8.2 on raspbian buster i have this issue sudo pipupgrade Checking...

    multiprocessing.pool.RemoteTraceback: """ multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/usr/local/lib/python3.7/dist-packages/pipupgrade/model/package.py", line 116, in init time_difference = to_datetime(res["_updated_at"]) + timedelta(seconds = cache_timeout) File "/usr/local/lib/python3.7/dist-packages/pipupgrade/model/package.py", line 69, in to_datetime return datetime.strptime(string, "%Y-%m-%d %H:%M:%S.%f") TypeError: strptime() argument 1 must be str, not datetime.datetime """

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/usr/local/lib/python3.7/dist-packages/pipupgrade/commands/helper.py", line 333, in get_registry_from_pip build_dependency_tree = build_dependency_tree, jobs = jobs) File "/usr/local/lib/python3.7/dist-packages/pipupgrade/model/registry.py", line 111, in init for package in pool.imap_unordered(partial(Package, **args), packages): File "/usr/lib/python3.7/multiprocessing/pool.py", line 748, in next raise value TypeError: strptime() argument 1 must be str, not datetime.datetime """

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/pipupgrade/commands/init.py", line 75, in command return _command(**ARGUMENTS) File "/usr/local/lib/python3.7/dist-packages/pipupgrade/commands/init.py", line 207, in _command pip_path File "/usr/lib/python3.7/multiprocessing/pool.py", line 748, in next raise value TypeError: strptime() argument 1 must be str, not datetime.datetime

    An error occured while performing the above command. This could be an issue with "pipupgrade". Kindly post an issue at https://github.com/achillesrasquinha/pipupgrade/issues

    Same issue on Linuxmint 20

    opened by duduche59 9
  • pipupgrade: TypeError: unsupported operand type(s) for +: 'NoneType' and 'datetime.timedelta'

    pipupgrade: TypeError: unsupported operand type(s) for +: 'NoneType' and 'datetime.timedelta'

    pipupgrade won't work

    $ pipupgrade --check
    
    Checking...
    multiprocessing.pool.RemoteTraceback:
    """
    multiprocessing.pool.RemoteTraceback:
    """
    Traceback (most recent call last):
      File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 121, in worker
        result = (True, func(*args, **kwds))
      File "/usr/local/lib/python3.7/site-packages/pipupgrade/model/package.py", line 108, in __init__
        time_difference	= res["_updated_at"] + timedelta(seconds = cache_timeout)
    TypeError: unsupported operand type(s) for +: 'NoneType' and 'datetime.timedelta'
    """
    
    $ pipupgrade --self
    Checking...
    Updating pipupgrade...
    pipupgrade upto date.
    
    $ brew info python
    python: stable 3.7.6 (bottled), HEAD
    

    Past month pipupgrade was working great. Now it isn't. Maybe the last update has a bug or I'm forgetting to do something?

    bug 
    opened by carloshernandezcu 9
  • bash: pipupgrade: command not found

    bash: pipupgrade: command not found

    What's the bug all about?

    [[email protected] ~]$ pipupgrade --verbose --latest --yes
    bash: pipupgrade: command not found
    

    What snippet/command led to this issue?

    Please type the exact snippet/command that led to this issue.

    pip install pipupgrade
    

    Then used the comand above

    Logs

    Please paste the logs using pipupgrade --verbose

    "<YOUR LOGS HERE>"
    
    unrelated discussion 
    opened by AA1999 8
  • pipupgrade 1.6.2 has AssertionError on Windows

    pipupgrade 1.6.2 has AssertionError on Windows

    I just upgraded pipupgrade to 1.6.2 on Windows 10 (64-bit) running Python 3.8. Issue #39 is still present (fortunately somebody gave how to fix that one). In addition, I now get "AssertionError: group argument must be None for now". From what I can find, this is most likely around parallel/threading but I'm new enough to Python that I can't figure out exactly which call is producing the error.

    Edit: I tried downgrading and 1.6.0 and 1.6.1 also have this issue. I had to drop back to 1.5.2 to get pipupgrade working again.

    Here is the full traceback...

    Traceback (most recent call last): File "c:\users\wilco\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\wilco\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\wilco\AppData\Local\Programs\Python\Python38\Scripts\pipupgrade.exe\__main__.py", line 7, in <module> File "c:\users\wilco\appdata\local\programs\python\python38\lib\site-packages\pipupgrade\cli\__init__.py", line 15, in wrapper return fn(**params) File "c:\users\wilco\appdata\local\programs\python\python38\lib\site-packages\pipupgrade\commands\__init__.py", line 143, in command with parallel.no_daemon_pool(processes = jobs) as pool: File "c:\users\wilco\appdata\local\programs\python\python38\lib\contextlib.py", line 113, in __enter__ return next(self.gen) File "c:\users\wilco\appdata\local\programs\python\python38\lib\site-packages\pipupgrade\parallel.py", line 26, in no_daemon_pool with pool(class_ = NoDaemonProcessPool, *args, **kwargs) as p: File "c:\users\wilco\appdata\local\programs\python\python38\lib\contextlib.py", line 113, in __enter__ return next(self.gen) File "c:\users\wilco\appdata\local\programs\python\python38\lib\site-packages\pipupgrade\parallel.py", line 20, in pool pool = class_(*args, **kwargs) File "c:\users\wilco\appdata\local\programs\python\python38\lib\multiprocessing\pool.py", line 212, in __init__ self._repopulate_pool() File "c:\users\wilco\appdata\local\programs\python\python38\lib\multiprocessing\pool.py", line 303, in _repopulate_pool return self._repopulate_pool_static(self._ctx, self.Process, File "c:\users\wilco\appdata\local\programs\python\python38\lib\multiprocessing\pool.py", line 319, in _repopulate_pool_static w = Process(ctx, target=worker, File "c:\users\wilco\appdata\local\programs\python\python38\lib\multiprocessing\process.py", line 82, in __init__ assert group is None, 'group argument must be None for now' AssertionError: group argument must be None for now

    opened by wilcoxon 8
  • Cant run pipupgrade. ModuleNotFoundError: No module named 'ctypes.windll'

    Cant run pipupgrade. ModuleNotFoundError: No module named 'ctypes.windll'

    ModuleNotFoundError: No module named 'ctypes.windll'

    Traceback (most recent call last): File "c:\program files\python37\lib\runpy.py", line 193, in run_module_as_main "main", mod_spec) File "c:\program files\python37\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "C:\Program Files\Python37\Scripts\pipupgrade.exe_main.py", line 5, in File "c:\program files\python37\lib\site-packages\pipupgrade_init.py", line 7, in from pipupgrade.main import main File "c:\program files\python37\lib\site-packages\pipupgrade_main_.py", line 5, in from pipupgrade.commands import command as main File "c:\program files\python37\lib\site-packages\pipupgrade\commands_init_.py", line 9, in from pipupgrade.commands.helper import ( File "c:\program files\python37\lib\site-packages\pipupgrade\commands\helper.py", line 8, in from pipupgrade.commands.util import cli_format File "c:\program files\python37\lib\site-packages\pipupgrade\commands\util.py", line 2, in from pipupgrade.cli.parser import get_args File "c:\program files\python37\lib\site-packages\pipupgrade\cli_init_.py", line 3, in from pipupgrade.cli.parser import get_args File "c:\program files\python37\lib\site-packages\pipupgrade\cli\parser.py", line 25, in _cli.format(name, _cli.RED), File "c:\program files\python37\lib\site-packages\pipupgrade\cli\util.py", line 52, in format kernel32 = import_handler("ctypes.windll.kernel32") File "c:\program files\python37\lib\site-packages\pipupgrade\util\imports.py", line 18, in import_handler handler = _HANDLER_REGISTRY[name] File "c:\program files\python37\lib\site-packages\pipupgrade\util\imports.py", line 8, in missing module = import(module_name, {}, {}, [handler_name]) ModuleNotFoundError: No module named 'ctypes.windll'

    bug 
    opened by dusty-dusty 8
  • Python3.12 Not supported yet?

    Python3.12 Not supported yet?

    Description

    Versions: [email protected]:~# python3.12 Python 3.12.0a2+ (heads/main:3a803bcaac, Nov 25 2022, 10:46:40) [GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information.

    [email protected]:~# uname -a Linux kali-linux 6.0.0-kali6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.12-1kali1 (2022-12-19) x86_64 GNU/Linux

    [email protected]:~# python3.12 -m pip install pipupgrade
    Collecting pipupgrade
      Downloading pipupgrade-1.12.0-py3-none-any.whl (34 kB)
    Requirement already satisfied: pip in /usr/local/lib/python3.12/site-packages (from pipupgrade) (22.3.1)
    Collecting bpyutils
      Downloading bpyutils-0.5.8-py3-none-any.whl (51 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.8/51.8 kB 1.7 MB/s eta 0:00:00
    Installing collected packages: bpyutils, pipupgrade
    Successfully installed bpyutils-0.5.8 pipupgrade-1.12.0
    WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
    [email protected]:~# python3.12 -m pipupgrade
    Traceback (most recent call last):
      File "<frozen runpy>", line 189, in _run_module_as_main
      File "<frozen runpy>", line 148, in _get_module_details
      File "<frozen runpy>", line 112, in _get_module_details
      File "/usr/local/lib/python3.12/site-packages/pipupgrade/__init__.py", line 23, in <module>
        from pipupgrade.__main__    import main
      File "/usr/local/lib/python3.12/site-packages/pipupgrade/__main__.py", line 5, in <module>
        from   pipupgrade.commands import command as main
      File "/usr/local/lib/python3.12/site-packages/pipupgrade/commands/__init__.py", line 11, in <module>
        from pipupgrade.commands.helper import (
      File "/usr/local/lib/python3.12/site-packages/pipupgrade/commands/helper.py", line 10, in <module>
        from pipupgrade.model               import Registry
      File "/usr/local/lib/python3.12/site-packages/pipupgrade/model/__init__.py", line 3, in <module>
        from pipupgrade.model.package  import Package
      File "/usr/local/lib/python3.12/site-packages/pipupgrade/model/package.py", line 11, in <module>
        from pipupgrade                     import _pip, semver
      File "/usr/local/lib/python3.12/site-packages/pipupgrade/_pip.py", line 58, in <module>
        _PIP_EXECUTABLES = _get_pip_executable(multiple = True)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/pipupgrade/_pip.py", line 43, in _get_pip_executable
        exec_ = which(pip_)
                ^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/bpyutils/util/system.py", line 79, in which
        from distutils.spawn import find_executable
    ModuleNotFoundError: No module named 'distutils'
    

    Screenshot

    No response

    Console errors

    No response

    bug 
    opened by neomachiney 0
  • `bpyutils.exception.PopenError`

    `bpyutils.exception.PopenError`

    Description

    While doing a simple pipupgrade on Ubuntu22.04, python3.10, in normal console (not in a venv). Nothing else running on my PC at the same moment.

    Screenshot

    No response

    Console errors

    Updating 10 of 83 packages: dbus-python
    
    Traceback (most recent call last):
      File "/home/xxxxxx/.local/lib/python3.10/site-packages/pipupgrade/commands/__init__.py", line 79, in command
        return _command(**ARGUMENTS)
      File "/home/xxxxxx/.local/lib/python3.10/site-packages/pipupgrade/commands/__init__.py", line 258, in _command
        update_registry(registry, yes = a.yes, user = a.user, check = a.check,
      File "/home/xxxxxx/.local/lib/python3.10/site-packages/pipupgrade/commands/helper.py", line 301, in update_registry
        _pip.call("install", package.name,
      File "/home/xxxxxx/.local/lib/python3.10/site-packages/pipupgrade/_pip.py", line 79, in call
        output = popen(*params, output = output, raise_err = raise_err)
      File "/home/xxxxxx/.local/lib/python3.10/site-packages/bpyutils/util/system.py", line 126, in popen
        raise PopenError(code, command)
    bpyutils.exception.PopenError: Command '/home/xxxxxx/.local/bin/pip install dbus-python --no-cache-dir --upgrade' returned non-zero exit status 1.
    
    An error occured while performing the above command. This could be an issue with
    "pipupgrade". Kindly post an issue at https://github.com/achillesrasquinha/pipupgrade/issues
    
    
    bug 
    opened by NicolasMICAUX 0
  • Max retries exceeded with url: /pypi/Pillow/json (Caused by None)

    Max retries exceeded with url: /pypi/Pillow/json (Caused by None)

    Description

    requests.exceptions.ConnectTimeout: None: Max retries exceeded with url: /pypi/Pillow/json (Caused by None)

    Screenshot

    Screen Shot 2022-09-27 at 1 23 19 PM

    Console errors

    No response

    bug 
    opened by musab-mahad 0
  • pipupgrade --requirements broken on pyenv virtualenv

    pipupgrade --requirements broken on pyenv virtualenv

    What's the bug all about?

    python 3.8.6 pyenv virtualenv

    pyenv which pip /Users/stunko/.pyenv/versions/bumpr/bin/pip

    pyenv which python /Users/stunko/.pyenv/versions/bumpr/bin/python

    What snippet/command led to this issue?

    Please type the exact snippet/command that led to this issue.

    pipupgrade --check --pip-path /Users/stunko/.pyenv/versions/bumpr/bin/pip --requirements /Users/stunko/NeonLabs/neon-requirements/deploy/requirements/prod.txt
    

    Logs

    Please paste the logs using pipupgrade --verbose

    Checking...
    pipupgrade | 2022-09-13 15:07:40,210 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89eb0> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,213 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89e20> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,214 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89df0> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,214 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89f40> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,214 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89eb0> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,215 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89e20> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,216 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89df0> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,216 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89f40> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,217 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89eb0> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,217 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89e20> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    pipupgrade | 2022-09-13 15:07:40,217 | INFO | Initializing Package <pip._internal.req.req_file.ParsedRequirement object at 0x111f89df0> of type <class 'pip._internal.req.req_file.ParsedRequirement'>...
    
    concurrent.futures.process._RemoteTraceback:
    """
    concurrent.futures.process._RemoteTraceback:
    """
    Traceback (most recent call last):
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/process.py", line 239, in _process_worker
        r = call_item.fn(*call_item.args, **call_item.kwargs)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/process.py", line 198, in _process_chunk
        return [fn(*args) for args in chunk]
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/process.py", line 198, in <listcomp>
        return [fn(*args) for args in chunk]
      File "/Users/stunko/.pyenv/versions/3.8.6/envs/bumpr/lib/python3.8/site-packages/pipupgrade/model/package.py", line 115, in __init__
        logger.info("Fetching package %s information from DB..." % self.name)
    AttributeError: 'Package' object has no attribute 'name'
    """
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/process.py", line 239, in _process_worker
        r = call_item.fn(*call_item.args, **call_item.kwargs)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/process.py", line 198, in _process_chunk
        return [fn(*args) for args in chunk]
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/process.py", line 198, in <listcomp>
        return [fn(*args) for args in chunk]
      File "/Users/stunko/.pyenv/versions/3.8.6/envs/bumpr/lib/python3.8/site-packages/pipupgrade/commands/helper.py", line 359, in get_registry_from_requirements
        registry = Registry(source = path, packages = packages, sync = sync,
      File "/Users/stunko/.pyenv/versions/3.8.6/envs/bumpr/lib/python3.8/site-packages/pipupgrade/model/registry.py", line 119, in __init__
        for package in pool.imap_unordered(partial(Package, **args), packages):
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists
        for element in iterable:
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator
        yield fs.pop().result()
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/_base.py", line 439, in result
        return self.__get_result()
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
        raise self._exception
    AttributeError: 'Package' object has no attribute 'name'
    """
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/Users/stunko/.pyenv/versions/3.8.6/envs/bumpr/lib/python3.8/site-packages/pipupgrade/commands/__init__.py", line 79, in command
        return _command(**ARGUMENTS)
      File "/Users/stunko/.pyenv/versions/3.8.6/envs/bumpr/lib/python3.8/site-packages/pipupgrade/commands/__init__.py", line 237, in _command
        registries    += results
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists
        for element in iterable:
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator
        yield fs.pop().result()
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/_base.py", line 439, in result
        return self.__get_result()
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
        raise self._exception
    AttributeError: 'Package' object has no attribute 'name'
    
    An error occured while performing the above command. This could be an issue with
    "pipupgrade". Kindly post an issue at https://github.com/achillesrasquinha/pipupgrade/issues
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
        exitcode = _main(fd, parent_sentinel)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
        self = reduction.pickle.load(from_parent)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/synchronize.py", line 110, in __setstate__
        self._semlock = _multiprocessing.SemLock._rebuild(*state)
    FileNotFoundError: [Errno 2] No such file or directory
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
        exitcode = _main(fd, parent_sentinel)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
        self = reduction.pickle.load(from_parent)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/synchronize.py", line 110, in __setstate__
        self._semlock = _multiprocessing.SemLock._rebuild(*state)
    FileNotFoundError: [Errno 2] No such file or directory
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
        exitcode = _main(fd, parent_sentinel)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
        self = reduction.pickle.load(from_parent)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/synchronize.py", line 110, in __setstate__
        self._semlock = _multiprocessing.SemLock._rebuild(*state)
    FileNotFoundError: [Errno 2] No such file or directory
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
        exitcode = _main(fd, parent_sentinel)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
        self = reduction.pickle.load(from_parent)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/synchronize.py", line 110, in __setstate__
        self._semlock = _multiprocessing.SemLock._rebuild(*state)
    FileNotFoundError: [Errno 2] No such file or directory
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
        exitcode = _main(fd, parent_sentinel)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
        self = reduction.pickle.load(from_parent)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/synchronize.py", line 110, in __setstate__
        self._semlock = _multiprocessing.SemLock._rebuild(*state)
    FileNotFoundError: [Errno 2] No such file or directory
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
        exitcode = _main(fd, parent_sentinel)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
        self = reduction.pickle.load(from_parent)
      File "/Users/stunko/.pyenv/versions/3.8.6/lib/python3.8/multiprocessing/synchronize.py", line 110, in __setstate__
        self._semlock = _multiprocessing.SemLock._rebuild(*state)
    FileNotFoundError: [Errno 2] No such file or directory
    
    bug 
    opened by stunko 0
  • cannot import name 'Version' from 'semver'

    cannot import name 'Version' from 'semver'

    Description

    The issue happens when doing a fresh install of pipupgrade and then running pipupgrade -V --resolve it first asked for mixology to be installed:

    ➜  ~ pipupgrade -V --resolve
    bpyutils | 2022-08-12 18:04:44,335 | INFO | Environment: {'version': '0.5.2\n', 'python_version': '3.10.5', 'os': 'Linux-5.18.16-arch1-1-x86_64-with-glibc2.36', 'config': {'path': {'BASE': '/home/arshia/.local/lib/python3.10/site-packages/bpyutils', 'DATA': '/home/arshia/.local/lib/python3.10/site-packages/bpyutils/data', 'CACHE': '/home/arshia/.config/bpyutils', 'JOBS': '/home/arshia/.local/lib/python3.10/site-packages/bpyutils/jobs'}}, 'settings': {'settings': {'version': '0.5.2', 'cache_timeout': '86400', 'jobs': '8', 'max_chunk_download_bytes': '1024'}}}
    bpyutils | 2022-08-12 18:04:44,335 | INFO | Arguments Passed: {'args': (), 'kwargs': {'ARGUMENTS': <class 'inspect._empty'>, 'packages': [], 'resolve': True, 'ignore': None, 'pip_path': None, 'yes': 0, 'clean': 0, 'check': 0, 'upgrade_type': ['minor', 'patch'], 'latest': 0, 'format': 'table', 'all': 0, 'pip': 0, 'self': False, 'requirements': None, 'pipfile': None, 'interactive': 0, 'project': None, 'git_username': None, 'git_email': None, 'pull_request': False, 'github_access_token': None, 'github_reponame': None, 'github_username': None, 'target_branch': 'master', 'jobs': 8, 'user': 0, 'no_included_requirements': 0, 'no_cache': 0, 'output': None, 'ignore_error': 0, 'force': 0, 'doctor': False, 'no_color': 0, 'verbose': True}, 'a': <pipupgrade.commands.to_params.<locals>.O object at 0x7fd9723bc7f0>}
    Traceback (most recent call last):
      File "/home/arshia/.local/lib/python3.10/site-packages/pipupgrade/commands/__init__.py", line 110, in import_or_raise
        import_handler(package)
      File "/home/arshia/.local/lib/python3.10/site-packages/bpyutils/util/imports.py", line 27, in import_handler
        handler = _HANDLER_REGISTRY[name]
      File "/home/arshia/.local/lib/python3.10/site-packages/bpyutils/util/imports.py", line 6, in __missing__
        handler = __import__(name)
    ModuleNotFoundError: No module named 'mixology'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/arshia/.local/bin/pipupgrade", line 8, in <module>
        sys.exit(main())
      File "/home/arshia/.local/lib/python3.10/site-packages/pipupgrade/cli/__init__.py", line 15, in wrapper
        return fn(**params)
      File "/home/arshia/.local/lib/python3.10/site-packages/pipupgrade/commands/__init__.py", line 91, in command
        raise e
      File "/home/arshia/.local/lib/python3.10/site-packages/pipupgrade/commands/__init__.py", line 79, in command
        return _command(**ARGUMENTS)
      File "/home/arshia/.local/lib/python3.10/site-packages/pipupgrade/commands/__init__.py", line 142, in _command
        import_or_raise("mixology")
      File "/home/arshia/.local/lib/python3.10/site-packages/pipupgrade/commands/__init__.py", line 112, in import_or_raise
        raise DependencyNotFoundError((
    pipupgrade.exception.DependencyNotFoundError: Unable to import mixology for resolving dependencies. pipupgrade requires mixology to be installed. Please install mixology by executing 'pip install mixology'.
    

    After doing so I get that error which is shown in console errors.

    Screenshot

    image image

    Console errors

    ➜  ~ pipupgrade -V --resolve
    bpyutils | 2022-08-12 18:05:02,917 | INFO | Environment: {'version': '0.5.2\n', 'python_version': '3.10.5', 'os': 'Linux-5.18.16-arch1-1-x86_64-with-glibc2.36', 'config': {'path': {'BASE': '/home/arshia/.local/lib/python3.10/site-packages/bpyutils', 'DATA': '/home/arshia/.local/lib/python3.10/site-packages/bpyutils/data', 'CACHE': '/home/arshia/.config/bpyutils', 'JOBS': '/home/arshia/.local/lib/python3.10/site-packages/bpyutils/jobs'}}, 'settings': {'settings': {'version': '0.5.2', 'cache_timeout': '86400', 'jobs': '8', 'max_chunk_download_bytes': '1024'}}}
    bpyutils | 2022-08-12 18:05:02,918 | INFO | Arguments Passed: {'args': (), 'kwargs': {'ARGUMENTS': <class 'inspect._empty'>, 'packages': [], 'resolve': True, 'ignore': None, 'pip_path': None, 'yes': 0, 'clean': 0, 'check': 0, 'upgrade_type': ['minor', 'patch'], 'latest': 0, 'format': 'table', 'all': 0, 'pip': 0, 'self': False, 'requirements': None, 'pipfile': None, 'interactive': 0, 'project': None, 'git_username': None, 'git_email': None, 'pull_request': False, 'github_access_token': None, 'github_reponame': None, 'github_username': None, 'target_branch': 'master', 'jobs': 8, 'user': 0, 'no_included_requirements': 0, 'no_cache': 0, 'output': None, 'ignore_error': 0, 'force': 0, 'doctor': False, 'no_color': 0, 'verbose': True}, 'a': <pipupgrade.commands.to_params.<locals>.O object at 0x7feb09f6c7f0>}
    
    Traceback (most recent call last):
      File "/home/arshia/.local/lib/python3.10/site-packages/pipupgrade/commands/__init__.py", line 79, in command
        return _command(**ARGUMENTS)
      File "/home/arshia/.local/lib/python3.10/site-packages/pipupgrade/commands/__init__.py", line 145, in _command
        populate_db = import_handler("pipupgrade.pubgrub.populate_db")
      File "/home/arshia/.local/lib/python3.10/site-packages/bpyutils/util/imports.py", line 27, in import_handler
        handler = _HANDLER_REGISTRY[name]
      File "/home/arshia/.local/lib/python3.10/site-packages/bpyutils/util/imports.py", line 10, in __missing__
        module  = __import__(module_name, {}, {}, [handler_name])
      File "/home/arshia/.local/lib/python3.10/site-packages/pipupgrade/pubgrub.py", line 15, in <module>
        from semver import Version, VersionRange, parse_constraint
    ImportError: cannot import name 'Version' from 'semver' (/home/arshia/.local/lib/python3.10/site-packages/semver/__init__.py)
    
    An error occured while performing the above command. This could be an issue with
    "pipupgrade". Kindly post an issue at https://github.com/achillesrasquinha/pipupgrade/issues
    
    bug 
    opened by AA1999 0
Releases(v1.5.1)
Owner
Achilles Rasquinha
I write code that automates my job.
Achilles Rasquinha
🏆 A ranked list of awesome Python open-source libraries and tools. Updated weekly.

Best-of Python 🏆 A ranked list of awesome Python open-source libraries & tools. Updated weekly. This curated list contains 230 awesome open-source pr

Machine Learning Tooling 2.7k Jan 03, 2023
My attempt at this years Advent of Code!

Advent-of-code-2021 My attempt at this years Advent of Code! day 1: ** day 2: ** day 3: ** day 4: ** day 5: ** day 6: ** day 7: ** day 8: * day 9: day

1 Jul 06, 2022
Xbps-install wrapper written in Python that doesn't care about case sensitiveness and package versions

xbi Xbps-install wrapper written in Python that doesn't care about case sensitiveness and package versions. Description This Python script can be easi

Emanuele Sabato 5 Apr 11, 2022
Very simple encoding scheme that will encode data as a series of OwOs or UwUs.

OwO Encoder Very simple encoding scheme that will encode data as a series of OwOs or UwUs. The encoder is a simple state machine. Still needs a decode

1 Nov 15, 2021
GCP Scripts and API Client Toolss

GCP Scripts and API Client Toolss Script Authentication The scripts and CLI assume GCP Application Default Credentials are set. Credentials can be set

3 Feb 21, 2022
Repository for 2021 Computer Vision Class @ Chulalongkorn University

2110443 - Computer Vision (2021/2) Computer Vision @ Chulalongkorn University Anaconda Download Link https://www.anaconda.com/download/ Miniconda and

Chula PIC Lab 5 Jul 19, 2022
A 100% python file organizer. Keep your computer always organized!

PythonOrganizer A 100% python file organizer. Keep your computer always organized! To run the project, just clone the folder and run the installation

3 Dec 02, 2022
Inviare messaggi tramite app IO a partire da dati contenuti in file .csv

parlaConIO Inviare messaggi tramite app IO a partire da dati contenuti in file .csv -- Nessun obbligo, ma in caso di clonazione o uso del programma c

Francesco Del Castillo 6 Aug 22, 2022
Add any Program in any language you like or add a hello world Program ❣️ if you like give us :star:

Welcome to the Hacktoberfest 2018 Hello-world 📋 This Project aims to help you to get started with using Github. You can find a tutorial here What is

Aniket Sharma 1.5k Nov 16, 2022
Collection of tools to be more productive in your work environment and to avoid certain repetitive tasks. 💛💙💚

Collection of tools to be more productive in your work environment and to avoid certain repetitive tasks. 💛💙💚

Raja Rakotonirina 2 Jan 10, 2022
Localization and multifractal properties of the long-range Kitaev chain in the presence of an Aubry-André-Harper modulation

This repository contains the code for the paper Localization and multifractal properties of the long-range Kitaev chain in the presence of an Aubry-André-Harper modulation.

Joana Fraxanet 2 Apr 17, 2022
Installer, package manager, build wrapper and version manager for Piccolo

Piccl Installer, package manager, build wrapper and version manager for Piccolo

1 Dec 19, 2021
Estimate the Market Size for Electic and Plug-In Hybrid Vehicles In Africa

Estimate the Market Size for Electic and Plug-In Hybrid Vehicles In Africa The goal of this repository is to use open data repositories to answer the

Leonce Nshuti 0 Feb 21, 2022
Open source style Deep Dream project

DeepDream ⚠️ If you don't have a gpu with cuda, the style transfer execution time will be much longer Prerequisites Python =3.8.10 How to Install sud

Patrick martins de lima 7 May 17, 2022
Entitlement AND Hardened Runtime Check

Python3 script for macOS to recursively check /Applications and also check /usr/local/bin, /usr/bin, and /usr/sbin for binaries with problematic/interesting entitlements. Also checks for hardened run

Cedric Owens 79 Nov 16, 2022
Lectures for Udemy - Complete Python Bootcamp Course

Complete-Python-Bootcamp Welcome to the Repository for the Complete Python Bootcamp! This is the Repository for the Udemy course - "Complete Python Bo

Marci 2k Dec 28, 2022
Small projects for python beginners.

Python Mini Projects For Beginners I recently started doing the #100DaysOfCode Challenge in Python. I've used Python before, but I had switched to JS

Sreekesh Iyer 10 Dec 12, 2022
In this project, we'll be creating a virtual personal assistant for ourselves using our favorite programming language

In this project, we'll be creating a virtual personal assistant for ourselves using our favorite programming language, Python. We can perform several offline as well as online operations using the bo

Ashutosh Krishna 188 Jan 03, 2023
A Unified Framework for Hydrology

Unified Framework for Hydrology The Python package unifhy (Unified Framework for Hydrology) is a hydrological modelling framework which combines inter

Unified Framefork for Hydrology - Community Organisation 6 Jan 01, 2023
CuraMultiplyByGrid - Cura Плагин для размножения детали сеткой на весь стол автоматически без поворота

CuraMultiplyByGrid Cura Плагин для размножения детали сеткой на весь стол автоматически без поворота. Размножение в куре настолько ужасно реализовано,

3 Dec 02, 2022