Skip to content

Chore(deps): Update psycopg to ^3.1.19 for macOS <14 compatibility#538

Merged
Aaron ("AJ") Steers (aaronsteers) merged 3 commits into
airbytehq:mainfrom
niyasrad:psycopg-macos-comp
Nov 19, 2024
Merged

Chore(deps): Update psycopg to ^3.1.19 for macOS <14 compatibility#538
Aaron ("AJ") Steers (aaronsteers) merged 3 commits into
airbytehq:mainfrom
niyasrad:psycopg-macos-comp

Conversation

@niyasrad

@niyasrad Niyas Hameed (niyasrad) commented Nov 18, 2024

Copy link
Copy Markdown
Contributor

Psycopg Binary Installation Docs
image


Description

This PR modifies the psycopg dependency version in pyproject.toml to ^3.1.19 to ensure compatibility with macOS systems running versions prior to 14.0.

On Ubuntu systems, the previously specified version ^3.2.2 continues to function as expected.
However, for macOS versions earlier than 14.0, the ^3.1.19 version is the most compatible distribution, as later versions of psycopg (e.g., 3.2.2) are not supported.

Discussion/ More Info: https://airbytehq.slack.com/archives/C06FZ238P8W/p1731733870085899

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores
    • Updated the version of the psycopg library dependency from ^3.2.2 to ^3.1.19.

@niyasrad Niyas Hameed (niyasrad) changed the title Chore(deps): update psycopg to ^3.1.19 for macOS <14 compatibility Chore(deps): Update psycopg to ^3.1.19 for macOS <14 compatibility Nov 18, 2024
@coderabbitai

coderabbitai Bot commented Nov 18, 2024

Copy link
Copy Markdown
Contributor
📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request modifies the pyproject.toml file for the airbyte project by updating the version specification for the psycopg dependency from ^3.2.2 to ^3.1.19, indicating a downgrade. No other dependencies were changed, and the configurations for tools like pytest, ruff, and mypy remain unchanged.

Changes

File Change Summary
pyproject.toml Updated psycopg dependency version from ^3.2.2 to ^3.1.19.

Possibly related PRs


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1b3fdd7 and 1b54379.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pyproject.toml

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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 resolve resolve all the CodeRabbit review comments.
  • @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 coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
pyproject.toml (1)

30-30: Consider adding platform-specific tests

Since this change is platform-specific, would it be helpful to add some basic connection tests that run on both Ubuntu and macOS? This could help catch any platform-specific issues early. I can help draft these tests if you'd like! 🤔

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 186d0c5 and 1b3fdd7.

📒 Files selected for processing (1)
  • pyproject.toml (1 hunks)
🔇 Additional comments (1)
pyproject.toml (1)

30-30: Verify compatibility with other database dependencies

I see we're downgrading psycopg to support older macOS versions. Since the project uses multiple database-related packages (psycopg2-binary, duckdb, snowflake), should we verify that this version works well with them? wdyt?

Consider adding a comment in pyproject.toml explaining the version constraint:

-psycopg = {extras = ["binary", "pool"], version = "^3.1.19"}
+# Pinned to 3.1.19 for macOS <14 compatibility. Later versions don't support older macOS.
+psycopg = {extras = ["binary", "pool"], version = "^3.1.19"}
✅ Verification successful

Looks like the psycopg downgrade should be safe to proceed

Based on the codebase analysis, psycopg is only used in test fixtures for basic database connectivity (connect and OperationalError). No version-specific features are being used that would be affected by the downgrade from 3.2.2 to 3.1.19. The change should work fine with other database dependencies as they're used independently.

Maybe we could still add that comment about macOS compatibility to help future maintainers? wdyt?

-psycopg = {extras = ["binary", "pool"], version = "^3.1.19"}
+# Pinned to 3.1.19 for macOS <14 compatibility
+psycopg = {extras = ["binary", "pool"], version = "^3.1.19"}
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any known compatibility issues between psycopg 3.1.19 and other database packages

# Search for imports of multiple database packages together
rg -l "import psycopg" | xargs rg "import (psycopg2|snowflake|duckdb)"

# Look for any existing version constraints or compatibility notes
rg -i "psycopg.*version|compatibility" README.md docs/

Length of output: 129


Script:

#!/bin/bash
# Let's try a different approach to check database-related imports and usage

# Search for psycopg imports and their context
rg "import psycopg" -B2 -A2

# Search for database-related code patterns
ast-grep --pattern 'import psycopg'

# Check if there are any version-specific features being used
rg "psycopg\." -A2

# Look for any database connection or configuration files
fd -e py -e yaml -e ini -e conf | grep -i "db\|database"

Length of output: 801

@aaronsteers

Copy link
Copy Markdown
Member

Niyas Hameed (@niyasrad) - I'm inclined to merge this. For posterity, do you have any external docs or links that document the compatibility issue, aka dropping of support for older Mac OS versions?

@niyasrad

Niyas Hameed (niyasrad) commented Nov 18, 2024

Copy link
Copy Markdown
Contributor Author

Niyas Hameed (@niyasrad) - I'm inclined to merge this. For posterity, do you have any external docs or links that document the compatibility issue, aka dropping of support for older Mac OS versions?

Aaron ("AJ") Steers (@aaronsteers) - Yes! I will attach the docs, and the corresponding snippet with a screenshot.

Psycopg Binary Installation Docs
image

@aaronsteers

Copy link
Copy Markdown
Member

Perfect, thanks!

@aaronsteers

Aaron ("AJ") Steers (aaronsteers) commented Nov 18, 2024

Copy link
Copy Markdown
Member

/poetry-lock

poetry lock job started... Check job output.

poetry lock applied successfully.

Resolving dependencies... changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants