Skip to content

Commit ba5149f

Browse files
rbanffysourcery-ai[bot]kevin-paulson-mindbridge-aiandrejkurusiovxatier
authored
Merge develop (#66)
* Bump version to 1.0.1 * Fix failing Flake8 test * Update history * Add --no-chill command line option. Fixes #34 * Remove click and add black to the requirements file * Version update * Remove black - not a dev requirement * 'Refactored by Sourcery' (#37) Co-authored-by: Sourcery AI <> * Update python-package.yml (#33) * Circleci project setup (#39) * Add .circleci/config.yml * Add .circleci/config.yml * Add .circleci/config.yml * Update README with --no-chill switch * Update HISTORY and bump versions * Remove __future__ import (we don't need it anymore) * We only support Python 3+ * Add `ssort` * Sort methods with `ssort` * Version bump * Remove Python 3.5 support * Remove Python 3.6 support and move 3.10 out of dev * Upgrade macOS image to 13.2 (Xcode 13.2.1) * Time `tox` execution * Update HISTORY.rst * Update supported Python versions * Update Python image version * Update HISTORY.rst Bump version from current to 1.0.3 * Update config.yml Use new Docker environment * Update config.yml Return to the Python orb approach * Added note so contributors start from the develop branch * Remove support for 3.6 in tests, add 3.10, 3.11 * Update pip before installing travis-tox * Add Python 3.11 to some platforms in travis * Resolve: Inconsistent sort for "Installed as dependency for" (#64) * Added a --no-chill option (#36) * Bump version to 1.0.1 * Fix failing Flake8 test * Update history * Add --no-chill command line option. Fixes #34 * Remove click and add black to the requirements file * Version update * Remove black - not a dev requirement * 'Refactored by Sourcery' (#37) Co-authored-by: Sourcery AI <> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Version 1.0.1 (#40) * Bump version to 1.0.1 * Fix failing Flake8 test * Update history * Add --no-chill command line option. Fixes #34 * Remove click and add black to the requirements file * Version update * Remove black - not a dev requirement * 'Refactored by Sourcery' (#37) Co-authored-by: Sourcery AI <> * Update python-package.yml (#33) * Circleci project setup (#39) * Add .circleci/config.yml * Add .circleci/config.yml * Add .circleci/config.yml * Update README with --no-chill switch Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Update github repo url (#50) * Fix GitHub repo URL (#56) Will fix Travis tests later * Sort required_by * Update README to match new output * Update github repo url (#50) * Fix GitHub repo URL (#56) Will fix Travis tests later * Sort required_by * Update README to match new output * Add to AUTHORS --------- Co-authored-by: Ricardo Bánffy <[email protected]> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: AndrejK <[email protected]> Co-authored-by: xatier <[email protected]> * 'Refactored by Sourcery' (#67) Co-authored-by: Sourcery AI <> * Fix Flake8 flagged issues * Apply Black * Fix version numbers * Fix f-strings --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: Kevin Paulson <[email protected]> Co-authored-by: AndrejK <[email protected]> Co-authored-by: xatier <[email protected]> Co-authored-by: Ricardo Bánffy <[email protected]>
1 parent c32c458 commit ba5149f

File tree

14 files changed

+60
-72
lines changed

14 files changed

+60
-72
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2.1
22

33
orbs:
4-
python: circleci/python@0.2.1
4+
python: circleci/python@2.1.1
55

66
jobs:
77
build-and-test:

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9']
18+
python-version: ['3.7', '3.8', '3.9', '3.10']
1919

2020
steps:
2121
- uses: actions/checkout@v2

.travis.yml

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,50 @@
33

44
# command to install dependencies, e.g. pip install -r requirements.txt
55
install:
6-
- pip install tox-travis
76
- pip install --upgrade pip
7+
- pip install tox-travis
88

99
# command to run tests, e.g. python setup.py test
10-
script: tox
10+
script: time tox
1111

1212
# Globals
1313
language: python
1414
dist: focal
1515
os: linux
16+
osx_image: xcode13.2
1617

1718
jobs:
1819
include:
19-
- arch: amd64
20-
python: 3.5
21-
- arch: amd64
22-
python: 3.6
2320
- arch: amd64
2421
python: 3.7
2522
- arch: amd64
2623
python: 3.8
2724
- arch: amd64
2825
python: 3.9
2926
- arch: amd64
30-
python: 3.10-dev
27+
python: 3.10
28+
- arch: amd64
29+
python: 3.11
3130

32-
- arch: arm64
33-
python: 3.5
34-
- arch: arm64
35-
python: 3.6
3631
- arch: arm64
3732
python: 3.7
3833
- arch: arm64
3934
python: 3.8
4035
- arch: arm64
4136
python: 3.9
4237
- arch: arm64
43-
python: 3.10-dev
38+
python: 3.10
39+
- arch: arm64
40+
python: 3.11
4441

4542
- arch: ppc64le
46-
python: 3.5
47-
- arch: ppc64le
48-
python: 3.6
49-
- arch: ppc64le
50-
dist: bionic
5143
python: 3.7
5244
- arch: ppc64le
5345
python: 3.8
5446
- arch: ppc64le
5547
python: 3.9
5648

5749
- arch: s390x
58-
python: 3.5
59-
- arch: s390x
60-
python: 3.6
61-
- arch: s390x
62-
dist: bionic
6350
python: 3.7
6451
- arch: s390x
6552
python: 3.8
@@ -68,31 +55,21 @@ jobs:
6855

6956
- os: osx
7057
language: generic
71-
osx_image: xcode12.2
72-
python: 3.5
73-
env: PYTHON=3.5
74-
- os: osx
75-
language: generic
76-
osx_image: xcode12.2
77-
python: 3.6
78-
env: PYTHON=3.6
79-
- os: osx
80-
language: generic
81-
osx_image: xcode12.2
8258
python: 3.7
8359
env: PYTHON=3.7
8460
- os: osx
8561
language: generic
86-
osx_image: xcode12.2
8762
python: 3.8
8863
env: PYTHON=3.8
8964
- os: osx
9065
language: generic
91-
osx_image: xcode12.2
9266
python: 3.9
9367
env: PYTHON=3.9
9468
- os: osx
9569
language: generic
96-
osx_image: xcode12.2
97-
python: 3.10-dev
98-
env: PYTHON=3.10-dev
70+
python: 3.10
71+
env: PYTHON=3.10
72+
- os: osx
73+
language: generic
74+
python: 3.11
75+
env: PYTHON=3.11

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ Development Lead
1010
Contributors
1111
------------
1212

13+
* Kevin Paulson https://github.com/kjwpaulson
1314
* Luke Skibinski https://github.com/lsh-0
1415
* Piotr Surowiec https://github.com/Agrendalath

CONTRIBUTING.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ If you are reporting a bug, please include:
2626
Fix Bugs
2727
~~~~~~~~
2828

29-
Look through the GitHub issues for bugs. Anything tagged with "bug"
30-
and "help wanted" is open to whoever wants to implement it.
29+
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
30+
wanted" is open to whoever wants to implement it. Remember to start from the
31+
`develop` branch.
3132

3233
Implement Features
3334
~~~~~~~~~~~~~~~~~~
@@ -101,14 +102,13 @@ Before you submit a pull request, check that it meets these guidelines:
101102
2. If the pull request adds functionality, the docs should be updated. Put
102103
your new functionality into a function with a docstring, and add the
103104
feature to the list in README.rst.
104-
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
105-
https://travis-ci.org/rbanffy/pip-chill/pull_requests
105+
3. The pull request should work for Python 3.7+, and for PyPy. Check
106+
https://travis-ci.org/rbanffy/pip_chill/pull_requests
106107
and make sure that the tests pass for all supported Python versions.
107108

108109
Tips
109110
----
110111

111112
To run a subset of tests::
112113

113-
114114
$ python -m unittest tests.test_pip_chill

HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
History
33
=======
44

5+
1.0.2 (2023-04-15)
6+
------------------
7+
* Sort dependencies alphabetically in --verbose
8+
* Use `ssort` to topologically sort code
9+
* Update 3.11-dev to 3.11 on TravisCI
10+
* Remove support for Python 3.5 and 3.6
11+
* Update README.rst with --no-chill switch
12+
* Bump version to 1.0.2
13+
514
1.0.1 (2021-01-18)
615
------------------
716

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Or, if you want to list package dependencies too::
112112
# chardet==4.0.0 # Installed as dependency for requests
113113
# colorama==0.4.4 # Installed as dependency for twine
114114
# distlib==0.3.1 # Installed as dependency for virtualenv
115-
# docutils==0.16 # Installed as dependency for sphinx, readme-renderer
115+
# docutils==0.16 # Installed as dependency for readme-renderer, sphinx
116116
# filelock==3.0.12 # Installed as dependency for tox, virtualenv
117117
# gitdb==4.0.5 # Installed as dependency for gitpython
118118
...

pip_chill/cli.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
4-
from __future__ import print_function
1+
#!/usr/bin/env python3
52

63
import argparse
74

pip_chill/pip_chill.py

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,14 @@ def get_name_without_version(self):
1919
Return the name of the package without a version.
2020
"""
2121
if self.required_by:
22-
return "# {} # Installed as dependency for {}".format(
23-
self.name, ", ".join(self.required_by)
22+
return (
23+
f"# {self.name} # Installed as dependency for "
24+
f"{', '.join(sorted(self.required_by))}"
2425
)
2526
return self.name
2627

27-
def __str__(self):
28-
if self.required_by:
29-
return "# {}=={} # Installed as dependency for {}".format(
30-
self.name, self.version, ", ".join(self.required_by)
31-
)
32-
return "{}=={}".format(self.name, self.version)
33-
34-
def __repr__(self):
35-
return '<{}.{} instance "{}">'.format(
36-
self.__module__, self.__class__.__name__, self.name
37-
)
28+
def __lt__(self, other):
29+
return self.name < other.name
3830

3931
def __eq__(self, other):
4032
if self is other:
@@ -44,12 +36,23 @@ def __eq__(self, other):
4436
else:
4537
return self.name == other
4638

47-
def __lt__(self, other):
48-
return self.name < other.name
49-
5039
def __hash__(self):
5140
return hash(self.name)
5241

42+
def __repr__(self):
43+
return (
44+
f'<{self.__module__}.{self.__class__.__name__} instance "'
45+
f'{self.name}">'
46+
)
47+
48+
def __str__(self):
49+
if self.required_by:
50+
return (
51+
f"# {self.name}=={self.version} # Installed as "
52+
f"dependency for {', '.join(sorted(self.required_by))}"
53+
)
54+
return f"{self.name}=={self.version}"
55+
5356

5457
def chill(show_all=False, no_chill=False):
5558
if show_all:

requirements_dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ flake8
55
nose
66
pytest
77
sphinx
8+
ssort
89
tox
910
twine
1011
watchdog

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.0.1
2+
current_version = 1.0.2
33
commit = True
44
tag = True
55

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
setup(
1717
name="pip-chill",
18-
version="1.0.1",
18+
version="1.0.2",
1919
description="Like `pip freeze` but lists only the packages that are not "
2020
"dependencies of installed packages.",
2121
long_description=readme + "\n\n" + history,
@@ -39,11 +39,11 @@
3939
"OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
4040
"Natural Language :: English",
4141
"Programming Language :: Python :: 3",
42-
"Programming Language :: Python :: 3.5",
43-
"Programming Language :: Python :: 3.6",
4442
"Programming Language :: Python :: 3.7",
4543
"Programming Language :: Python :: 3.8",
4644
"Programming Language :: Python :: 3.9",
45+
"Programming Language :: Python :: 3.10",
46+
"Programming Language :: Python :: 3.11",
4747
"Topic :: Software Development",
4848
],
4949
test_suite="tests",

tests/test_pip_chill.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def test_command_line_interface_omits_ignored(self):
110110

111111
result = os.popen(command).read()
112112
for package in ["wheel", "setuptools", "pip"]:
113-
self.assertFalse(any(p.startswith(package + "==") for p in result.split("\n")))
113+
self.assertFalse(any(p.startswith(f"{package}==") for p in result.split("\n")))
114114

115115
def test_command_line_interface_all(self):
116116
command = "pip_chill/cli.py --all"

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py35, py36, py37, py38, py39, bandit, flake8
2+
envlist = py37, py38, py39, py310, py311, bandit, flake8
33

44
[testenv:bandit]
55
basepython=python3

0 commit comments

Comments
 (0)