Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/python_inspector/package_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ async def get_pypi_data_from_purl(


def choose_single_wheel(wheel_urls: List[str]) -> Optional[str]:
# fix Issue 240 - TypeError: '<' not supported between instances of 'str' and 'NoneType'
wheel_urls = [url for url in wheel_urls if url is not None]
"""
Sort wheel urls descendingly and return the first one
"""
Expand Down
207 changes: 102 additions & 105 deletions tests/data/azure-devops.req-310-expected.json

Large diffs are not rendered by default.

207 changes: 102 additions & 105 deletions tests/data/azure-devops.req-312-expected.json

Large diffs are not rendered by default.

207 changes: 102 additions & 105 deletions tests/data/azure-devops.req-313-expected.json

Large diffs are not rendered by default.

207 changes: 102 additions & 105 deletions tests/data/azure-devops.req-314-expected.json

Large diffs are not rendered by default.

81 changes: 41 additions & 40 deletions tests/data/azure-devops.req-38-expected.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tests/data/default-url-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--index-url https://pypi.org/simple",
"--json <file>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--index-url https://pypi.org/simple",
"--json-pdt <file>",
Expand Down
107 changes: 49 additions & 58 deletions tests/data/example-requirements-ignore-errors-expected.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tests/data/frozen-requirements.txt-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--index-url https://pypi.org/simple",
"--json-pdt <file>",
Expand Down
20 changes: 10 additions & 10 deletions tests/data/hash-requirements.txt-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@
"type": "pypi",
"namespace": null,
"name": "certifi",
"version": "2026.1.4",
"version": "2026.2.25",
"qualifiers": {},
"subpath": null,
"primary_language": "Python",
"description": "Python package for providing Mozilla's CA Bundle.\nCertifi: Python SSL Certificates\n================================\n\nCertifi provides Mozilla's carefully curated collection of Root Certificates for\nvalidating the trustworthiness of SSL certificates while verifying the identity\nof TLS hosts. It has been extracted from the `Requests`_ project.\n\nInstallation\n------------\n\n``certifi`` is available on PyPI. Simply install it with ``pip``::\n\n $ pip install certifi\n\nUsage\n-----\n\nTo reference the installed certificate authority (CA) bundle, you can use the\nbuilt-in function::\n\n >>> import certifi\n\n >>> certifi.where()\n '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'\n\nOr from the command line::\n\n $ python -m certifi\n /usr/local/lib/python3.7/site-packages/certifi/cacert.pem\n\nEnjoy!\n\n.. _`Requests`: https://requests.readthedocs.io/en/master/\n\nAddition/Removal of Certificates\n--------------------------------\n\nCertifi does not support any addition/removal or other modification of the\nCA trust store content. This project is intended to provide a reliable and\nhighly portable root of trust to python deployments. Look to upstream projects\nfor methods to use alternate trust.",
"release_date": "2026-01-04T02:42:40",
"release_date": "2026-02-25T02:54:15",
"parties": [
{
"type": "person",
Expand All @@ -201,11 +201,11 @@
"Programming Language :: Python :: 3.9"
],
"homepage_url": "https://github.com/certifi/python-certifi",
"download_url": "https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl",
"size": 152900,
"download_url": "https://files.pythonhosted.org/packages/9a/3c/c17fb3ca2d9c3acff52e30b309f538586f9f5b9c9cf454f3845fc9af4881/certifi-2026.2.25-py3-none-any.whl",
"size": 153684,
"sha1": null,
"md5": "1dab98768140ad2d8dbc9be8f14a2af9",
"sha256": "9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c",
"md5": "1719fecdcfb531a622c0ee93e6bf4ba1",
"sha256": "027692e4402ad994f1c42e52a4997a9763c646b73e4096e4d5d6db8af1d6f0fa",
"sha512": null,
"bug_tracking_url": null,
"code_view_url": "https://github.com/certifi/python-certifi",
Expand All @@ -225,9 +225,9 @@
"dependencies": [],
"repository_homepage_url": null,
"repository_download_url": null,
"api_data_url": "https://pypi.org/pypi/certifi/2026.1.4/json",
"api_data_url": "https://pypi.org/pypi/certifi/2026.2.25/json",
"datasource_id": null,
"purl": "pkg:pypi/certifi@2026.1.4"
"purl": "pkg:pypi/certifi@2026.2.25"
},
{
"type": "pypi",
Expand Down Expand Up @@ -514,7 +514,7 @@
"dependencies": []
},
{
"package": "pkg:pypi/certifi@2026.1.4",
"package": "pkg:pypi/certifi@2026.2.25",
"dependencies": []
},
{
Expand All @@ -528,7 +528,7 @@
{
"package": "pkg:pypi/requests@2.25.1",
"dependencies": [
"pkg:pypi/certifi@2026.1.4",
"pkg:pypi/certifi@2026.2.25",
"pkg:pypi/chardet@4.0.0",
"pkg:pypi/idna@2.10",
"pkg:pypi/urllib3@1.26.20"
Expand Down
23 changes: 11 additions & 12 deletions tests/data/insecure-setup-2/setup.py-expected.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tests/data/insecure-setup/setup.py-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--analyze-setup-py-insecurely",
"--index-url https://pypi.org/simple",
Expand Down
1 change: 0 additions & 1 deletion tests/data/no-install-requires-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--index-url https://pypi.org/simple",
"--json <file>",
Expand Down
1 change: 0 additions & 1 deletion tests/data/pdt-requirements.txt-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--index-url https://pypi.org/simple",
"--json-pdt <file>",
Expand Down
1 change: 0 additions & 1 deletion tests/data/prefer-source-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--index-url https://pypi.org/simple",
"--json <file>",
Expand Down
6 changes: 3 additions & 3 deletions tests/data/resolved_deps/autobahn-310-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": [
"pkg:pypi/cryptography@43.0.3",
"pkg:pypi/hyperlink@21.0.0",
"pkg:pypi/setuptools@80.9.0",
"pkg:pypi/setuptools@82.0.1",
"pkg:pypi/txaio@23.6.1"
]
},
Expand Down Expand Up @@ -36,7 +36,7 @@
"dependencies": []
},
{
"package": "pkg:pypi/setuptools@80.9.0",
"package": "pkg:pypi/setuptools@82.0.1",
"dependencies": []
},
{
Expand All @@ -51,7 +51,7 @@
"pkg:pypi/hyperlink@21.0.0",
"pkg:pypi/idna@3.11",
"pkg:pypi/pycparser@2.23",
"pkg:pypi/setuptools@80.9.0",
"pkg:pypi/setuptools@82.0.1",
"pkg:pypi/txaio@23.6.1"
]
]
12 changes: 6 additions & 6 deletions tests/data/resolved_deps/flask-310-expected.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[
[
{
"package": "pkg:pypi/click@8.3.1",
"package": "pkg:pypi/click@8.3.2",
"dependencies": []
},
{
"package": "pkg:pypi/flask@2.1.2",
"dependencies": [
"pkg:pypi/click@8.3.1",
"pkg:pypi/click@8.3.2",
"pkg:pypi/itsdangerous@2.2.0",
"pkg:pypi/jinja2@3.1.6",
"pkg:pypi/werkzeug@3.1.5"
"pkg:pypi/werkzeug@3.1.8"
]
},
{
Expand All @@ -28,18 +28,18 @@
"dependencies": []
},
{
"package": "pkg:pypi/werkzeug@3.1.5",
"package": "pkg:pypi/werkzeug@3.1.8",
"dependencies": [
"pkg:pypi/markupsafe@3.0.3"
]
}
],
[
"pkg:pypi/click@8.3.1",
"pkg:pypi/click@8.3.2",
"pkg:pypi/flask@2.1.2",
"pkg:pypi/itsdangerous@2.2.0",
"pkg:pypi/jinja2@3.1.6",
"pkg:pypi/markupsafe@3.0.3",
"pkg:pypi/werkzeug@3.1.5"
"pkg:pypi/werkzeug@3.1.8"
]
]
12 changes: 6 additions & 6 deletions tests/data/resolved_deps/flask-310-win-expected.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
[
{
"package": "pkg:pypi/click@8.3.1",
"package": "pkg:pypi/click@8.3.2",
"dependencies": [
"pkg:pypi/colorama@0.4.6"
]
Expand All @@ -13,10 +13,10 @@
{
"package": "pkg:pypi/flask@2.1.2",
"dependencies": [
"pkg:pypi/click@8.3.1",
"pkg:pypi/click@8.3.2",
"pkg:pypi/itsdangerous@2.2.0",
"pkg:pypi/jinja2@3.1.6",
"pkg:pypi/werkzeug@3.1.5"
"pkg:pypi/werkzeug@3.1.8"
]
},
{
Expand All @@ -34,19 +34,19 @@
"dependencies": []
},
{
"package": "pkg:pypi/werkzeug@3.1.5",
"package": "pkg:pypi/werkzeug@3.1.8",
"dependencies": [
"pkg:pypi/markupsafe@3.0.3"
]
}
],
[
"pkg:pypi/click@8.3.1",
"pkg:pypi/click@8.3.2",
"pkg:pypi/colorama@0.4.6",
"pkg:pypi/flask@2.1.2",
"pkg:pypi/itsdangerous@2.2.0",
"pkg:pypi/jinja2@3.1.6",
"pkg:pypi/markupsafe@3.0.3",
"pkg:pypi/werkzeug@3.1.5"
"pkg:pypi/werkzeug@3.1.8"
]
]
6 changes: 3 additions & 3 deletions tests/data/resolved_deps/flask-39-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pkg:pypi/importlib-metadata@8.7.1",
"pkg:pypi/itsdangerous@2.2.0",
"pkg:pypi/jinja2@3.1.6",
"pkg:pypi/werkzeug@3.1.5"
"pkg:pypi/werkzeug@3.1.8"
]
},
{
Expand All @@ -35,7 +35,7 @@
"dependencies": []
},
{
"package": "pkg:pypi/werkzeug@3.1.5",
"package": "pkg:pypi/werkzeug@3.1.8",
"dependencies": [
"pkg:pypi/markupsafe@3.0.3"
]
Expand All @@ -52,7 +52,7 @@
"pkg:pypi/itsdangerous@2.2.0",
"pkg:pypi/jinja2@3.1.6",
"pkg:pypi/markupsafe@3.0.3",
"pkg:pypi/werkzeug@3.1.5",
"pkg:pypi/werkzeug@3.1.8",
"pkg:pypi/zipp@3.23.0"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--analyze-setup-py-insecurely",
"--index-url https://pypi.org/simple",
Expand Down
1 change: 0 additions & 1 deletion tests/data/setup/simple-setup.py-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--index-url https://pypi.org/simple",
"--json <file>",
Expand Down
1 change: 0 additions & 1 deletion tests/data/setup/spdx-setup.py-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--analyze-setup-py-insecurely",
"--index-url https://pypi.org/simple",
Expand Down
1 change: 0 additions & 1 deletion tests/data/single-url-env-var-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"headers": {
"tool_name": "python-inspector",
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
"tool_version": "0.13.0",
"options": [
"--index-url https://pypi.org/simple",
"--json <file>",
Expand Down
Loading
Loading