Skip to content

Respect the HTTP_PROXY environment variable #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 4, 2025
Merged
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: 1 addition & 1 deletion src/python_inspector/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async def get_response_async(url: str) -> Optional[Dict]:
Return a mapping of the JSON response from fetching ``url``
or None if the ``url`` cannot be fetched.
"""
async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(trust_env=True) as session:
async with session.get(url) as response:
if response.status == 200:
return await response.json()
Expand Down
2 changes: 1 addition & 1 deletion src/python_inspector/utils_pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ async def get_remote_file_content(
if login and password:
auth = aiohttp.BasicAuth(login, password)

async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(trust_env=True) as session:
async with session.get(url, allow_redirects=True, headers=headers, auth=auth) as response:
status = response.status
if status != requests.codes.ok: # NOQA
Expand Down
66 changes: 33 additions & 33 deletions tests/data/azure-devops.req-310-expected.json

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions tests/data/azure-devops.req-312-expected.json

Large diffs are not rendered by default.

66 changes: 33 additions & 33 deletions tests/data/azure-devops.req-313-expected.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions tests/data/azure-devops.req-38-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,12 @@
"type": "pypi",
"namespace": null,
"name": "cryptography",
"version": "45.0.4",
"version": "45.0.5",
"qualifiers": {},
"subpath": null,
"primary_language": "Python",
"description": "cryptography is a package which provides cryptographic recipes and primitives to Python developers.\npyca/cryptography\n=================\n\n.. image:: https://img.shields.io/pypi/v/cryptography.svg\n :target: https://pypi.org/project/cryptography/\n :alt: Latest Version\n\n.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest\n :target: https://cryptography.io\n :alt: Latest Docs\n\n.. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main\n :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain\n\n\n``cryptography`` is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your \"cryptographic\nstandard library\". It supports Python 3.7+ and PyPy3 7.3.11+.\n\n``cryptography`` includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests, and\nkey derivation functions. For example, to encrypt something with\n``cryptography``'s high level symmetric encryption recipe:\n\n.. code-block:: pycon\n\n >>> from cryptography.fernet import Fernet\n >>> # Put this somewhere safe!\n >>> key = Fernet.generate_key()\n >>> f = Fernet(key)\n >>> token = f.encrypt(b\"A really secret message. Not for prying eyes.\")\n >>> token\n b'...'\n >>> f.decrypt(token)\n b'A really secret message. Not for prying eyes.'\n\nYou can find more information in the `documentation`_.\n\nYou can install ``cryptography`` with:\n\n.. code-block:: console\n\n $ pip install cryptography\n\nFor full details see `the installation documentation`_.\n\nDiscussion\n~~~~~~~~~~\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nWe maintain a `cryptography-dev`_ mailing list for development discussion.\n\nYou can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get\ninvolved.\n\nSecurity\n~~~~~~~~\n\nNeed to report a security issue? Please consult our `security reporting`_\ndocumentation.\n\n\n.. _`documentation`: https://cryptography.io/\n.. _`the installation documentation`: https://cryptography.io/en/latest/installation/\n.. _`issue tracker`: https://github.com/pyca/cryptography/issues\n.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev\n.. _`security reporting`: https://cryptography.io/en/latest/security/",
"release_date": "2025-06-10T00:03:12",
"release_date": "2025-07-02T13:05:46",
"parties": [
{
"type": "person",
Expand Down Expand Up @@ -616,11 +616,11 @@
"Topic :: Security :: Cryptography"
],
"homepage_url": null,
"download_url": "https://files.pythonhosted.org/packages/7f/e3/57b010282346980475e77d414080acdcb3dab9a0be63071efc2041a2c6bd/cryptography-45.0.4-cp37-abi3-manylinux_2_28_x86_64.whl",
"size": 4452052,
"download_url": "https://files.pythonhosted.org/packages/f2/2e/e2dbd629481b499b14516eed933f3276eb3239f7cee2dcfa4ee6b44d4711/cryptography-45.0.5-cp37-abi3-musllinux_1_2_x86_64.whl",
"size": 4554189,
"sha1": null,
"md5": "c7d3c78af9c284771888bc4fdf63b00e",
"sha256": "7ef2dde4fa9408475038fc9aadfc1fb2676b174e68356359632e980c661ec8f6",
"md5": "e60dd7bf09e038a4508efcef2fc28cd5",
"sha256": "7259038202a47fdecee7e62e0fd0b0738b6daa335354396c6ddebdbe1206af2a",
"sha512": null,
"bug_tracking_url": null,
"code_view_url": null,
Expand All @@ -637,9 +637,9 @@
"dependencies": [],
"repository_homepage_url": null,
"repository_download_url": null,
"api_data_url": "https://pypi.org/pypi/cryptography/45.0.4/json",
"api_data_url": "https://pypi.org/pypi/cryptography/45.0.5/json",
"datasource_id": null,
"purl": "pkg:pypi/cryptography@45.0.4"
"purl": "pkg:pypi/cryptography@45.0.5"
},
{
"type": "pypi",
Expand Down Expand Up @@ -1333,7 +1333,7 @@
"package": "pkg:pypi/azure-storage-blob@12.25.1",
"dependencies": [
"pkg:pypi/azure-core@1.33.0",
"pkg:pypi/cryptography@45.0.4",
"pkg:pypi/cryptography@45.0.5",
"pkg:pypi/isodate@0.7.2",
"pkg:pypi/typing-extensions@4.13.2"
]
Expand All @@ -1357,7 +1357,7 @@
"dependencies": []
},
{
"package": "pkg:pypi/cryptography@45.0.4",
"package": "pkg:pypi/cryptography@45.0.5",
"dependencies": [
"pkg:pypi/cffi@1.17.1"
]
Expand Down
20 changes: 10 additions & 10 deletions tests/data/example-requirements-ignore-errors-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,12 @@
"type": "pypi",
"namespace": null,
"name": "typing-extensions",
"version": "4.14.0",
"version": "4.14.1",
"qualifiers": {},
"subpath": null,
"primary_language": "Python",
"description": "Backported and Experimental Type Hints for Python 3.9+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.",
"release_date": "2025-06-02T14:52:10",
"release_date": "2025-07-04T13:28:32",
"parties": [
{
"type": "person",
Expand Down Expand Up @@ -600,11 +600,11 @@
"Topic :: Software Development"
],
"homepage_url": null,
"download_url": "https://files.pythonhosted.org/packages/69/e0/552843e0d356fbb5256d21449fa957fa4eff3bbc135a74a691ee70c7c5da/typing_extensions-4.14.0-py3-none-any.whl",
"size": 43839,
"download_url": "https://files.pythonhosted.org/packages/b5/00/d631e67a838026495268c2f6884f3711a15a9a2a96cd244fdaea53b823fb/typing_extensions-4.14.1-py3-none-any.whl",
"size": 43906,
"sha1": null,
"md5": "d27a9ceff49d98145c50076842fca792",
"sha256": "a1514509136dd0b477638fc68d6a91497af5076466ad0fa6c338e44e359944af",
"md5": "86905389dfed18c11e510c9e23147fcb",
"sha256": "d1e1e3b58374dc93031d6eda2420a48ea44a36c2b4766a4fdeb3710755731d76",
"sha512": null,
"bug_tracking_url": "https://github.com/python/typing_extensions/issues",
"code_view_url": null,
Expand All @@ -619,16 +619,16 @@
"dependencies": [],
"repository_homepage_url": null,
"repository_download_url": null,
"api_data_url": "https://pypi.org/pypi/typing-extensions/4.14.0/json",
"api_data_url": "https://pypi.org/pypi/typing-extensions/4.14.1/json",
"datasource_id": null,
"purl": "pkg:pypi/typing-extensions@4.14.0"
"purl": "pkg:pypi/typing-extensions@4.14.1"
}
],
"resolved_dependencies_graph": [
{
"package": "pkg:pypi/exceptiongroup@1.3.0",
"dependencies": [
"pkg:pypi/typing-extensions@4.14.0"
"pkg:pypi/typing-extensions@4.14.1"
]
},
{
Expand Down Expand Up @@ -667,7 +667,7 @@
"dependencies": []
},
{
"package": "pkg:pypi/typing-extensions@4.14.0",
"package": "pkg:pypi/typing-extensions@4.14.1",
"dependencies": []
}
]
Expand Down