-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Right now the ALLOWED_PYTHON_PACKAGES.txt
file is explicitly not a requirements.txt
-formatted file. It does not accept any version information, but instead relies on pip
to install whatever version is available. This has two major problems: first, it's entirely possible to install an addon that could have been compatible with other installations, but because of the order it got installed in, pip
brought in versions of dependencies that conflict with a later-to-install package. Second, from a security perspective, we allow pip
to just grab the latest version of whatever package is requested, and aren't exercising any control over trusted versions -- this is widely considered a bad practice for dependency management.
An alternative is to treat ALLOWED_PYTHON_PACKAGES.txt
as a fully-requirements.txt
-format file, including version information, and use it as a "constraints" file when using pip
to install Python dependencies. We can programmatically ensure that all FreeCAD addons share the same set of version requirements, and no package ever installs a dependency in conflict with another. We can also use Dependabot to evaluate those versions and notify us of updates as they become available. The Addon Manager can proactively note changes to this file and display update availability to users without having to scan all installed packages for possible updates.