PyAirbyte icon indicating copy to clipboard operation
PyAirbyte copied to clipboard

Chore: Remove deprecated pyscopg v2 (pyscopg2)

Open aaronsteers opened this issue 1 year ago • 5 comments

Summary by CodeRabbit

  • New Features

    • Updated PostgreSQL connection URL format to utilize the psycopg driver for enhanced database interactions.
  • Bug Fixes

    • Removed the psycopg2-binary dependency to streamline PostgreSQL-related dependencies and improve compatibility.
  • Tests

    • Modified test connection URL format to align with the new PostgreSQL connection method.

aaronsteers avatar Nov 16 '24 05:11 aaronsteers

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pyairbyte-api-docs ❌ Failed (Inspect) Nov 16, 2024 5:44am

vercel[bot] avatar Nov 16 '24 05:11 vercel[bot]

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in this pull request primarily involve updates to the PostgreSQL connection handling within the PostgresConfig class and related testing configurations. The SQLAlchemy URL scheme has been modified to use postgresql+psycopg, indicating a shift to the psycopg driver. Additionally, the pyproject.toml file has seen adjustments in dependency management, including the removal of psycopg2-binary. The testing function for PostgreSQL connections has also been updated to reflect the new URL format.

Changes

File Change Summary
airbyte/_processors/sql/postgres.py Updated get_sql_alchemy_url method to return a URL using the postgresql+psycopg scheme.
pyproject.toml Removed psycopg2-binary, consolidating PostgreSQL-related dependencies.
tests/conftest.py Modified test_pg_connection function to use the postgresql+psycopg scheme for the PostgreSQL connection URL.

Possibly related PRs

  • airbytehq/PyAirbyte#396: The changes in this PR involve modifications to SQLAlchemy types, which may relate to the overall handling of SQLAlchemy connections and types, similar to the changes made in the main PR regarding the SQLAlchemy URL format.
  • airbytehq/PyAirbyte#538: This PR updates the psycopg dependency, which is directly relevant to the main PR's change in the SQLAlchemy URL scheme to use psycopg, indicating a connection in the context of database interaction.

📜 Recent review details

Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7e9d73cae3325b80c1243aab5c16d4800a92618 and 8608171cdd6848a07a6a8e6bb34d726d14125c58.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • pyproject.toml (0 hunks)
  • tests/conftest.py (2 hunks)
💤 Files with no reviewable changes (1)
  • pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/conftest.py
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Pytest (All, Python 3.11, Windows)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Windows)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Pytest (No Creds)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Nov 16 '24 05:11 coderabbitai[bot]

/poetry-lock

poetry lock job started... Check job output.

poetry lock applied successfully.

aaronsteers avatar Nov 19 '24 05:11 aaronsteers

/poetry-lock

poetry lock job started... Check job output.

poetry lock applied successfully.

aaronsteers avatar Dec 02 '24 07:12 aaronsteers

/poetry-lock

poetry lock job started... Check job output.

poetry lock applied successfully.

aaronsteers avatar Mar 28 '25 22:03 aaronsteers