Skip to content

Commit 8c349f9

Browse files
committed
Merge branch 'release/0.5.1'
2 parents 39cd1c1 + 5777fd1 commit 8c349f9

File tree

7 files changed

+34
-18
lines changed

7 files changed

+34
-18
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ branches:
99
except:
1010
- piptools-ignore-patch
1111
install:
12-
- "pip install cram --use-mirrors"
13-
- "pip install . --use-mirrors"
12+
- "pip install cram"
13+
- "pip install ."
1414
script:
1515
- "cram tests/*.t"

CONTRIBUTING.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
## How to contribute to `pip-review`
1+
# How to contribute to `pip-review`
22

33
First rule: please **do** contribute!
44

5-
I (@jgonggrijp) want to keep `pip-review` in the air, but I can't dedicate much time to maintaining it. So if you see a way to improve `pip-review`, whether it's fixing a bug or adding a feature, please go ahead and do it. I will happily accept your pull request.
5+
I (@jgonggrijp) want to keep `pip-review` in the air, but I cannot dedicate much time to maintaining it. So if you see a way to improve `pip-review`, whether by fixing a bug or by adding a feature, please go ahead and submit a pull request.
66

7-
### Wish list
7+
## Suggestions
88

9-
- Python 3 compatibility
9+
Any kind of contribution is welcome; nothing is "off limits". However, for those who would like some guidance:
1010

11-
### The fine print
11+
- Look for issues with the [help wanted](https://github.com/jgonggrijp/pip-review/labels/help%20wanted), [question](https://github.com/jgonggrijp/pip-review/labels/question) or [poll](https://github.com/jgonggrijp/pip-review/labels/poll) label. In the latter case, if you have an opinion, vote by adding an emoticon of your choice to the opening post. Feel free to explain your vote in a response or to thumbs-up another response that explains your opinion.
12+
- Issues that are associated with a milestone are ordered by relative priority. To see the priority order, click on the milestone. Needless to say, the highest priority issue is at the top.
13+
14+
## The fine print
1215

1316
This repo ([jgonggrijp/pip-review](https://github.com/jgonggrijp/pip-review)) uses [gitflow](https://github.com/nvie/gitflow). Please submit pull requests to the `develop` branch.
1417

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
History
22
=======
33

4+
0.5.1 (2017-01-21)
5+
------------------
6+
Please see the [release notes on GitHub](https://github.com/jgonggrijp/pip-review/releases/tag/0.5.1) for details about this release. The [GitHub release list](https://github.com/jgonggrijp/pip-review/releases) will be the single source of truth about releases from now on. This is the final version of this file; it will be removed in a future release.
7+
48
0.5 (2016-10-10)
59
----------------
610
- Should work under Windows from now on

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pip-review
55

66
`pip-review` checks PyPI and reports available updates. It uses the list of
77
currently installed packages to check for updates, it does not use any
8-
requirements.txt
8+
`requirements.txt`.
99

1010
Example, report-only:
1111

pip_review/__main__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import logging
88
import sys
99
import json
10+
import pip
1011
try:
1112
import urllib2 as urllib_request # Python2
1213
except ImportError:
@@ -154,12 +155,14 @@ def get_latest_versions(pkg_names, prerelease=False):
154155
def get_installed_pkgs(local=False):
155156
logger = logging.getLogger(u'pip-review')
156157
command = 'pip freeze'
158+
if packaging_version.parse(pip.__version__) >= packaging_version.parse('8.0.3'):
159+
command += ' --all'
157160
if local:
158161
command += ' --local'
159162

160163
output = check_output(command).decode('utf-8')
161164

162-
for line in output.split('\n'):
165+
for line in output.splitlines():
163166
if not line or line.startswith('##'):
164167
continue
165168

@@ -227,7 +230,10 @@ def ask(self, prompt):
227230

228231

229232
def update_pkg(pkg, version):
230-
os.system('pip install {0}=={1}'.format(pkg, version))
233+
command = 'pip install {0}=={1}'.format(pkg, version)
234+
if pkg=='pip':
235+
command = 'python -m ' + command
236+
os.system(command)
231237

232238

233239
def confirm(question):
@@ -267,7 +273,7 @@ def main():
267273
if raw_version is None:
268274
logger.warning('No update information found for {0}'.format(pkg))
269275
all_ok = False
270-
elif raw_version != installed_raw_version:
276+
elif parse_version(str(raw_version)) > parse_version(str(installed_raw_version)):
271277
if args.raw:
272278
logger.info('{0}=={1}'.format(pkg, latest_version))
273279
else:

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77

88
def get_dependencies():
9-
deps = ['packaging']
9+
deps = ['packaging', 'pip']
1010
if sys.version_info < (2, 7):
1111
deps += ['argparse']
1212
return deps
1313

1414

1515
setup(
1616
name='pip-review',
17-
version='0.5',
17+
version='0.5.1',
1818
url='https://github.com/jgonggrijp/pip-review',
1919
license='BSD',
2020
author='Vincent Driessen, Julian Gonggrijp',
@@ -55,6 +55,7 @@ def get_dependencies():
5555
'Programming Language :: Python :: 3.3',
5656
'Programming Language :: Python :: 3.4',
5757
'Programming Language :: Python :: 3.5',
58+
'Programming Language :: Python :: 3.6',
5859
'Intended Audience :: Developers',
5960
'Intended Audience :: System Administrators',
6061
'License :: OSI Approved :: BSD License',

tests/review.t

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,28 @@ Also install library, which caused warning message:
2121
Next, let's see what pip-review does:
2222

2323
$ pip-review
24-
cElementTree==1.0.2-20050302 is available (you have 1.0.5.post20051216)
2524
python-dateutil==* is available (you have 1.5) (glob)
2625

2726
Or in raw mode:
2827

2928
$ pip-review --raw
30-
cElementTree==1.0.2-20050302
3129
python-dateutil==* (glob)
3230

3331
We can also install these updates automatically:
3432

3533
$ pip-review --auto >/dev/null 2>&1
3634
$ pip-review
37-
cElementTree==* is available (you have 1.0.5.post20051216) (glob)
35+
Everything up-to-date
3836

3937
Next, let's test for regressions with older versions of pip:
4038

4139
$ pip install --force-reinstall --upgrade pip\<6.0 >/dev/null 2>&1
42-
$ pip-review
43-
cElementTree==* is available (you have 1.0.5.post20051216) (glob)
40+
$ if python -c 'import sys; sys.exit(0 if sys.version_info < (3, 6) else 1)'; then
41+
> pip-review
42+
> else
43+
> echo Skipped
44+
> fi
45+
(Everything up-to-date|Skipped) (re)
4446

4547
Cleanup our playground:
4648

0 commit comments

Comments
 (0)