[PR #2192] [draft] pip package policy management system #2341

Open
opened 2026-10-28 21:09:03 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/2192
Author: @ltdrdata
Created: 10/3/2025
Status: 🔄 Open

Base: manager-v4 ← Head: feat/manager-v4-general-pip-policy


📝 Commits (1)

  • 2866193 ● feat: Draft pip package policy management system (not yet integrated)

📊 Changes

29 files changed (+10024 additions, -1 deletions)

View changed files

📝 MANIFEST.in (+2 -1)
➕ comfyui_manager/common/pip_util.design.en.md (+713 -0)
➕ comfyui_manager/common/pip_util.implementation-plan.en.md (+614 -0)
➕ comfyui_manager/common/pip_util.py (+629 -0)
➕ comfyui_manager/common/pip_util.test-design.md (+2916 -0)
➕ tests/.gitignore (+34 -0)
➕ tests/README.md (+181 -0)
➕ tests/common/pip_util/CONTEXT_FILES_GUIDE.md (+423 -0)
➕ tests/common/pip_util/DEPENDENCY_ANALYSIS.md (+261 -0)
➕ tests/common/pip_util/DEPENDENCY_TREE_CONTEXT.md (+413 -0)
➕ tests/common/pip_util/README.md (+305 -0)
➕ tests/common/pip_util/TEST_IMPROVEMENTS.md (+433 -0)
➕ tests/common/pip_util/TEST_SCENARIOS.md (+573 -0)
➕ tests/common/pip_util/analyze_dependencies.py (+261 -0)
➕ tests/common/pip_util/conftest.py (+387 -0)
➕ tests/common/pip_util/pytest.ini (+52 -0)
➕ tests/common/pip_util/requirements-test-base.txt (+20 -0)
➕ tests/common/pip_util/setup_test_env.sh (+47 -0)
➕ tests/common/pip_util/test_dependency_protection.py (+271 -0)
➕ tests/common/pip_util/test_edge_cases.py (+279 -0)

...and 9 more files

📄 Description

Add comprehensive pip dependency conflict resolution framework as draft implementation. This is self-contained and does not affect existing ComfyUI Manager functionality.

Key components:

  • pip_util.py with PipBatch class for policy-driven package management
  • Lazy-loaded policy system supporting base + user overrides
  • Multi-stage policy execution (uninstall → apply_first_match → apply_all_matches → restore)
  • Conditional policies based on platform, installed packages, and ComfyUI version
  • Comprehensive test suite covering edge cases, workflows, and platform scenarios
  • Design and implementation documentation

Policy capabilities (draft):

  • Package replacement (e.g., PIL → Pillow, opencv-python → opencv-contrib-python)
  • Version pinning to prevent dependency conflicts
  • Dependency protection during installations
  • Platform-specific handling (Linux/Windows, GPU detection)
  • Pre-removal and post-restoration workflows

Testing infrastructure:

  • Pytest-based test suite with isolated environments
  • Dependency analysis tools for conflict detection
  • Coverage for policy priority, edge cases, and environment recovery

Status: Draft implementation complete, integration with manager workflows pending.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Manager/pull/2192 **Author:** [@ltdrdata](https://github.com/ltdrdata) **Created:** 10/3/2025 **Status:** 🔄 Open **Base:** `manager-v4` ← **Head:** `feat/manager-v4-general-pip-policy` --- ### 📝 Commits (1) - [`2866193`](https://github.com/Comfy-Org/ComfyUI-Manager/commit/2866193baf116476a78a26a1def71a525f866acb) ● feat: Draft pip package policy management system (not yet integrated) ### 📊 Changes **29 files changed** (+10024 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `MANIFEST.in` (+2 -1) ➕ `comfyui_manager/common/pip_util.design.en.md` (+713 -0) ➕ `comfyui_manager/common/pip_util.implementation-plan.en.md` (+614 -0) ➕ `comfyui_manager/common/pip_util.py` (+629 -0) ➕ `comfyui_manager/common/pip_util.test-design.md` (+2916 -0) ➕ `tests/.gitignore` (+34 -0) ➕ `tests/README.md` (+181 -0) ➕ `tests/common/pip_util/CONTEXT_FILES_GUIDE.md` (+423 -0) ➕ `tests/common/pip_util/DEPENDENCY_ANALYSIS.md` (+261 -0) ➕ `tests/common/pip_util/DEPENDENCY_TREE_CONTEXT.md` (+413 -0) ➕ `tests/common/pip_util/README.md` (+305 -0) ➕ `tests/common/pip_util/TEST_IMPROVEMENTS.md` (+433 -0) ➕ `tests/common/pip_util/TEST_SCENARIOS.md` (+573 -0) ➕ `tests/common/pip_util/analyze_dependencies.py` (+261 -0) ➕ `tests/common/pip_util/conftest.py` (+387 -0) ➕ `tests/common/pip_util/pytest.ini` (+52 -0) ➕ `tests/common/pip_util/requirements-test-base.txt` (+20 -0) ➕ `tests/common/pip_util/setup_test_env.sh` (+47 -0) ➕ `tests/common/pip_util/test_dependency_protection.py` (+271 -0) ➕ `tests/common/pip_util/test_edge_cases.py` (+279 -0) _...and 9 more files_ </details> ### 📄 Description Add comprehensive pip dependency conflict resolution framework as draft implementation. This is self-contained and does not affect existing ComfyUI Manager functionality. Key components: - pip_util.py with PipBatch class for policy-driven package management - Lazy-loaded policy system supporting base + user overrides - Multi-stage policy execution (uninstall → apply_first_match → apply_all_matches → restore) - Conditional policies based on platform, installed packages, and ComfyUI version - Comprehensive test suite covering edge cases, workflows, and platform scenarios - Design and implementation documentation Policy capabilities (draft): - Package replacement (e.g., PIL → Pillow, opencv-python → opencv-contrib-python) - Version pinning to prevent dependency conflicts - Dependency protection during installations - Platform-specific handling (Linux/Windows, GPU detection) - Pre-removal and post-restoration workflows Testing infrastructure: - Pytest-based test suite with isolated environments - Dependency analysis tools for conflict detection - Coverage for policy priority, edge cases, and environment recovery Status: Draft implementation complete, integration with manager workflows pending. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#2341
No description provided.