GitHub
03/20/2026, 6:25 PMsubprocess.run seems like a false positive to me.
Checklist
• I have read the contribution guide
Was generative AI tooling used to co-author this PR?
• Yes (please specify the tool below)
Related Issues
• #6416
• #8447
• #8784
Summary by Sourcery
Centralize virtual environment management behind a new VirtualEnvService that delegates to pluggable VenvBackend implementations for virtualenv and uv, while simplifying VirtualEnv behavior and updating call sites and tests accordingly.
New Features:
• Introduce a VirtualEnvService façade that manages plugin virtual environments via a configurable VenvBackend.
• Add a VenvBackend abstraction with VirtualenvBackend and UvBackend implementations to support multiple venv backends.
Enhancements:
• Relax VirtualEnv platform handling and improve Python version detection for non-default interpreters.
• Update plugin installation and invocation logic to use VirtualEnvService/VenvBackend instead of backend-specific service classes.
• Refine logging and error handling around environment creation and pip installation, including optional forcing of Python version ignores.
Tests:
• Refactor venv-related tests to target VirtualEnvService and the new backend classes, adding MockBackend-based tests for plugin install and CLI add flows.
Summary by Sourcery
Centralize plugin virtual environment management behind a new VirtualEnvService that delegates to pluggable VenvBackend implementations while simplifying VirtualEnv behavior and updating call sites and tests to use the new abstraction.
New Features:
• Introduce VirtualEnvService as the façade for managing plugin virtual environments.
• Add a VenvBackend abstraction with VirtualenvBackend and UvBackend implementations to support multiple virtualenv backends.
Enhancements:
• Relax VirtualEnv platform handling and improve Python version detection for non-default interpreters.
• Refactor plugin installation and invocation logic to depend on VirtualEnvService/VenvBackend instead of backend-specific service classes, with improved logging and error handling around venv creation and pip installation.
Tests:
• Rework venv-related tests to target VirtualEnvService and the new backend classes, including MockBackend-based tests for plugin auto-install flows and CLI add behavior, and expand coverage of Python selection and cross-platform handling.
Summary by Sourcery
Centralize virtual environment management behind a new VirtualEnvService façade and pluggable VenvBackend implementations, while updating plugin installation and invocation to use the new abstraction.
New Features:
• Introduce VirtualEnvService as the main entry point for managing plugin virtual environments.
• Add a VenvBackend abstraction with VirtualenvBackend and UvBackend implementations to support multiple venv backends.
Enhancements:
• Relax VirtualEnv platform handling and improve Python version detection for non-default interpreters.
• Refine pip installation behavior to optionally ignore plugin-declared Python requirements via a force flag.
• Simplify plugin execution environment setup by using VirtualEnv directly in PluginInvoker instead of venv-specific service classes.
Tests:
• Refactor venv-related tests to target VirtualEnvService and the new backend classes, including backend-agnostic test coverage.
• Add MockBackend-based tests in plugin installation and CLI add flows to validate integration with the new VirtualEnvService without invoking subprocesses.
meltano/meltanoGitHub
03/20/2026, 6:25 PMGitHub
04/07/2026, 8:10 PM