From c07c1256a2521f822a63a9366775b2e4cdab73c0 Mon Sep 17 00:00:00 2001 From: "Vladimir.Roschin" Date: Wed, 8 Apr 2020 19:46:23 +0300 Subject: [PATCH 01/10] remove unused lib --- pip_review/__main__.py | 3 --- setup.py | 1 - 2 files changed, 4 deletions(-) diff --git a/pip_review/__main__.py b/pip_review/__main__.py index 7002e53bc..a2b2bc19b 100755 --- a/pip_review/__main__.py +++ b/pip_review/__main__.py @@ -1,5 +1,4 @@ from __future__ import absolute_import -import os import re import argparse from functools import partial @@ -7,12 +6,10 @@ import json import sys import pip -import subprocess from packaging import version PY3 = sys.version_info.major == 3 if PY3: # Python3 Imports - import urllib.request as urllib_request import subprocess def check_output(*args, **kwargs): diff --git a/setup.py b/setup.py index 12387a957..bc42b2fa2 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ """ pip-review lets you smoothly manage all available PyPI updates. """ -import sys from setuptools import setup From f107912e8fbd02b77ea7e89e2d49ae194475aa87 Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Wed, 8 Apr 2020 22:05:56 +0200 Subject: [PATCH 02/10] Fix #81 for Python 2 --- pip_review/__main__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pip_review/__main__.py b/pip_review/__main__.py index a2b2bc19b..43b3f3025 100755 --- a/pip_review/__main__.py +++ b/pip_review/__main__.py @@ -6,12 +6,11 @@ import json import sys import pip +import subprocess from packaging import version PY3 = sys.version_info.major == 3 if PY3: # Python3 Imports - import subprocess - def check_output(*args, **kwargs): process = subprocess.Popen(stdout=subprocess.PIPE, *args, **kwargs) output, _ = process.communicate() @@ -23,7 +22,6 @@ def check_output(*args, **kwargs): return output else: # Python2 Imports - import urllib2 as urllib_request from subprocess import check_output import __builtin__ input = getattr(__builtin__, 'raw_input') From 8178199bc63080309af54a746f92aa91506a9aa8 Mon Sep 17 00:00:00 2001 From: "Vladimir.Roschin" Date: Thu, 9 Apr 2020 23:11:51 +0300 Subject: [PATCH 03/10] minor refactor setup.py based on pylint warnings --- setup.py | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/setup.py b/setup.py index bc42b2fa2..1c0983f80 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ -""" -pip-review lets you smoothly manage all available PyPI updates. -""" +""" pip-review lets you smoothly manage all available PyPI updates. """ + from setuptools import setup @@ -22,7 +21,7 @@ 'pip-review = pip_review.__main__:main', ], }, - #include_package_data=True, + # include_package_data=True, zip_safe=False, platforms='any', install_requires=[ @@ -32,24 +31,24 @@ python_requires='>=2.7, !=3.0, !=3.1, !=3.2', classifiers=[ # As from https://pypi.python.org/pypi?%3Aaction=list_classifiers - #'Development Status :: 1 - Planning', - #'Development Status :: 2 - Pre-Alpha', - #'Development Status :: 3 - Alpha', - #'Development Status :: 4 - Beta', + # 'Development Status :: 1 - Planning', + # 'Development Status :: 2 - Pre-Alpha', + # 'Development Status :: 3 - Alpha', + # 'Development Status :: 4 - Beta', 'Development Status :: 5 - Production/Stable', - #'Development Status :: 6 - Mature', - #'Development Status :: 7 - Inactive', + # 'Development Status :: 6 - Mature', + # 'Development Status :: 7 - Inactive', 'Programming Language :: Python', 'Programming Language :: Python :: 2', - #'Programming Language :: Python :: 2.3', - #'Programming Language :: Python :: 2.4', - #'Programming Language :: Python :: 2.5', - #'Programming Language :: Python :: 2.6', + # 'Programming Language :: Python :: 2.3', + # 'Programming Language :: Python :: 2.4', + # 'Programming Language :: Python :: 2.5', + # 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - #'Programming Language :: Python :: 3.0', - #'Programming Language :: Python :: 3.1', - #'Programming Language :: Python :: 3.2', + # 'Programming Language :: Python :: 3.0', + # 'Programming Language :: Python :: 3.1', + # 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', From 43db58d6da5d0ce9643a856ede7a53cde419f278 Mon Sep 17 00:00:00 2001 From: Asiier Date: Thu, 11 Feb 2021 21:26:28 +0000 Subject: [PATCH 04/10] Correct constraints path on the README Fix the path of the constraints file so pip does use it. --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 51ef83f54..ed147a2a0 100644 --- a/README.rst +++ b/README.rst @@ -59,10 +59,12 @@ Alternatively, this option can be specified in ``pip.conf``, e.g.: .. code:: console - $ cat ~/.config/pip.conf + $ cat ~/.config/pip/pip.conf [global] constraint = /home/username/constraints.txt +The conf file are dependent of the user, so If you use multiple users you must define config file for each of them. + Since version 0.5, you can also invoke pip-review as ``python -m pip_review``. This can be useful if you are using multiple versions of Python next to each other. Before version 1.0, ``pip-review`` had its own logic for finding package updates instead of relying on ``pip list --outdated``. From 5fa4f789ac2c79e742e624a6cc1af82fe9a6efc1 Mon Sep 17 00:00:00 2001 From: Asiier Date: Thu, 11 Feb 2021 21:37:08 +0000 Subject: [PATCH 05/10] Fix bug pip won't use constraints file. Change so the command to execute is now `pip install -U package_to_update` instead of `pip install package_to_update==latest-version` which would ignore the exclusions of the constraints file. --- pip_review/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pip_review/__main__.py b/pip_review/__main__.py index 43b3f3025..92ae14543 100755 --- a/pip_review/__main__.py +++ b/pip_review/__main__.py @@ -164,8 +164,8 @@ def ask(self, prompt): def update_packages(packages, forwarded): - command = pip_cmd() + ['install'] + forwarded + [ - '{0}=={1}'.format(pkg['name'], pkg['latest_version']) for pkg in packages + command = pip_cmd() + ['install'] + ['-U'] + forwarded + [ + '{0}'.format(pkg['name']) for pkg in packages ] subprocess.call(command, stdout=sys.stdout, stderr=sys.stderr) From d6665ad2121b00d7bdf6163c48de13cef9b51c6e Mon Sep 17 00:00:00 2001 From: Asiier Date: Thu, 11 Feb 2021 21:48:35 +0000 Subject: [PATCH 06/10] Add Windows info and source --- README.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.rst b/README.rst index ed147a2a0..454762d13 100644 --- a/README.rst +++ b/README.rst @@ -57,13 +57,24 @@ being upgraded, you can use a constraint file (similar to ``requirements.txt``): Set this variable in ``.bashrc`` or ``.zshenv`` to make it persistent. Alternatively, this option can be specified in ``pip.conf``, e.g.: +⋅⋅* Linux: + .. code:: console $ cat ~/.config/pip/pip.conf [global] constraint = /home/username/constraints.txt + +⋅⋅* Windows: + +.. code:: console + + $ cat $HOME\AppData\Roaming\pip\pip.ini + [global] + constraint = '$HOME\Roaming\pip\constraints.txt' The conf file are dependent of the user, so If you use multiple users you must define config file for each of them. +[Constraints Files Documentation](https://pip.pypa.io/en/stable/user_guide/#constraints-files "Constraints Files@User Guide") Since version 0.5, you can also invoke pip-review as ``python -m pip_review``. This can be useful if you are using multiple versions of Python next to each other. From 5305506b37ac1dd43c97cedbc07659ead186f1a9 Mon Sep 17 00:00:00 2001 From: Asiier Date: Thu, 11 Feb 2021 21:58:20 +0000 Subject: [PATCH 07/10] Fix formating --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 454762d13..9f1852f0a 100644 --- a/README.rst +++ b/README.rst @@ -57,7 +57,7 @@ being upgraded, you can use a constraint file (similar to ``requirements.txt``): Set this variable in ``.bashrc`` or ``.zshenv`` to make it persistent. Alternatively, this option can be specified in ``pip.conf``, e.g.: -⋅⋅* Linux: +* Linux: .. code:: console @@ -65,7 +65,7 @@ Alternatively, this option can be specified in ``pip.conf``, e.g.: [global] constraint = /home/username/constraints.txt -⋅⋅* Windows: +* Windows: .. code:: console @@ -74,7 +74,7 @@ Alternatively, this option can be specified in ``pip.conf``, e.g.: constraint = '$HOME\Roaming\pip\constraints.txt' The conf file are dependent of the user, so If you use multiple users you must define config file for each of them. -[Constraints Files Documentation](https://pip.pypa.io/en/stable/user_guide/#constraints-files "Constraints Files@User Guide") +https://pip.pypa.io/en/stable/user_guide/#constraints-files Since version 0.5, you can also invoke pip-review as ``python -m pip_review``. This can be useful if you are using multiple versions of Python next to each other. From 3c29847131b5d0b78cb0024eb882eca53bfcd6a8 Mon Sep 17 00:00:00 2001 From: Asiier Date: Sat, 13 Feb 2021 14:26:57 +0000 Subject: [PATCH 08/10] Update pip_review/__main__.py Co-authored-by: Julian Gonggrijp --- pip_review/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pip_review/__main__.py b/pip_review/__main__.py index 92ae14543..b03f1dcad 100755 --- a/pip_review/__main__.py +++ b/pip_review/__main__.py @@ -164,7 +164,7 @@ def ask(self, prompt): def update_packages(packages, forwarded): - command = pip_cmd() + ['install'] + ['-U'] + forwarded + [ + command = pip_cmd() + ['install', '-U'] + forwarded + [ '{0}'.format(pkg['name']) for pkg in packages ] From 459a5d4a16c2b230cdb1718a46ff21199e011e91 Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Sun, 26 Dec 2021 01:08:43 +0100 Subject: [PATCH 09/10] Bump the version number to 1.1.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1c0983f80..b04f4d330 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='pip-review', - version='1.1.0', + version='1.1.1', url='https://github.com/jgonggrijp/pip-review', license='BSD', author='Julian Gonggrijp, Vincent Driessen', From 9afe455eb1e77fce09caf76b9834e4f004dd8ebd Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Sun, 26 Dec 2021 01:22:59 +0100 Subject: [PATCH 10/10] Update the license --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index 67e74ccff..6e357838b 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ Copyright 2012-2015 Vincent Driessen -Copyright 2015-2020 Julian Gonggrijp +Copyright 2015-2021 Julian Gonggrijp Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: