py-env-studio 2.1.4__tar.gz → 2.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {py_env_studio-2.1.4/py_env_studio.egg-info → py_env_studio-2.1.6}/PKG-INFO +4 -2
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/PYPI_README.md +3 -1
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/README.md +18 -2
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/config.ini +1 -1
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/database.py +19 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/vulnerability.sql +11 -2
- py_env_studio-2.1.6/py_env_studio/core/schema/vulnerability_intelligence.sql +188 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/main_window.py +92 -37
- py_env_studio-2.1.6/py_env_studio/utils/handlers.py +379 -0
- py_env_studio-2.1.6/py_env_studio/utils/vulnerability_intelligence.py +282 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/utils/vulneribility_insights.py +121 -1
- py_env_studio-2.1.6/py_env_studio/utils/vulneribility_scanner.py +272 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6/py_env_studio.egg-info}/PKG-INFO +4 -2
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio.egg-info/SOURCES.txt +5 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/pyproject.toml +1 -1
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_schema_templates.py +72 -1
- py_env_studio-2.1.6/tests/test_ui_state_consistency.py +179 -0
- py_env_studio-2.1.6/tests/test_vulnerability_history.py +261 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_vulnerability_insights_charts.py +30 -0
- py_env_studio-2.1.6/tests/test_vulnerability_intelligence_profile.py +83 -0
- py_env_studio-2.1.4/py_env_studio/utils/handlers.py +0 -126
- py_env_studio-2.1.4/py_env_studio/utils/vulneribility_scanner.py +0 -244
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/LICENSE +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/__main__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/commands.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/app_updates.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/auto_resolve.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/bootstrap.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/configuration.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/dependency_preview.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/env_manager.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/environment_lock.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/integration.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/config.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/context.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/errors.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/schemas/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/schemas/responses.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/server.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/tools/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/tools/analysis.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/tools/environments.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/tools/packages.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/tools/project.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/mcp/tools/security.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/package_manager.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/package_update_monitor.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/pip_tools.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/plugins/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/plugins/base.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/plugins/exceptions.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/plugins/manager.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/project_contract/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/project_contract/models.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/project_contract/repository.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/project_contract/service.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/project_intelligence/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/project_intelligence/models.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/project_intelligence/service.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/project_launcher.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/py_tonic.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/runtime.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/runtime_cache.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/runtime_mismatch.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/runtime_providers.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/runtime_toggle.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/environment_locks.sql +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/environments.sql +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/migration.sql +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/package_updates.sql +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/project_contract.sql +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/runtime_cache.sql +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/schema_core.sql +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/schema/schema_runtime_cache.sql +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/setup_state.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/strategies.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/builtin_templates.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/community.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/content_filters.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/engine.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/github_import.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/models.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/registry.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/user_template_store.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/validator.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/templates/workflow.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/tool_probe.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/tools.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/uv_tools.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/core/windows_apps.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/main.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/about.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/activate-env.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/available-env.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/create-env.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/delete-env.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/export.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/install.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/list-env.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/logo.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/packages.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/pes-default-transparrent.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/pes-icon-default.ico +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/pes-icon-default.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/pes-transparrent-icon-default.ico +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/requirements.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/selected-env.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/uninstall.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/static/icons/update.png +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/status_bar.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/ui/ui_tasks.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/utils/__init__.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/utils/app_icon.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/utils/app_logging.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/utils/db_status.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/utils/progress.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio/utils/version_utils.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio.egg-info/dependency_links.txt +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio.egg-info/entry_points.txt +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio.egg-info/requires.txt +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/py_env_studio.egg-info/top_level.txt +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/setup.cfg +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_all_features.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_app_logging.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_app_updates.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_cli_commands.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_cli_progress.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_community_templates.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_configuration_service.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_dependency_preview.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_environment_lock.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_github_template_import.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_mcp_consistency.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_mcp_server.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_package_update_monitor.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_plugin_events.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_plugin_import.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_plugin_load.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_plugin_manager.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_project_contract.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_project_intelligence.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_project_openers.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_project_runtime.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_runtime_cache.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_runtime_mismatch.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_runtime_providers.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_status_progress.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_template_engine.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_template_registry.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_template_workflow.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_ui_backend.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_user_template_store.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_uv_packages.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_vulnerability_insights_update.py +0 -0
- {py_env_studio-2.1.4 → py_env_studio-2.1.6}/tests/test_window_icon.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: py-env-studio
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.6
|
|
4
4
|
Summary: A comprehensive cross-platform GUI and CLI tool for managing Python virtual environments and packages with advanced features including environment lifecycle management, package operations, vulnerability scanning, security insights, project templates, Py-Tonic interactive learning mode, an extensible plugin system for custom functionality, and a local read-only MCP control plane (beta) for AI coding agents.
|
|
5
5
|
Author-email: Py Env Studio Team <contact.shaikh.wasim@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -107,6 +107,8 @@ Perfect for:
|
|
|
107
107
|
- 🐍 Official **Python Install Manager** integration to detect, list, install,
|
|
108
108
|
and select official runtimes
|
|
109
109
|
- 🔌 Extensible **plugin system** with 18 lifecycle hooks
|
|
110
|
+
- Environment selection and package views stay synchronized; stale
|
|
111
|
+
package results are discarded when selection changes
|
|
110
112
|
- 📟 Full CLI with progress gauge and `-v` / `-q` / `--no-progress` controls
|
|
111
113
|
- 🧪 **Beta:** local, read-only **MCP control plane** for AI coding agents
|
|
112
114
|
(stdio transport, 8 `pes_*` tools, opt-out via `enabled = false`)
|
|
@@ -161,7 +163,7 @@ Setup steps for VS Code and other clients:
|
|
|
161
163
|
|
|
162
164
|
- Documentation home: [https://py-env-studio.readthedocs.io/](https://py-env-studio.readthedocs.io/)
|
|
163
165
|
- Usage manual: [https://py-env-studio.readthedocs.io/en/latest/getting-started/usage.html](https://py-env-studio.readthedocs.io/en/latest/getting-started/usage.html)
|
|
164
|
-
- Release notes: [https://py-env-studio.readthedocs.io/en/latest/releases/v2.1.
|
|
166
|
+
- Release notes: [https://py-env-studio.readthedocs.io/en/latest/releases/v2.1.5.html](https://py-env-studio.readthedocs.io/en/latest/releases/v2.1.5.html)
|
|
165
167
|
- Source code: [https://github.com/pyenvstudio/py-env-studio](https://github.com/pyenvstudio/py-env-studio)
|
|
166
168
|
- Issue tracker: [https://github.com/pyenvstudio/py-env-studio/issues](https://github.com/pyenvstudio/py-env-studio/issues)
|
|
167
169
|
|
|
@@ -42,6 +42,8 @@ Perfect for:
|
|
|
42
42
|
- 🐍 Official **Python Install Manager** integration to detect, list, install,
|
|
43
43
|
and select official runtimes
|
|
44
44
|
- 🔌 Extensible **plugin system** with 18 lifecycle hooks
|
|
45
|
+
- Environment selection and package views stay synchronized; stale
|
|
46
|
+
package results are discarded when selection changes
|
|
45
47
|
- 📟 Full CLI with progress gauge and `-v` / `-q` / `--no-progress` controls
|
|
46
48
|
- 🧪 **Beta:** local, read-only **MCP control plane** for AI coding agents
|
|
47
49
|
(stdio transport, 8 `pes_*` tools, opt-out via `enabled = false`)
|
|
@@ -96,7 +98,7 @@ Setup steps for VS Code and other clients:
|
|
|
96
98
|
|
|
97
99
|
- Documentation home: [https://py-env-studio.readthedocs.io/](https://py-env-studio.readthedocs.io/)
|
|
98
100
|
- Usage manual: [https://py-env-studio.readthedocs.io/en/latest/getting-started/usage.html](https://py-env-studio.readthedocs.io/en/latest/getting-started/usage.html)
|
|
99
|
-
- Release notes: [https://py-env-studio.readthedocs.io/en/latest/releases/v2.1.
|
|
101
|
+
- Release notes: [https://py-env-studio.readthedocs.io/en/latest/releases/v2.1.5.html](https://py-env-studio.readthedocs.io/en/latest/releases/v2.1.5.html)
|
|
100
102
|
- Source code: [https://github.com/pyenvstudio/py-env-studio](https://github.com/pyenvstudio/py-env-studio)
|
|
101
103
|
- Issue tracker: [https://github.com/pyenvstudio/py-env-studio/issues](https://github.com/pyenvstudio/py-env-studio/issues)
|
|
102
104
|
|
|
@@ -29,7 +29,23 @@ Perfect for:
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## 🆕 What's new in v2.1.
|
|
32
|
+
## 🆕 What's new in v2.1.6
|
|
33
|
+
|
|
34
|
+
- **Environment selection stays synchronized** — mouse and keyboard selection,
|
|
35
|
+
refresh restoration, recent locations, activation controls, and package
|
|
36
|
+
context now follow the same selected environment.
|
|
37
|
+
- **Package lists reject stale results** — a load for a previously selected
|
|
38
|
+
environment cannot replace the current view, and an open package pane
|
|
39
|
+
refreshes when selection changes.
|
|
40
|
+
- **Vulnerability Intelligence History** — explicit scans retain source-linked
|
|
41
|
+
OSV advisory history with disclosure dates, aliases, CVSS/CWE data, and
|
|
42
|
+
direct/transitive dependency paths where supplied by deps.dev.
|
|
43
|
+
|
|
44
|
+
→ [Full v2.1.6 release notes](docs/releases/v2.1.6.md)
|
|
45
|
+
|
|
46
|
+
The PyPI 2.1.5 distribution was published by automation, but its GitHub release and tag were withdrawn while the expanded vulnerability history feature was completed for v2.1.6. PyPI does not allow replacing an already-published version.
|
|
47
|
+
|
|
48
|
+
## Previous release: v2.1.4
|
|
33
49
|
|
|
34
50
|
- 🔗 **Project ↔ Environment association** — creating an environment from a
|
|
35
51
|
project template now registers it with the project by default, with an
|
|
@@ -102,7 +118,7 @@ PyEnvStudio now features a powerful plugin system that allows developers to exte
|
|
|
102
118
|
- **Easy Development** - Simple plugin API with lifecycle management
|
|
103
119
|
- **Examples Included** - Full working sample plugin with documentation
|
|
104
120
|
|
|
105
|
-
See the [v2.1.
|
|
121
|
+
See the [v2.1.6 release notes](docs/releases/v2.1.6.md) and the [plugin development guide](docs/plugins/development.md).
|
|
106
122
|
|
|
107
123
|
### Additional implemented capabilities
|
|
108
124
|
|
|
@@ -48,6 +48,25 @@ class DatabaseManager:
|
|
|
48
48
|
for name in sql.available("environment_locks"):
|
|
49
49
|
if name.startswith("create_"):
|
|
50
50
|
cur.execute(sql.get("environment_locks", name))
|
|
51
|
+
for name in sql.available("vulnerability_intelligence"):
|
|
52
|
+
if name.startswith("create_"):
|
|
53
|
+
cur.execute(sql.get("vulnerability_intelligence", name))
|
|
54
|
+
observation_columns = {
|
|
55
|
+
row[1]
|
|
56
|
+
for row in cur.execute(
|
|
57
|
+
"PRAGMA table_info(vulnerability_intelligence_observations)"
|
|
58
|
+
).fetchall()
|
|
59
|
+
}
|
|
60
|
+
for column in (
|
|
61
|
+
"aliases_json", "published_at", "modified_at", "withdrawn_at",
|
|
62
|
+
"cvss_json", "cwe_ids_json", "advisory_status",
|
|
63
|
+
"affected_release_count",
|
|
64
|
+
):
|
|
65
|
+
if column not in observation_columns:
|
|
66
|
+
cur.execute(sql.get(
|
|
67
|
+
"vulnerability_intelligence",
|
|
68
|
+
f"migrate_vulnerability_intelligence_add_{column}",
|
|
69
|
+
))
|
|
51
70
|
package_update_columns = {
|
|
52
71
|
row[1]
|
|
53
72
|
for row in cur.execute("PRAGMA table_info(package_update_cache)").fetchall()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
-- SQL templates: vulnerability scan persistence.
|
|
2
|
-
-- latest_scan_rows
|
|
3
|
-
--
|
|
2
|
+
-- latest_scan_rows supplies the current-day view to utils.db_status.
|
|
3
|
+
-- Local scan rows remain separate from external intelligence snapshots.
|
|
4
4
|
|
|
5
5
|
-- name: insert_scan
|
|
6
6
|
INSERT INTO env_vulnerability_info (env_id, vulnerabilities, created_at) VALUES (?, ?, ?)
|
|
@@ -17,5 +17,14 @@ AND DATE(evi.created_at) = (
|
|
|
17
17
|
)
|
|
18
18
|
ORDER BY evi.vid ASC
|
|
19
19
|
|
|
20
|
+
-- Local historical scans are retained for legacy/local scan history only.
|
|
21
|
+
-- The dashboard trend is populated from vulnerability_intelligence_queries.
|
|
22
|
+
-- name: scan_history_rows
|
|
23
|
+
SELECT evi.vid, evi.vulnerabilities, evi.created_at, DATE(evi.created_at) AS scan_date
|
|
24
|
+
FROM env_vulnerability_info evi
|
|
25
|
+
JOIN environments e ON evi.env_id = e.env_id
|
|
26
|
+
WHERE e.env_name=?
|
|
27
|
+
ORDER BY evi.vid ASC
|
|
28
|
+
|
|
20
29
|
-- name: update_payload_by_vid
|
|
21
30
|
UPDATE env_vulnerability_info SET vulnerabilities=? WHERE vid=?
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
-- SQL templates for scan-triggered external vulnerability intelligence.
|
|
2
|
+
|
|
3
|
+
-- name: create_vulnerability_intelligence_scans
|
|
4
|
+
CREATE TABLE IF NOT EXISTS vulnerability_intelligence_scans (
|
|
5
|
+
scan_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
6
|
+
trigger_env_name TEXT NOT NULL,
|
|
7
|
+
started_at TEXT NOT NULL,
|
|
8
|
+
completed_at TEXT,
|
|
9
|
+
status TEXT NOT NULL CHECK (status IN ('running', 'success', 'partial', 'failed')),
|
|
10
|
+
package_count INTEGER NOT NULL DEFAULT 0,
|
|
11
|
+
completed_packages INTEGER NOT NULL DEFAULT 0,
|
|
12
|
+
failed_packages INTEGER NOT NULL DEFAULT 0
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
-- name: create_vulnerability_intelligence_queries
|
|
16
|
+
CREATE TABLE IF NOT EXISTS vulnerability_intelligence_queries (
|
|
17
|
+
query_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
18
|
+
scan_id INTEGER NOT NULL,
|
|
19
|
+
package_name TEXT NOT NULL,
|
|
20
|
+
normalized_package TEXT NOT NULL,
|
|
21
|
+
package_version TEXT NOT NULL,
|
|
22
|
+
source TEXT NOT NULL,
|
|
23
|
+
query_status TEXT NOT NULL CHECK (query_status IN ('success', 'failed')),
|
|
24
|
+
result_count INTEGER,
|
|
25
|
+
error TEXT,
|
|
26
|
+
observed_at TEXT NOT NULL,
|
|
27
|
+
UNIQUE (scan_id, normalized_package, package_version, source),
|
|
28
|
+
FOREIGN KEY (scan_id) REFERENCES vulnerability_intelligence_scans(scan_id)
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
-- name: create_vulnerability_intelligence_observations
|
|
32
|
+
CREATE TABLE IF NOT EXISTS vulnerability_intelligence_observations (
|
|
33
|
+
observation_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
34
|
+
query_id INTEGER NOT NULL,
|
|
35
|
+
scan_id INTEGER NOT NULL,
|
|
36
|
+
package_name TEXT NOT NULL,
|
|
37
|
+
normalized_package TEXT NOT NULL,
|
|
38
|
+
package_version TEXT NOT NULL,
|
|
39
|
+
vulnerability_id TEXT NOT NULL,
|
|
40
|
+
source TEXT NOT NULL,
|
|
41
|
+
affected_versions TEXT NOT NULL DEFAULT '[]',
|
|
42
|
+
affected_ranges TEXT NOT NULL DEFAULT '[]',
|
|
43
|
+
fixed_versions TEXT NOT NULL DEFAULT '[]',
|
|
44
|
+
severity TEXT NOT NULL DEFAULT 'Unknown',
|
|
45
|
+
vulnerability_status TEXT NOT NULL DEFAULT 'not fixed',
|
|
46
|
+
aliases_json TEXT NOT NULL DEFAULT '[]',
|
|
47
|
+
published_at TEXT,
|
|
48
|
+
modified_at TEXT,
|
|
49
|
+
withdrawn_at TEXT,
|
|
50
|
+
cvss_json TEXT NOT NULL DEFAULT '[]',
|
|
51
|
+
cwe_ids_json TEXT NOT NULL DEFAULT '[]',
|
|
52
|
+
advisory_status TEXT NOT NULL DEFAULT 'active',
|
|
53
|
+
affected_release_count INTEGER,
|
|
54
|
+
observed_at TEXT NOT NULL,
|
|
55
|
+
details_json TEXT NOT NULL,
|
|
56
|
+
UNIQUE (query_id, vulnerability_id, source),
|
|
57
|
+
FOREIGN KEY (query_id) REFERENCES vulnerability_intelligence_queries(query_id),
|
|
58
|
+
FOREIGN KEY (scan_id) REFERENCES vulnerability_intelligence_scans(scan_id)
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
-- name: create_vulnerability_intelligence_scan_env_index
|
|
62
|
+
CREATE INDEX IF NOT EXISTS idx_vulnerability_intelligence_scan_env
|
|
63
|
+
ON vulnerability_intelligence_scans (trigger_env_name, started_at)
|
|
64
|
+
|
|
65
|
+
-- name: create_vulnerability_intelligence_package_index
|
|
66
|
+
CREATE INDEX IF NOT EXISTS idx_vulnerability_intelligence_package
|
|
67
|
+
ON vulnerability_intelligence_queries (normalized_package, package_version, source, observed_at)
|
|
68
|
+
|
|
69
|
+
-- name: create_vulnerability_intelligence_dependency_links
|
|
70
|
+
CREATE TABLE IF NOT EXISTS vulnerability_intelligence_dependency_links (
|
|
71
|
+
link_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
72
|
+
scan_id INTEGER NOT NULL,
|
|
73
|
+
root_package TEXT NOT NULL,
|
|
74
|
+
root_normalized_package TEXT NOT NULL,
|
|
75
|
+
root_version TEXT NOT NULL,
|
|
76
|
+
package_name TEXT NOT NULL,
|
|
77
|
+
normalized_package TEXT NOT NULL,
|
|
78
|
+
package_version TEXT NOT NULL,
|
|
79
|
+
relation TEXT NOT NULL CHECK (relation IN ('direct', 'transitive', 'unknown')),
|
|
80
|
+
parent_package TEXT,
|
|
81
|
+
dependency_path TEXT NOT NULL DEFAULT '[]',
|
|
82
|
+
observed_at TEXT NOT NULL,
|
|
83
|
+
UNIQUE (scan_id, root_normalized_package, root_version, normalized_package, package_version, relation),
|
|
84
|
+
FOREIGN KEY (scan_id) REFERENCES vulnerability_intelligence_scans(scan_id)
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
-- name: create_vulnerability_intelligence_dependency_index
|
|
88
|
+
CREATE INDEX IF NOT EXISTS idx_vulnerability_intelligence_dependency_root
|
|
89
|
+
ON vulnerability_intelligence_dependency_links (root_normalized_package, root_version, observed_at)
|
|
90
|
+
|
|
91
|
+
-- Additive migrations for databases created by earlier 2.1.5 builds.
|
|
92
|
+
-- name: migrate_vulnerability_intelligence_add_aliases_json
|
|
93
|
+
ALTER TABLE vulnerability_intelligence_observations ADD COLUMN aliases_json TEXT NOT NULL DEFAULT '[]'
|
|
94
|
+
|
|
95
|
+
-- name: migrate_vulnerability_intelligence_add_published_at
|
|
96
|
+
ALTER TABLE vulnerability_intelligence_observations ADD COLUMN published_at TEXT
|
|
97
|
+
|
|
98
|
+
-- name: migrate_vulnerability_intelligence_add_modified_at
|
|
99
|
+
ALTER TABLE vulnerability_intelligence_observations ADD COLUMN modified_at TEXT
|
|
100
|
+
|
|
101
|
+
-- name: migrate_vulnerability_intelligence_add_withdrawn_at
|
|
102
|
+
ALTER TABLE vulnerability_intelligence_observations ADD COLUMN withdrawn_at TEXT
|
|
103
|
+
|
|
104
|
+
-- name: migrate_vulnerability_intelligence_add_cvss_json
|
|
105
|
+
ALTER TABLE vulnerability_intelligence_observations ADD COLUMN cvss_json TEXT NOT NULL DEFAULT '[]'
|
|
106
|
+
|
|
107
|
+
-- name: migrate_vulnerability_intelligence_add_cwe_ids_json
|
|
108
|
+
ALTER TABLE vulnerability_intelligence_observations ADD COLUMN cwe_ids_json TEXT NOT NULL DEFAULT '[]'
|
|
109
|
+
|
|
110
|
+
-- name: migrate_vulnerability_intelligence_add_advisory_status
|
|
111
|
+
ALTER TABLE vulnerability_intelligence_observations ADD COLUMN advisory_status TEXT NOT NULL DEFAULT 'active'
|
|
112
|
+
|
|
113
|
+
-- name: migrate_vulnerability_intelligence_add_affected_release_count
|
|
114
|
+
ALTER TABLE vulnerability_intelligence_observations ADD COLUMN affected_release_count INTEGER
|
|
115
|
+
|
|
116
|
+
-- name: begin_vulnerability_intelligence_scan
|
|
117
|
+
INSERT INTO vulnerability_intelligence_scans (trigger_env_name, started_at, status)
|
|
118
|
+
VALUES (?, ?, 'running')
|
|
119
|
+
|
|
120
|
+
-- name: set_vulnerability_intelligence_scan_counts
|
|
121
|
+
UPDATE vulnerability_intelligence_scans
|
|
122
|
+
SET package_count=?, completed_packages=?, failed_packages=?
|
|
123
|
+
WHERE scan_id=?
|
|
124
|
+
|
|
125
|
+
-- name: finish_vulnerability_intelligence_scan
|
|
126
|
+
UPDATE vulnerability_intelligence_scans
|
|
127
|
+
SET completed_at=?, status=?, package_count=?, completed_packages=?, failed_packages=?
|
|
128
|
+
WHERE scan_id=?
|
|
129
|
+
|
|
130
|
+
-- name: insert_vulnerability_intelligence_query
|
|
131
|
+
INSERT OR IGNORE INTO vulnerability_intelligence_queries
|
|
132
|
+
(scan_id, package_name, normalized_package, package_version, source,
|
|
133
|
+
query_status, result_count, error, observed_at)
|
|
134
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
135
|
+
|
|
136
|
+
-- name: get_vulnerability_intelligence_query_id
|
|
137
|
+
SELECT query_id FROM vulnerability_intelligence_queries
|
|
138
|
+
WHERE scan_id=? AND normalized_package=? AND package_version=? AND source=?
|
|
139
|
+
|
|
140
|
+
-- name: insert_vulnerability_intelligence_observation
|
|
141
|
+
INSERT OR IGNORE INTO vulnerability_intelligence_observations
|
|
142
|
+
(query_id, scan_id, package_name, normalized_package, package_version,
|
|
143
|
+
vulnerability_id, source, affected_versions, affected_ranges, fixed_versions,
|
|
144
|
+
severity, vulnerability_status, aliases_json, published_at, modified_at,
|
|
145
|
+
withdrawn_at, cvss_json, cwe_ids_json, advisory_status, affected_release_count,
|
|
146
|
+
observed_at, details_json)
|
|
147
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
148
|
+
|
|
149
|
+
-- name: insert_vulnerability_intelligence_dependency_link
|
|
150
|
+
INSERT OR IGNORE INTO vulnerability_intelligence_dependency_links
|
|
151
|
+
(scan_id, root_package, root_normalized_package, root_version, package_name,
|
|
152
|
+
normalized_package, package_version, relation, parent_package, dependency_path, observed_at)
|
|
153
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
154
|
+
|
|
155
|
+
-- name: vulnerability_intelligence_dependencies
|
|
156
|
+
SELECT d.root_package, d.root_normalized_package, d.root_version, d.package_name,
|
|
157
|
+
d.normalized_package, d.package_version, d.relation, d.parent_package,
|
|
158
|
+
d.dependency_path, d.observed_at, s.status
|
|
159
|
+
FROM vulnerability_intelligence_dependency_links d
|
|
160
|
+
JOIN vulnerability_intelligence_scans s ON s.scan_id=d.scan_id
|
|
161
|
+
WHERE s.trigger_env_name=?
|
|
162
|
+
ORDER BY d.observed_at ASC, d.link_id ASC
|
|
163
|
+
|
|
164
|
+
-- name: successful_vulnerability_intelligence_dependency_history
|
|
165
|
+
SELECT d.scan_id, d.root_package, d.root_normalized_package, d.root_version,
|
|
166
|
+
d.package_name, d.normalized_package, d.package_version, d.relation,
|
|
167
|
+
d.parent_package, d.dependency_path, d.observed_at, s.status
|
|
168
|
+
FROM vulnerability_intelligence_dependency_links d
|
|
169
|
+
JOIN vulnerability_intelligence_scans s ON s.scan_id=d.scan_id
|
|
170
|
+
JOIN vulnerability_intelligence_queries q ON q.scan_id=d.scan_id
|
|
171
|
+
AND q.normalized_package=d.root_normalized_package
|
|
172
|
+
AND q.package_version=d.root_version AND q.source='deps.dev'
|
|
173
|
+
WHERE s.trigger_env_name=? AND q.query_status='success'
|
|
174
|
+
ORDER BY d.scan_id ASC, d.link_id ASC
|
|
175
|
+
|
|
176
|
+
-- name: vulnerability_intelligence_history
|
|
177
|
+
SELECT q.query_id, q.scan_id, q.package_name, q.normalized_package,
|
|
178
|
+
q.package_version, q.source, q.query_status, q.result_count, q.error,
|
|
179
|
+
q.observed_at, o.observation_id, o.vulnerability_id, o.affected_versions,
|
|
180
|
+
o.affected_ranges, o.fixed_versions, o.severity, o.vulnerability_status,
|
|
181
|
+
o.details_json, s.status, o.aliases_json, o.published_at, o.modified_at,
|
|
182
|
+
o.withdrawn_at, o.cvss_json, o.cwe_ids_json, o.advisory_status,
|
|
183
|
+
o.affected_release_count
|
|
184
|
+
FROM vulnerability_intelligence_scans s
|
|
185
|
+
JOIN vulnerability_intelligence_queries q ON q.scan_id=s.scan_id
|
|
186
|
+
LEFT JOIN vulnerability_intelligence_observations o ON o.query_id=q.query_id
|
|
187
|
+
WHERE s.trigger_env_name=?
|
|
188
|
+
ORDER BY q.observed_at ASC, q.query_id ASC, o.observation_id ASC
|
|
@@ -1611,39 +1611,27 @@ class PyEnvStudio(ctk.CTk):
|
|
|
1611
1611
|
self._env_row_ids[env] = row_id
|
|
1612
1612
|
|
|
1613
1613
|
selected_env = self.selected_env_var.get()
|
|
1614
|
-
|
|
1615
|
-
self.env_tree.selection_set(self._env_row_ids[selected_env])
|
|
1614
|
+
self._restore_environment_selection(selected_env)
|
|
1616
1615
|
|
|
1617
1616
|
def on_tree_click(event):
|
|
1618
1617
|
col = self.env_tree.identify_column(event.x)
|
|
1619
1618
|
row = self.env_tree.identify_row(event.y)
|
|
1620
|
-
recent_location = self.env_tree.item(row)['values'][3]
|
|
1621
1619
|
if not row:
|
|
1622
1620
|
return
|
|
1623
|
-
|
|
1621
|
+
values = self.env_tree.item(row)['values']
|
|
1622
|
+
recent_location = values[3]
|
|
1623
|
+
env = values[0]
|
|
1624
1624
|
|
|
1625
1625
|
# 1.Environment| 2.Version | 3.VM Tool | 4.Recent Location | 5.Size | 8.Last Scanned
|
|
1626
1626
|
if col in ("#1","#2", "#3", "#5", "#8"):
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
self.env_tree.selection_set(row)
|
|
1630
|
-
except Exception:
|
|
1631
|
-
pass
|
|
1632
|
-
self.selected_env_var.set(env)
|
|
1633
|
-
self.activate_button.configure(state="normal")
|
|
1634
|
-
self.dir_var.set(recent_location)
|
|
1627
|
+
self.env_tree.selection_set(row)
|
|
1628
|
+
self._select_environment(env, recent_location)
|
|
1635
1629
|
return
|
|
1636
1630
|
|
|
1637
1631
|
if col == "#4": # Recent Location
|
|
1632
|
+
self.env_tree.selection_set(row)
|
|
1633
|
+
self._select_environment(env, recent_location)
|
|
1638
1634
|
if recent_location and recent_location != "-":
|
|
1639
|
-
try:
|
|
1640
|
-
self.env_tree.selection_set(row)
|
|
1641
|
-
except Exception:
|
|
1642
|
-
pass
|
|
1643
|
-
self.selected_env_var.set(env)
|
|
1644
|
-
self.activate_button.configure(state="normal")
|
|
1645
|
-
self.dir_var.set(recent_location)
|
|
1646
|
-
|
|
1647
1635
|
# Copy location to clipboard
|
|
1648
1636
|
self.clipboard_clear()
|
|
1649
1637
|
self.clipboard_append(recent_location)
|
|
@@ -1712,19 +1700,71 @@ class PyEnvStudio(ctk.CTk):
|
|
|
1712
1700
|
self.env_tree.bind("<Button-1>", on_tree_click)
|
|
1713
1701
|
self.env_tree.bind("<Double-1>", on_tree_double_click)
|
|
1714
1702
|
|
|
1715
|
-
|
|
1716
|
-
sel = self.env_tree.selection()
|
|
1717
|
-
if sel:
|
|
1718
|
-
env = self.env_tree.item(sel[0])['values'][0]
|
|
1719
|
-
self.selected_env_var.set(env)
|
|
1720
|
-
self.activate_button.configure(state="normal")
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
self.env_tree.bind("<<TreeviewSelect>>", on_tree_select)
|
|
1703
|
+
self.env_tree.bind("<<TreeviewSelect>>", self._on_environment_tree_select)
|
|
1724
1704
|
|
|
1725
1705
|
for env in checks:
|
|
1726
1706
|
self._start_package_update_check(env)
|
|
1727
1707
|
|
|
1708
|
+
def _restore_environment_selection(self, env_name: str) -> None:
|
|
1709
|
+
"""Restore the selected row and synchronize its current row context."""
|
|
1710
|
+
row_id = getattr(self, "_env_row_ids", {}).get(env_name)
|
|
1711
|
+
if not row_id or not self.env_tree.exists(row_id):
|
|
1712
|
+
self._select_environment("")
|
|
1713
|
+
return
|
|
1714
|
+
values = self.env_tree.item(row_id, "values")
|
|
1715
|
+
self.env_tree.selection_set(row_id)
|
|
1716
|
+
self._select_environment(env_name, values[3])
|
|
1717
|
+
|
|
1718
|
+
def _select_environment(self, env_name: str, recent_location: str | None = None) -> None:
|
|
1719
|
+
"""Synchronize the selected environment and the UI that depends on it."""
|
|
1720
|
+
env_name = (env_name or "").strip()
|
|
1721
|
+
valid = bool(env_name and is_valid_env_selected(env_name))
|
|
1722
|
+
previous_env = self.selected_env_var.get().strip()
|
|
1723
|
+
if not valid:
|
|
1724
|
+
env_name = ""
|
|
1725
|
+
recent_location = ""
|
|
1726
|
+
elif recent_location == "-":
|
|
1727
|
+
recent_location = ""
|
|
1728
|
+
|
|
1729
|
+
self.selected_env_var.set(env_name)
|
|
1730
|
+
self.dir_var.set((recent_location or "") if valid else "")
|
|
1731
|
+
self.activate_button.configure(state="normal" if valid else "disabled")
|
|
1732
|
+
|
|
1733
|
+
if valid:
|
|
1734
|
+
self.selected_env_label.configure(
|
|
1735
|
+
text=f"Selected Environment: {env_name}",
|
|
1736
|
+
text_color=self.theme.HIGHLIGHT_COLOR,
|
|
1737
|
+
)
|
|
1738
|
+
else:
|
|
1739
|
+
self.selected_env_label.configure(
|
|
1740
|
+
text="No valid environment selected.",
|
|
1741
|
+
text_color=self.theme.ERROR_COLOR,
|
|
1742
|
+
)
|
|
1743
|
+
self._package_list_generation = getattr(self, "_package_list_generation", 0) + 1
|
|
1744
|
+
for widget in self.packages_list_frame.winfo_children():
|
|
1745
|
+
widget.destroy()
|
|
1746
|
+
self.packages_list_frame.grid_remove()
|
|
1747
|
+
self._package_list_env_name = None
|
|
1748
|
+
return
|
|
1749
|
+
|
|
1750
|
+
if previous_env != env_name and self._package_pane_is_visible():
|
|
1751
|
+
self.refresh_package_list()
|
|
1752
|
+
|
|
1753
|
+
def _on_environment_tree_select(self, _event=None) -> None:
|
|
1754
|
+
"""Apply a mouse or keyboard Treeview selection to the app context."""
|
|
1755
|
+
selection = self.env_tree.selection()
|
|
1756
|
+
if not selection:
|
|
1757
|
+
self._select_environment("")
|
|
1758
|
+
return
|
|
1759
|
+
values = self.env_tree.item(selection[0], "values")
|
|
1760
|
+
self._select_environment(values[0], values[3])
|
|
1761
|
+
|
|
1762
|
+
def _package_pane_is_visible(self) -> bool:
|
|
1763
|
+
try:
|
|
1764
|
+
return bool(self.packages_list_frame.winfo_ismapped())
|
|
1765
|
+
except Exception:
|
|
1766
|
+
return False
|
|
1767
|
+
|
|
1728
1768
|
def _set_env_update_label(self, env_name: str, label: str) -> None:
|
|
1729
1769
|
row_id = getattr(self, "_env_row_ids", {}).get(env_name)
|
|
1730
1770
|
if not row_id or not self.env_tree.exists(row_id):
|
|
@@ -2325,13 +2365,11 @@ class PyEnvStudio(ctk.CTk):
|
|
|
2325
2365
|
|
|
2326
2366
|
env_name = self.selected_env_var.get().strip()
|
|
2327
2367
|
if not env_name or not is_valid_env_selected(env_name):
|
|
2328
|
-
self.
|
|
2329
|
-
text="No valid environment selected.",
|
|
2330
|
-
text_color=self.theme.ERROR_COLOR
|
|
2331
|
-
)
|
|
2332
|
-
self.packages_list_frame.grid_remove()
|
|
2368
|
+
self._select_environment("")
|
|
2333
2369
|
return
|
|
2334
2370
|
|
|
2371
|
+
self._package_list_env_name = env_name
|
|
2372
|
+
|
|
2335
2373
|
self.progress.set_status(f"Loading packages of '{env_name}'…")
|
|
2336
2374
|
self.lbl(
|
|
2337
2375
|
self.packages_list_frame,
|
|
@@ -2343,11 +2381,23 @@ class PyEnvStudio(ctk.CTk):
|
|
|
2343
2381
|
lambda: list_packages(env_name),
|
|
2344
2382
|
ui=self,
|
|
2345
2383
|
on_done=lambda packages: self._on_packages_loaded(env_name, packages, generation),
|
|
2346
|
-
on_error=lambda exc: self._on_packages_load_failed(exc, generation),
|
|
2384
|
+
on_error=lambda exc: self._on_packages_load_failed(env_name, exc, generation),
|
|
2347
2385
|
)
|
|
2348
2386
|
|
|
2349
|
-
def
|
|
2387
|
+
def _package_request_is_current(self, env_name: str, generation: int) -> bool:
|
|
2350
2388
|
if generation != getattr(self, "_package_list_generation", generation):
|
|
2389
|
+
return False
|
|
2390
|
+
if env_name != self.selected_env_var.get().strip():
|
|
2391
|
+
return False
|
|
2392
|
+
if env_name != getattr(self, "_package_list_env_name", env_name):
|
|
2393
|
+
return False
|
|
2394
|
+
if not is_valid_env_selected(env_name):
|
|
2395
|
+
self._select_environment("")
|
|
2396
|
+
return False
|
|
2397
|
+
return True
|
|
2398
|
+
|
|
2399
|
+
def _on_packages_load_failed(self, env_name: str, exc: BaseException, generation: int) -> None:
|
|
2400
|
+
if not self._package_request_is_current(env_name, generation):
|
|
2351
2401
|
return
|
|
2352
2402
|
try:
|
|
2353
2403
|
if not self.winfo_exists():
|
|
@@ -2360,7 +2410,7 @@ class PyEnvStudio(ctk.CTk):
|
|
|
2360
2410
|
|
|
2361
2411
|
def _on_packages_loaded(self, env_name, packages, generation: int) -> None:
|
|
2362
2412
|
"""Draw the package rows (main thread only)."""
|
|
2363
|
-
if
|
|
2413
|
+
if not self._package_request_is_current(env_name, generation):
|
|
2364
2414
|
return # a newer refresh already loaded (or is loading) newer data
|
|
2365
2415
|
try:
|
|
2366
2416
|
if not self.winfo_exists():
|
|
@@ -2392,6 +2442,11 @@ class PyEnvStudio(ctk.CTk):
|
|
|
2392
2442
|
self.pkg_tree.insert("", "end", values=(pkg_name, pkg_version, "🗑️", "⟳"))
|
|
2393
2443
|
|
|
2394
2444
|
def on_pkg_click(event):
|
|
2445
|
+
if (
|
|
2446
|
+
self.selected_env_var.get().strip() != env_name
|
|
2447
|
+
or getattr(self, "_package_list_env_name", None) != env_name
|
|
2448
|
+
):
|
|
2449
|
+
return
|
|
2395
2450
|
col = self.pkg_tree.identify_column(event.x)
|
|
2396
2451
|
row = self.pkg_tree.identify_row(event.y)
|
|
2397
2452
|
if not row:
|