-
Notifications
You must be signed in to change notification settings - Fork 67
feat: replace pip with uv and add use_python parameter #730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Replace all pip install commands with uv pip install - Replace python -m venv with uv venv when using uv - Add use_python parameter to control Python interpreter selection: - True: use current Python interpreter - False: prefer Docker execution - Path: use specific interpreter path - str: use uv-managed Python version - Update CLI to accept --use-python option - Update all relevant function signatures to pass parameter through call chain - Update example files to use uv instead of pip in comments Co-Authored-By: AJ Steers <[email protected]>
Original prompt from AJ Steers
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
📝 WalkthroughWalkthroughThis change introduces support for selecting the Python interpreter and virtual environment management tool ("uv" or standard Python) throughout the Airbyte CLI, executor, and utility layers. It adds a Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant Util
participant Executor
participant OS
User->>CLI: Run command with --use-python option
CLI->>Util: get_source/get_destination(..., use_python)
Util->>Executor: VenvExecutor(..., use_python)
Executor->>OS: Create venv (uv or python -m venv)
Executor->>OS: Install package (uv pip install or pip install)
OS-->>Executor: Success/Failure
Executor-->>Util: Executor ready or error
Util-->>CLI: Source/Destination ready or error
CLI-->>User: Output result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes Suggested labels
Suggested reviewers
Would you like me to also help coordinate review with PR #268 since both touch on virtual environment management? Wdyt? Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. Testing This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1753929814-replace-pip-with-uv' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1753929814-replace-pip-with-uv' Helpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
Community SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces pip with uv for Python connector installations and introduces a new use_python
parameter that provides flexible Python interpreter selection for PyAirbyte connectors.
- Replaces all
pip install
commands withuv pip install
throughout the codebase - Adds new
use_python
parameter with support for current interpreter, Docker preference, specific paths, or uv-managed versions - Updates CLI commands to accept
--use-python
option for validate, benchmark, and sync operations
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
airbyte/_executors/python.py | Modified VenvExecutor to use uv commands and handle different use_python parameter types |
airbyte/_executors/util.py | Added use_python parameter to get_connector_executor factory function |
airbyte/sources/util.py | Added use_python parameter to get_source function with documentation |
airbyte/destinations/util.py | Added use_python parameter to get_destination function with documentation |
airbyte/cli.py | Added --use-python CLI option and _parse_use_python helper function |
tests/conftest.py | Updated test fixture to use uv commands instead of pip |
examples/*.py | Updated example comments to reference uv pip install instead of pip install |
PyTest Results (Fast Tests Only, No Creds)301 tests +45 301 ✅ +45 4m 14s ⏱️ +46s Results for commit 4266c74. ± Comparison against base commit f9275ea. This pull request removes 45 and adds 90 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
PyTest Results (Full)364 tests +46 350 ✅ +46 20m 11s ⏱️ + 3m 1s Results for commit 4266c74. ± Comparison against base commit f9275ea. This pull request removes 46 and adds 92 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
- Add AIRBYTE_NO_UV environment variable to control tool selection - When AIRBYTE_NO_UV is set to '1', 'true', or 'yes', use pip instead of uv - Default behavior remains using uv when environment variable is not set - Preserves failure signals while providing users a safe escape hatch - Update both VenvExecutor and test fixture to respect environment variable - Fixes CI failures where uv executable is not available Co-Authored-By: AJ Steers <[email protected]>
- Add uv-specific error patterns to test_install_failure_log_pypi - Keep existing pip error patterns for backward compatibility - Test now correctly detects installation failures from both tools Co-Authored-By: AJ Steers <[email protected]>
I've observed this error and I believe it is unrelated to our changes:
|
The test_nocode_connectors_setup and test_expected_hardcoded_failures tests were causing unnecessary CI flakiness due to CDK version compatibility issues. These tests were not providing reliable value and were eternally-flaky. Removed: - test_nocode_connectors_setup function - test_expected_hardcoded_failures function - Hardcoded failure lists (_LOWCODE_CONNECTORS_FAILING_VALIDATION, etc.) - Associated imports and references This cleanup makes the test suite more reliable by removing tests that don't provide consistent value. Co-Authored-By: AJ Steers <[email protected]>
Co-Authored-By: AJ Steers <[email protected]>
- uv is used as subprocess tool, not imported directly - fixes dependency analysis CI failure Co-Authored-By: AJ Steers <[email protected]>
…wcode-test' into devin/1753929814-replace-pip-with-uv
- validate.py now uses uv by default but falls back to pip when AIRBYTE_NO_UV is set - fixes CI failure in test_validation.py caused by venv structure mismatch - maintains consistency with main uv implementation approach Co-Authored-By: AJ Steers <[email protected]>
- Move _should_use_uv logic from multiple files to airbyte/constants.py - Follow existing constants.py pattern with proper documentation - Update all call sites to import and use AIRBYTE_USE_UV constant - Maintain exact same behavior: uv used by default, disabled when AIRBYTE_NO_UV=1/true/yes - Revert documentation changes in example files from 'uv pip install' back to 'pip install' Co-Authored-By: AJ Steers <[email protected]>
- Fix syntax error in _parse_use_python function - Change '"' to '\' for proper string literal escaping - Addresses GitHub comment requesting Windows path separator support Co-Authored-By: AJ Steers <[email protected]>
…h-uv' into devin/1753929814-replace-pip-with-uv
- Add parametrized fixture testing both uv-enabled and uv-disabled scenarios - Use existing PyAirbyte installation methods via get_connector_executor - Fix scope issues by changing to session-scoped fixture - Remove monkeypatch dependency and use direct os.environ Co-Authored-By: AJ Steers <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
tests/conftest.py (1)
10-10
: Clean up unused imports flagged by the linterThe pipeline failures indicate that
subprocess
,get_bin_dir
, andNO_UV
are imported but not used in the current implementation. Should we remove these unused imports to keep the code clean? wdyt?-import subprocess -from airbyte._util.venv_util import get_bin_dir -from airbyte.constants import NO_UVAlso applies to: 23-23, 27-27
🧹 Nitpick comments (2)
tests/conftest.py (2)
283-284
: Consider adding docstring details about the parameterizationThe fixture is now parameterized to test both uv modes, but the docstring could be more explicit about this behavior. Would you like to expand the docstring to mention that it runs twice with different uv configurations? wdyt?
@pytest.fixture(scope="session", params=[True, False], ids=["uv_enabled", "uv_disabled"]) def source_test_installation(request): """ Prepare test environment. This will pre-install the test source from the fixtures array and set the environment variable to use the local json file as registry. - - Parametrized to test both uv-enabled and uv-disabled installation methods. + + This fixture is parametrized to run twice: + - uv_enabled: Uses uv for package installation (default behavior) + - uv_disabled: Sets AIRBYTE_NO_UV=1 to use traditional pip/venv methods """
302-308
: Consider passing use_python parameter explicitlyThe fixture creates the executor but doesn't explicitly pass the
use_python
parameter that was introduced in this PR. Since the fixture is testing both uv modes, should we passuse_python=None
(oruse_python=True
) to be explicit about our intention? wdyt?executor = get_connector_executor( name="source-test", pip_url="./tests/integration_tests/fixtures/source-test", install_root=Path.cwd(), install_if_missing=True, + use_python=None, # Use current Python interpreter )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
airbyte/_executors/python.py
(6 hunks)airbyte/constants.py
(1 hunks)airbyte/validate.py
(2 hunks)tests/conftest.py
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- airbyte/constants.py
- airbyte/validate.py
- airbyte/_executors/python.py
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: yohannj
PR: airbytehq/PyAirbyte#716
File: airbyte/logs.py:384-402
Timestamp: 2025-07-11T19:53:44.427Z
Learning: In the PyAirbyte project, when reviewing PRs, maintain clear separation of concerns. Don't suggest changes that are outside the scope of the PR's main objective, even if they would improve consistency or fix other issues. This helps with reviewing changes and potential reverts.
Learnt from: aaronsteers
PR: airbytehq/PyAirbyte#417
File: airbyte/cli.py:503-504
Timestamp: 2024-10-10T16:17:57.989Z
Learning: In the PyAirbyte project, support for Python versions earlier than 3.10 is not necessary, as the project requires Python 3.10 or newer.
📚 Learning: when reviewing changes in test fixtures, especially renaming, consider that they might be due to fix...
Learnt from: aaronsteers
PR: airbytehq/PyAirbyte#347
File: tests/integration_tests/fixtures/registry.json:47-47
Timestamp: 2024-10-08T15:34:31.026Z
Learning: When reviewing changes in test fixtures, especially renaming, consider that they might be due to fixing copy-paste errors and may not impact core codepaths.
Applied to files:
tests/conftest.py
📚 Learning: test fixtures in the pyairbyte project do not need to align with real docker repositories....
Learnt from: aaronsteers
PR: airbytehq/PyAirbyte#347
File: tests/integration_tests/fixtures/registry.json:48-48
Timestamp: 2024-08-31T01:20:08.405Z
Learning: Test fixtures in the PyAirbyte project do not need to align with real Docker repositories.
Applied to files:
tests/conftest.py
📚 Learning: in `airbyte/sources/util.py`, the function `get_benchmark_source` is intended for benchmarking purpo...
Learnt from: aaronsteers
PR: airbytehq/PyAirbyte#411
File: airbyte/sources/util.py:121-123
Timestamp: 2024-10-06T17:35:27.056Z
Learning: In `airbyte/sources/util.py`, the function `get_benchmark_source` is intended for benchmarking purposes in the current iteration. Future plans may include adding more generic functions like `get_dummy_source` or `get_mock_source` with broader functionality.
Applied to files:
tests/conftest.py
🧬 Code Graph Analysis (1)
tests/conftest.py (1)
airbyte/_executors/util.py (1)
get_connector_executor
(158-358)
🪛 GitHub Actions: Run Linters
tests/conftest.py
[error] 10-10: Ruff F401: subprocess
imported but unused.
[error] 23-23: Ruff F401: airbyte._util.venv_util.get_bin_dir
imported but unused.
[error] 27-27: Ruff F401: airbyte.constants.NO_UV
imported but unused.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Pytest (All, Python 3.10, Windows)
- GitHub Check: Pytest (All, Python 3.11, Windows)
- GitHub Check: Pytest (All, Python 3.10, Ubuntu)
- GitHub Check: Pytest (All, Python 3.11, Ubuntu)
- GitHub Check: Pytest (No Creds)
- GitHub Check: Pytest (Fast)
🔇 Additional comments (1)
tests/conftest.py (1)
296-314
: LGTM on the refactored fixture logic!The refactoring from manual subprocess calls to using
get_connector_executor
is a great improvement that aligns perfectly with the PR's objectives. The try-finally pattern for cleanup is also well implemented. This change makes the test infrastructure more maintainable and consistent with the new executor pattern.
…from conftest.py Co-Authored-By: AJ Steers <[email protected]>
/fix-pr
|
Co-Authored-By: AJ Steers <[email protected]>
…nager.devin.ai/proxy/github.com/airbytehq/PyAirbyte into devin/1753929814-replace-pip-with-uv
- Add parametrized source_test_installation fixture to test both uv-enabled and uv-disabled installation methods - Use existing PyAirbyte installation methods via get_connector_executor instead of direct subprocess calls - Add cross-version Python test script using new sync command syntax with destination-dev-null:0.6.0 - Fixture tests pass successfully with 8 tests covering both installation paths Co-Authored-By: AJ Steers <[email protected]>
….com/airbytehq/PyAirbyte into devin/1753929814-replace-pip-with-uv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (6)
test_cross_version_sync.py (3)
13-103
: Function looks solid overall! A few suggestions to consider:The Docker command construction and error handling look good. I noticed a couple of potential improvements - would you consider extracting the hardcoded timeout value (600) to a constant or parameter for better maintainability? Also, the bash script construction is quite readable, but you might want to consider using
shlex.quote()
around the target_python parameter for extra safety, even though it's controlled input. Wdyt?+import shlex + +# At the top of the file +DEFAULT_TIMEOUT = 600 + def run_cross_version_test( - base_python: str, target_python: str, test_name: str + base_python: str, target_python: str, test_name: str, timeout: int = DEFAULT_TIMEOUT ) -> dict[str, str | bool | float]: # ... existing code ... - echo "Running sync with --use-python {target_python}..." + echo "Running sync with --use-python {shlex.quote(target_python)}..." time poetry run pyab sync --source source-faker \\ --Sconfig '{{"count": 100}}' \\ - --use-python {target_python} \\ + --use-python {shlex.quote(target_python)} \\ --destination=airbyte/destination-dev-null:0.6.0
105-142
: Nice orchestration of the test suite!The test cases cover good cross-version scenarios and the result handling looks solid. One small suggestion - in the summary parsing (line 132), you're splitting on "to" which works but assumes the test_key format. Would you consider making this more robust by storing the original base/target values in the results dict instead of reconstructing them? Wdyt?
for test_key, result in results.items(): - base, target = test_key.split("_to_") + base = result["base_python"] + target = result["target_python"] status = "✓" if result["success"] else "✗"
1-12
: Clean imports and file structure!The imports are minimal and appropriate. The file has good documentation and structure. Would you consider using
TypedDict
for the return type ofrun_cross_version_test
to make the expected keys more explicit? Something like defining aTestResult
type? Wdyt?+from typing import TypedDict + +class TestResult(TypedDict, total=False): + success: bool + duration: float + return_code: int + stdout: str + stderr: str + base_python: str + target_python: str + error: str + def run_cross_version_test( base_python: str, target_python: str, test_name: str -) -> dict[str, str | bool | float]: +) -> TestResult:README.md (3)
23-29
: Clear documentation on declarative sources!The explanation is helpful and accurate. Would you consider simplifying the wording in line 29? Instead of "due to the fact that all dependencies are locked", maybe just "because all dependencies are locked"? The static analysis tool flagged this as potentially wordy. Wdyt?
-In some cases, you may get better stability by using `docker_image=True` in `get_source()`/`get_destination()`, due to the fact that all dependencies are locked within the docker image. +In some cases, you may get better stability by using `docker_image=True` in `get_source()`/`get_destination()`, because all dependencies are locked within the docker image.
31-36
: Good explanation of Python installation!Same suggestion as the previous section - would you consider simplifying "due to the fact that" to just "because" for better readability? Wdyt?
-In some cases, you may get better stability by using `docker_image=True` in `get_source()`/`get_destination()`, due to the fact that all dependencies are locked within the docker image. +In some cases, you may get better stability by using `docker_image=True` in `get_source()`/`get_destination()`, because all dependencies are locked within the docker image.
43-57
: Great example showing the use_python functionality!The code example is helpful and the explanation is clear. There's a small typo in line 45 - would you fix "you with to use" to "you wish to use"? Wdyt?
-In both `get_source()` and `get_destination()`, you can provide a `use_python` input arg that is equal to the desired version of Python that you with to use for the given connector. +In both `get_source()` and `get_destination()`, you can provide a `use_python` input arg that is equal to the desired version of Python that you wish to use for the given connector.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
README.md
(1 hunks)test_cross_version_sync.py
(1 hunks)tests/conftest.py
(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/conftest.py
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: yohannj
PR: airbytehq/PyAirbyte#716
File: airbyte/logs.py:384-402
Timestamp: 2025-07-11T19:53:44.427Z
Learning: In the PyAirbyte project, when reviewing PRs, maintain clear separation of concerns. Don't suggest changes that are outside the scope of the PR's main objective, even if they would improve consistency or fix other issues. This helps with reviewing changes and potential reverts.
Learnt from: aaronsteers
PR: airbytehq/PyAirbyte#417
File: airbyte/cli.py:503-504
Timestamp: 2024-10-10T16:17:57.989Z
Learning: In the PyAirbyte project, support for Python versions earlier than 3.10 is not necessary, as the project requires Python 3.10 or newer.
📚 Learning: in the pyairbyte project, support for python versions earlier than 3.10 is not necessary, as the pro...
Learnt from: aaronsteers
PR: airbytehq/PyAirbyte#417
File: airbyte/cli.py:503-504
Timestamp: 2024-10-10T16:17:57.989Z
Learning: In the PyAirbyte project, support for Python versions earlier than 3.10 is not necessary, as the project requires Python 3.10 or newer.
Applied to files:
test_cross_version_sync.py
🪛 LanguageTool
README.md
[style] ~29-~29: ‘due to the fact that’ might be wordy. Consider a shorter alternative.
Context: ... in get_source()
/get_destination()
, due to the fact that all dependencies are locked within the ...
(EN_WORDINESS_PREMIUM_DUE_TO_THE_FACT_THAT)
[style] ~35-~35: ‘due to the fact that’ might be wordy. Consider a shorter alternative.
Context: ... in get_source()
/get_destination()
, due to the fact that all dependencies are locked within the ...
(EN_WORDINESS_PREMIUM_DUE_TO_THE_FACT_THAT)
[grammar] ~45-~45: Ensure spelling is correct
Context: ... the desired version of Python that you with to use for the given connector. This ca...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Pytest (All, Python 3.11, Ubuntu)
- GitHub Check: Pytest (Fast)
- GitHub Check: Pytest (No Creds)
- GitHub Check: Pytest (All, Python 3.11, Windows)
- GitHub Check: Pytest (All, Python 3.10, Ubuntu)
- GitHub Check: Pytest (All, Python 3.10, Windows)
🔇 Additional comments (2)
README.md (2)
37-42
: Excellent documentation of the new uv functionality!This clearly explains the new default behavior and provides the fallback option. The version reference (0.29.0) and environment variable documentation align perfectly with the PR objectives.
58-61
: Clear documentation of Docker installation options!The explanation of both the boolean and specific image tag usage is helpful and aligns well with the flexible installation approach introduced in this PR.
/poetry-lock
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
README.md (4)
25-27
: Tighten grammar & clarity of the Declarative section?A couple of small wording tweaks would make the sentences flow a bit better and fix a typo. Wdyt?
-For Declarative Sources defined in YAML, the installation process will is to simply download the yaml file from the `connectors.airbyte.com` public URLs, and to run them directly as YAML. -Declarative sources have the fastest download times, due to the simplicity and each of install. +For Declarative sources defined in YAML, the installation process is simply to download the YAML file from the `connectors.airbyte.com` public URLs and run it directly. +Declarative sources download the fastest because each installation is lightweight.
29-35
: Replace wordy “due to the fact that” with “because”?To keep the prose concise (and avoid the LanguageTool flag), perhaps swap the phrase on both occurrences, e.g.:
-... `docker_image=True` in `get_source()`/`get_destination()`, due to the fact that all dependencies are locked within the docker image. +... `docker_image=True` in `get_source()`/`get_destination()`, because all dependencies are locked within the Docker image.Apply similarly in Line 35. Wdyt?
45-45
: Fix “with” → “wish”?Tiny typo in the
use_python
sentence:-... the desired version of Python that you with to use ... +... the desired version of Python that you wish to use ...
47-55
: Align example version numbers for consistency?The paragraph mentions 3.10.13 while the snippet uses 3.10.17. Would matching them avoid reader confusion? For example:
-... install a connector using Python 3.10.13 with the following code snippet: +... install a connector using Python 3.10.17 with the following code snippet:(or vice-versa). Wdyt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lock
is excluded by!**/*.lock
📒 Files selected for processing (2)
README.md
(1 hunks)pyproject.toml
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- pyproject.toml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: yohannj
PR: airbytehq/PyAirbyte#716
File: airbyte/logs.py:384-402
Timestamp: 2025-07-11T19:53:44.427Z
Learning: In the PyAirbyte project, when reviewing PRs, maintain clear separation of concerns. Don't suggest changes that are outside the scope of the PR's main objective, even if they would improve consistency or fix other issues. This helps with reviewing changes and potential reverts.
Learnt from: aaronsteers
PR: airbytehq/PyAirbyte#417
File: airbyte/cli.py:503-504
Timestamp: 2024-10-10T16:17:57.989Z
Learning: In the PyAirbyte project, support for Python versions earlier than 3.10 is not necessary, as the project requires Python 3.10 or newer.
🪛 LanguageTool
README.md
[style] ~29-~29: ‘due to the fact that’ might be wordy. Consider a shorter alternative.
Context: ... in get_source()
/get_destination()
, due to the fact that all dependencies are locked within the ...
(EN_WORDINESS_PREMIUM_DUE_TO_THE_FACT_THAT)
[style] ~35-~35: ‘due to the fact that’ might be wordy. Consider a shorter alternative.
Context: ... in get_source()
/get_destination()
, due to the fact that all dependencies are locked within the ...
(EN_WORDINESS_PREMIUM_DUE_TO_THE_FACT_THAT)
[grammar] ~45-~45: Ensure spelling is correct
Context: ... the desired version of Python that you with to use for the given connector. This ca...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Pytest (All, Python 3.11, Ubuntu)
- GitHub Check: Pytest (All, Python 3.10, Windows)
- GitHub Check: Pytest (All, Python 3.11, Windows)
- GitHub Check: Pytest (All, Python 3.10, Ubuntu)
- GitHub Check: Pytest (No Creds)
- GitHub Check: Pytest (Fast)
feat: replace pip with uv and add use_python parameter
Summary
This PR replaces all
pip
usage withuv
for Python connector installations in PyAirbyte and adds a new optionaluse_python
parameter that provides flexible Python interpreter selection.Key Changes:
uv venv
anduv pip install
instead ofpython -m venv
andpip install
use_python
parameter: Added throughout the call chain from CLI → get_source/get_destination → get_connector_executor → VenvExecutor--use-python
option to validate, benchmark, and sync commandsTrue
/None
: Use current Python interpreter (backward compatible)False
: Prefer Docker executionPath
: Use specific interpreter pathstr
: Use uv-managed Python version (e.g., "3.11", "python3.12")Review & Testing Checklist for Human
--use-python
works with "true", "false", interpreter paths, and version stringsuv
is installed and accessible in target environments before merginguv
is not available or when invalid interpreter paths are providedRecommended test plan:
Diagram
Notes
uv
being available in the system PATH when using the new parameter typesuv pip install
instead ofpip install
use_python
parameter flows through the entire call chain: CLI → utility functions → executor factory → VenvExecutorSession details:
Summary by CodeRabbit
New Features
--use-python
), allowing flexible selection between the current interpreter, a specific path, a version string, or Docker.Bug Fixes
Chores
Important
Auto-merge enabled.
This PR is set to merge automatically when all requirements are met.