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

prevent duplicate plugin discovery on misconfigured pythons #1631

Merged
merged 1 commit into from Jul 31, 2022

Commits on Jul 31, 2022

  1. prevent duplicate plugin discovery on misconfigured pythons

    for example, `venv`-virtualenvs on fedora have both `lib` and `lib64` on
    `sys.path` despite them being the same.  this causes
    `importlib.metadata.distributions` to double-discover.
    
    ```console
    $ docker run --rm -t fedora:latest bash -c 'dnf install -qq -y python3 >& /dev/null && python3 -m venv venv && venv/bin/pip -qq install cfgv && venv/bin/python - <<< "from importlib.metadata import distributions; print(len([d for d in distributions() if d.name == '"'"'cfgv'"'"']))"'
    2
    ```
    asottile committed Jul 31, 2022
    Copy the full SHA
    fce93b9 View commit details
    Browse the repository at this point in the history