Skip to content

Commit b69eb60

Browse files
committed
chore: drop support for python 3.8 and 3.9, codecov
1 parent 38a67e3 commit b69eb60

File tree

12 files changed

+67
-66
lines changed

12 files changed

+67
-66
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,34 @@ jobs:
1919
lint:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
23-
- uses: extractions/setup-just@v2
24-
- uses: actions/setup-python@v5
22+
- uses: actions/checkout@v5
23+
- uses: extractions/setup-just@v3
24+
- uses: actions/setup-python@v6
2525
with:
26-
python-version: '3.13'
26+
python-version: '3.14'
2727
- run: just install lint
2828
test:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
pythonversion: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
32+
pythonversion: ['3.10', '3.11', '3.12', '3.13', '3.14']
3333
steps:
34-
- uses: actions/checkout@v4
35-
- uses: extractions/setup-just@v2
36-
- uses: actions/setup-python@v5
34+
- uses: actions/checkout@v5
35+
- uses: extractions/setup-just@v3
36+
- uses: actions/setup-python@v6
3737
with:
3838
python-version: ${{ matrix.pythonversion }}
3939
- run: just install coverage
4040
coverage:
4141
if: github.ref == 'refs/heads/main'
4242
runs-on: ubuntu-latest
4343
steps:
44-
- uses: actions/checkout@v4
45-
- uses: extractions/setup-just@v2
46-
- uses: actions/setup-python@v5
44+
- uses: actions/checkout@v5
45+
- uses: extractions/setup-just@v3
46+
- uses: actions/setup-python@v6
4747
with:
48-
python-version: '3.13'
48+
python-version: '3.14'
4949
- run: just install coverage
50-
- uses: coverallsapp/github-action@v2
50+
- uses: codecov/codecov-action@v5
5151
with:
52-
github-token: ${{ secrets.GITHUB_TOKEN }}
53-
path-to-lcov: './coverage.lcov'
52+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/homebrew.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
commit_owner: Justintime50
2020
commit_email: [email protected]
2121
update_readme_table: true
22-
depends_on: '"python@3.13"'
22+
depends_on: '"python@3.14"'
2323
install: virtualenv_install_with_resources
2424
test: 'assert_match "pip-tree #{version}", shell_output("#{bin}/pip-tree --version")'
2525
formula_includes: 'include Language::Python::Virtualenv'

.github/workflows/pypi.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
release:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: extractions/setup-just@v2
14-
- uses: actions/setup-python@v5
12+
- uses: actions/checkout@v5
13+
- uses: extractions/setup-just@v3
14+
- uses: actions/setup-python@v6
1515
with:
16-
python-version: '3.13'
16+
python-version: '3.14'
1717
- run: just install build
1818
- name: Publish to PyPI
1919
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## v5.0.0 (2025-11-18)
4+
5+
- Drops support for Python 3.8 and 3.9
6+
- Bumps deps
7+
38
## v4.0.0 (2024-07-17)
49

510
- Remove reliance on `pkg_resources` from `setuptools` and instead uses the `importlib.metadata` module which is builtin

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Get the dependency tree of your Python virtual environment via Pip.
66

77
[![Build Status](https://github.com/Justintime50/pip-tree/workflows/build/badge.svg)](https://github.com/Justintime50/pip-tree/actions)
8-
[![Coverage Status](https://coveralls.io/repos/github/Justintime50/pip-tree/badge.svg?branch=main)](https://coveralls.io/github/Justintime50/pip-tree?branch=main)
8+
[![Coverage Status](https://img.shields.io/codecov/c/github/justintime50/pip-tree)](https://app.codecov.io/github/Justintime50/pip-tree)
99
[![PyPi](https://img.shields.io/pypi/v/pip-tree)](https://pypi.org/project/pip-tree/)
1010
[![Licence](https://img.shields.io/github/license/justintime50/pip-tree)](LICENSE)
1111

pip_tree/__init__.py

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

99

1010
__all__ = [
11-
'generate_pip_tree',
12-
'get_package_details',
13-
'get_pip_package_list',
11+
"generate_pip_tree",
12+
"get_package_details",
13+
"get_pip_package_list",
1414
]

pip_tree/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '4.0.0'
1+
__version__ = "5.0.0"

pip_tree/cli.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,29 @@
99
class PipTreeCli:
1010
def __init__(self):
1111
parser = argparse.ArgumentParser(
12-
description='Get the dependency tree of your Python virtual environment via Pip.'
12+
description="Get the dependency tree of your Python virtual environment via Pip."
1313
)
1414
parser.add_argument(
15-
'-p',
16-
'--path',
15+
"-p",
16+
"--path",
1717
required=False,
1818
default=pip_tree.SITE_PACKAGES_PATH,
1919
type=str,
2020
help=(
21-
'The path to the site-packages directory of a Python virtual environment. If a path is not provided,'
22-
' the virtual environment Pip Tree is run from will be used.'
21+
"The path to the site-packages directory of a Python virtual environment. If a path is not provided,"
22+
" the virtual environment Pip Tree is run from will be used."
2323
),
2424
)
2525
parser.add_argument(
26-
'--version',
27-
action='version',
28-
version=f'%(prog)s {__version__}',
26+
"--version",
27+
action="version",
28+
version=f"%(prog)s {__version__}",
2929
)
3030
parser.parse_args(namespace=self)
3131

3232
def generate_console_output(self):
3333
"""Take the output of the dependency tree and print to console."""
34-
print('Generating Pip Tree report...')
34+
print("Generating Pip Tree report...")
3535

3636
final_output, package_count = pip_tree.generate_pip_tree(os.path.expanduser(self.path))
3737
console_output = json.dumps(final_output, indent=4)
@@ -44,5 +44,5 @@ def main():
4444
PipTreeCli().generate_console_output()
4545

4646

47-
if __name__ == '__main__':
47+
if __name__ == "__main__":
4848
main()

pip_tree/tree.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
)
1818

1919

20-
SITE_PACKAGES_PATH = sysconfig.get_paths()['platlib']
20+
SITE_PACKAGES_PATH = sysconfig.get_paths()["platlib"]
2121

2222

2323
def generate_pip_tree(path: str = SITE_PACKAGES_PATH) -> Tuple[List[Dict[str, Any]], int]:
@@ -35,9 +35,9 @@ def generate_pip_tree(path: str = SITE_PACKAGES_PATH) -> Tuple[List[Dict[str, An
3535

3636
# Append the `required_by` field to each record created from `_generate_reverse_requires_field()`
3737
for item in pip_tree_results:
38-
item['required_by'] = sorted(required_by_data.get(item['name'], []))
38+
item["required_by"] = sorted(required_by_data.get(item["name"], []))
3939

40-
final_output = sorted(pip_tree_results, key=lambda k: k['name'].lower())
40+
final_output = sorted(pip_tree_results, key=lambda k: k["name"].lower())
4141

4242
return final_output, package_count
4343

@@ -58,24 +58,24 @@ def get_package_details(package: Distribution) -> Dict[str, Any]:
5858
package_updated_at = (
5959
time.ctime(os.path.getctime(package_location))
6060
if package_location and os.path.exists(package_location)
61-
else 'unknown'
61+
else "unknown"
6262
)
6363

6464
requires_list = (
65-
[sorted(str(requirement.replace(' ', '').split(';')[0]) for requirement in package.requires)]
65+
[sorted(str(requirement.replace(" ", "").split(";")[0]) for requirement in package.requires)]
6666
if package.requires
6767
else []
6868
)
6969

7070
package_details = {
71-
'name': package.metadata['Name'],
72-
'version': package.metadata['Version'],
73-
'updated': (
71+
"name": package.metadata["Name"],
72+
"version": package.metadata["Version"],
73+
"updated": (
7474
datetime.datetime.strptime(package_updated_at, "%a %b %d %H:%M:%S %Y").strftime("%Y-%m-%d")
75-
if package_updated_at != 'unknown'
76-
else 'unknown'
75+
if package_updated_at != "unknown"
76+
else "unknown"
7777
),
78-
'requires': sorted([item for sublist in requires_list for item in set(sublist)]),
78+
"requires": sorted([item for sublist in requires_list for item in set(sublist)]),
7979
}
8080

8181
return package_details
@@ -85,16 +85,16 @@ def _generate_reverse_requires_field(required_by_data: Dict[str, Set[str]], pack
8585
"""Generate a reversed list from the `requires` fields and create a
8686
collection of each `required_by` fields so each package can show what it's required by.
8787
"""
88-
requires_list = [item for item in package_details['requires']]
88+
requires_list = [item for item in package_details["requires"]]
8989
for required_by_package in requires_list:
90-
word = re.compile(r'^(\w)+')
90+
word = re.compile(r"^(\w)+")
9191
name_match = word.match(required_by_package)
92-
required_by_package_name = name_match.group() if name_match is not None else ''
92+
required_by_package_name = name_match.group() if name_match is not None else ""
9393

9494
# If a package is listed, add to its set, otherwise create a new set
9595
if required_by_package_name in required_by_data:
96-
required_by_data[required_by_package_name].add(package_details['name'])
96+
required_by_data[required_by_package_name].add(package_details["name"])
9797
else:
98-
required_by_data[required_by_package_name] = {package_details['name']}
98+
required_by_data[required_by_package_name] = {package_details["name"]}
9999

100100
required_by_data = {key: set(value) for key, value in required_by_data.items()}

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[tool.black]
2-
preview = true
32
line-length = 120
4-
skip-string-normalization = true
53

64
[tool.isort]
75
profile = "black"

0 commit comments

Comments
 (0)