You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker and believe that this is not a duplicate.
Make sure you run commands with -v flag before pasting the output.
PDM, version 2.13.3
Python 3.11.5
Steps to reproduce
Update PDM to version 2.13.3
Set up a proxy environment using environment variables http_proxy, https_proxy, HTTP_PROXY, or HTTPS_PROXY
Run pdm self update or pdm add package
Actual behavior
I got the following Error (Network isunreachable)
Traceback (most recent call last):
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/bin/pdm", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/pdm/core.py", line 341, in main
return core.main(args or sys.argv[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/pdm/core.py", line 259, in main
raise cast(Exception, err).with_traceback(traceback) from None
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/pdm/core.py", line 254, in main
self.handle(project, options)
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/pdm/core.py", line 209, in handle
command.handle(project, options)
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/pdm/cli/commands/self_cmd.py", line 232, in handle
version = get_latest_pdm_version_from_pypi(project, options.pre)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/pdm/cli/actions.py", line 318, in get_latest_pdm_version_from_pypi
candidate = finder.find_best_match("pdm", allow_prereleases=prereleases).best
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/unearth/finder.py", line 391, in find_best_match
best_match = next(iter(applicable_candidates), None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/unearth/finder.py", line 324, in _find_packages_from_requirement
yield from self._find_packages(requirement.name, allow_yanked)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/unearth/finder.py", line 290, in _find_packages
return sorted(all_packages, key=self._sort_key, reverse=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/unearth/collector.py", line 178, in collect_links_from_location
yield from _collect_links_from_index(session, location)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/unearth/collector.py", line 198, in _collect_links_from_index
page = fetch_page(session, location)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/unearth/collector.py", line 185, in fetch_page
resp = _get_html_response(session, location)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/unearth/collector.py", line 220, in _get_html_response
resp = session.get(
^^^^^^^^^^^^
File "/data/private/Ttayu/sample_project/__pypackages__/3.11/lib/httpx/_client.py", line 1054, in get
return self.request(
^^^^^^^^^^^^^
File "/data/private/Ttayu/sample_project/__pypackages__/3.11/lib/httpx/_client.py", line 827, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/private/Ttayu/sample_project/__pypackages__/3.11/lib/httpx/_client.py", line 914, in send
response = self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/private/Ttayu/sample_project/__pypackages__/3.11/lib/httpx/_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/private/Ttayu/sample_project/__pypackages__/3.11/lib/httpx/_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/private/Ttayu/sample_project/__pypackages__/3.11/lib/httpx/_client.py", line 1015, in _send_single_request
response = transport.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/Ttayu/.asdf/installs/pdm/2.10.3/venv/lib/python3.11/site-packages/hishel/_sync/_transports.py", line 215, in handle_request
response = self._transport.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/private/Ttayu/sample_project/__pypackages__/3.11/lib/httpx/_transports/default.py", line 232, in handle_request
with map_httpcore_exceptions():
File "/home/Ttayu/.asdf/installs/python/3.11.5/lib/python3.11/contextlib.py", line 155, in __exit__
self.gen.throw(typ, value, traceback)
File "/data/private/Ttayu/sample_project/__pypackages__/3.11/lib/httpx/_transports/default.py", line 86, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: [Errno 101] Network is unreachable
Expected behavior
When a proxy is set up using environment variables, PDM should be able to recognize and use the proxy settings to execute the pdm self update and pdm add package commands successfully. The commands should work as intended, allowing users to update PDM itself or add new packages to their projects.
httpx.Client in src/pdm/models/session.py on line 148
- httpx.Client.__init__(self, mounts=mounts, follow_redirects=True, transport=transport, **kwargs)+ proxies = ... # get proxy from environment variable or pdm.toml?+ httpx.Client.__init__(self, mounts=mounts, follow_redirects=True, transport=transport, proxies=proxies, **kwargs)
Make sure you run commands with
-v
flag before pasting the output.PDM, version 2.13.3
Python 3.11.5
Steps to reproduce
package
Actual behavior
I got the following Error (Network isunreachable)
Expected behavior
When a proxy is set up using environment variables, PDM should be able to recognize and use the proxy settings to execute the pdm self update and pdm add package commands successfully. The commands should work as intended, allowing users to update PDM itself or add new packages to their projects.
httpx.Client in src/pdm/models/session.py on line 148
Additional Notes
The text was updated successfully, but these errors were encountered: