Skip to content
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

pip list --outdated fails on platforms without sem_open #8161

Closed
landfillbaby opened this issue Apr 28, 2020 · 5 comments · Fixed by #8167
Closed

pip list --outdated fails on platforms without sem_open #8161

landfillbaby opened this issue Apr 28, 2020 · 5 comments · Fixed by #8167
Labels
kind: crash For situations where pip crashes type: bug A confirmed bug or unintended behavior

Comments

@landfillbaby
Copy link

Environment

  • pip version: 20.1
  • Python version: 3.8.2
  • OS: Android Termux

Description
running pip list -o leads to an ImportError in multiprocessing.dummy:
"ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.”

not bothering with traceback, since it's easily traced to the use of multiprocessing.dummy.Pool in commands/list.py line 216.

@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Apr 28, 2020
@deveshks
Copy link
Contributor

The issue in the above log is https://bugs.python.org/issue3770

@uranusjr
Copy link
Member

This import was introduced as a part of #7964. We probably should disable parallellisation when this happens. cc @CrafterKolyan

@uranusjr uranusjr added the kind: crash For situations where pip crashes label Apr 28, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Apr 28, 2020
@uranusjr uranusjr added the type: bug A confirmed bug or unintended behavior label Apr 28, 2020
@deveshks
Copy link
Contributor

@pfmoore
Copy link
Member

pfmoore commented Apr 28, 2020

See the last comment on that bug report, it's been closed for over 10 years. If this is a Python issue, it would need to be raised as a new bug.

Following the Python docs, multiprocessing.dummy is a wrapper around threading which is always available in Python 3.7+ So it looks like the OP's version of Python is incomplete?

However, this does bring up the point that in Python older than 3.7, threading is an optional module, so pip should probably fall back to the old code when threading isn't available. In which case, we don't care about why multiprocessing.dummy doesn't work, and the OP's issue gets solved as well.

Can we try and fix it the way Cpython detects it ?

I'd just say that if the multiprocessing.dummy import fails, we should fall back to the single-threaded code.

@pradyunsg
Copy link
Member

TBH, at this point, I feel like we should revert the original PR until we figure out the finer details of what we want parallelized code in pip to look like, what strategy we use to support platforms that don't have threading etc.

Originally posted by @pradyunsg in #8162 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind: crash For situations where pip crashes type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants