Skip to content

Vendored rich kind of depends on attrs #12612

Open
@thatch

Description

@thatch

Description

Observed while poetry appears to be running pip commands in parallel:

pip install attrs
pip uninstall importlib-metadata # I don't think the package here matters

Only ImportError is caught here in vendored rich which means that if attrs exists in some sort of half-importable form, it might generate other exceptions like AttributeError.

This particular case was solved by retrying the build, but appears to have:

good:
attr/__init__.py
attr/converters.py
attr/_make.py

bad (empty?)
attr/setters.py

I'm mainly documenting that this exists, more than asking for it to be fixed (which I think would require making edits to the vendored code). I'm a little interested in whether pip is expected to be safe run concurrently on projects that it doesn't claim are deps.

Expected behavior

No response

pip version

24.0

Python version

3.9

OS

linux

How to Reproduce

  1. pip install attrs
  2. truncate -s 0 $(python -c 'import attrs.setters; print(attrs.setters.__file__))
  3. pip install foo

Output

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions