Skip to content

Show the URL being used to download python interpreters with -vv #3552

@cvgaviao

Description

@cvgaviao

Feature Description

I'm trying to install a new python interpreter, but it is failing. I believe that is due a proxy constrain in my company network.

It would be good to show the URL being used when calling with -vv, so we can handle this case properly with security team.

Also, it would be good to know where the downloaded package will be downloaded and unpackaged from, so maybe we can dowload from other way and just copy to there.

Problem and Solution

$ pdm py install -vv 3.11
STATUS: Downloading cpython@3.11.13
Traceback (most recent call last):
  File "C:\ProgramData\PYT4ALL_Installer\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\ProgramData\PYT4ALL_Installer\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\Scripts\pdm.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\pdm\core.py", line 391, in main
    return core.main(args or sys.argv[1:])
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\pdm\core.py", line 270, in main
    raise cast(Exception, err).with_traceback(traceback) from None
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\pdm\core.py", line 265, in main
    self.handle(project, options)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\pdm\core.py", line 195, in handle
    command.handle(project, options)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\pdm\cli\commands\python.py", line 132, in handle
    self.install_python(project, version)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\pdm\cli\commands\python.py", line 164, in install_python
    original_filename = download(python_file, tf.name, env.session)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\pbs_installer\_install.py", line 112, in download
    with client.stream("GET", url, headers=_get_headers()) as resp:
  File "C:\ProgramData\PYT4ALL_Installer\lib\contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\httpx\_client.py", line 868, in stream
    response = self.send(
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\httpx\_client.py", line 914, in send
    response = self._send_handling_auth(
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\httpx\_client.py", line 942, in _send_handling_auth
    response = self._send_handling_redirects(
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\httpx\_client.py", line 979, in _send_handling_redirects
    response = self._send_single_request(request)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\httpx\_client.py", line 1014, in _send_single_request
    response = transport.handle_request(request)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\hishel\_sync\_transports.py", line 213, in handle_request
    regular_response = self._transport.handle_request(request)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\httpx\_transports\default.py", line 250, in handle_request
    resp = self._pool.handle_request(req)
  File "C:\ProgramData\PYT4ALL_Installer\lib\contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "C:\Users\BDM34YR\AppData\Roaming\Python\Python39\site-packages\httpx\_transports\default.py", line 118, in map_httpcore_exceptions     
    raise mapped_exc(message) from exc
httpx.ConnectError: [Errno 11001] getaddrinfo failed

Additional Context

No response

Are you willing to contribute to the development of this feature?

  • Yes, I am willing to contribute to the development of this feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions