Skip to content

How to treat non-stdlib packages that are available by default in [all] venvs ? #80

@Nour-Mws

Description

@Nour-Mws

This is actually 2 issues for the price of one :D

In one conversation in PR #70, it turned out that some packages are available in virtual environments / part of the Python distribution, while not belonging to stdlib.

We'd like to know:

  1. What are these packages (besides pkg_resources)?
  2. Do we need to treat those the same as stdlib (i.e. filter them out of parsed imports). FD's current behavior is to report them as imports (and subsequently to report them as missing if undeclared).

Original conversation
@mknorps:

pkg_resources is not considered STDLIB:

  • pkg_resources in locations:
    /home/maria/Tweag/FawltyDeps/fawltydeps/extract_dependencies.py:9

@jherland:

Searching for pkg_resources in the stdlib yields really only this page: https://docs.python.org/3/library/importlib.resources.html?highlight=pkg_resources which links to https://setuptools.pypa.io/en/latest/pkg_resources.html, showing that pkg_resources is part of setuptools, and that setuptool is not a part of the stdlib. Thus we should almost certainly add setuptools to our list of main dependencies. The reason it's gone under our radar is that setuptools (along with pip) is automatically installed into every(?) virtualenv...

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