Skip to content

Awkward hang when retriving metadata from legacy Setuptools project #8070

@uranusjr

Description

@uranusjr

Environment

  • pip version: probably all versions
  • Python version: does not matter
  • OS: does not matter

Description
pip appears to be “hanging” if it takes a lot of time to retrieve metadata of a package to discover dependencies. It would be helpful if pip outputs something to indicate something is happening. Output for a PEP 517 project is much better (it has a spinner).

Expected behavior
pip gives some feedback about what it is doing.

How to Reproduce
Given a setup.py like this:

import setuptools
import time

time.sleep(10.0)  # Simulates a long package processing period
setuptools.setup(name='a', version='1', install_requires=['six'])

Output
Installing this with pip (modified to show timestamps for each log message:

2020-04-17T22:10:03,057 Processing a
2020-04-17T22:10:13,622 Collecting six
2020-04-17T22:10:13,638   Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
2020-04-17T22:10:13,649 Could not build wheels for a,since package 'wheel' is not installed.
2020-04-17T22:10:13,649 Installing collected packages: six, a
    Running setup.py install for a ... done
2020-04-17T22:10:24,084 Successfully installed six-1.14.0 a-1.0.0

There is a full 10 second between the first and second message that pip appears to have hung, while it is actually trying to run setup.py egg_info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXUser experience relatedtype: enhancementImprovements to functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions