fix: Pin duckdb <1.4.0 to avoid unhashable DuckDBPyType error#900
fix: Pin duckdb <1.4.0 to avoid unhashable DuckDBPyType error#900Aaron ("AJ") Steers (aaronsteers) wants to merge 2 commits intomainfrom
Conversation
DuckDB 1.4.0 introduced a breaking change where DuckDBPyType objects are no longer hashable, causing TypeError when SQLAlchemy tries to cache result processors. This is tracked in duckdb-engine issue #1338. This pins duckdb to <1.4.0 until duckdb-engine releases a fix. Closes #809 Co-Authored-By: AJ Steers <aj@airbyte.io>
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:
|
👋 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/1765249536-fix-duckdb-compatibility' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1765249536-fix-duckdb-compatibility'Helpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
Community SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
📝 WalkthroughWalkthroughThe duckdb dependency version constraint in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2024-10-10T16:17:57.989ZApplied to files:
⏰ 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)
🔇 Additional comments (1)
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. Comment |
|
Devin, suggest if this PR is still needed. |
|
Recommendation: This PR is no longer needed and should be closed. I investigated the upstream issue and current state: Upstream fix status:
Current PyAirbyte main constraints:
Why this PR would now be harmful:
The upstream issue Mause/duckdb_engine#1338 is still technically open, but only because the duckdb-engine maintainer hasn't closed it yet - the underlying duckdb bug is resolved. I'd recommend closing this PR. If you want extra safety, a separate PR could add |
|
Closing. Issue was resolved in DuckDB |
Summary
Pins the
duckdbdependency to<1.4.0to work around a breaking change in DuckDB 1.4.0 that causesTypeError: unhashable type: '_duckdb.typing.DuckDBPyType'when initializing DuckDB cache.This is a known upstream issue in duckdb-engine: Mause/duckdb_engine#1338
The error occurs because DuckDB 1.4.0 made
DuckDBPyTypeobjects unhashable, which breaks SQLAlchemy's result processor caching mechanism. Downgrading to DuckDB 1.3.x avoids the issue.Closes #809
Review & Testing Checklist for Human
cache = ab.get_default_cache()should not raise TypeErrorRecommended test plan: Run
python examples/run_faker.pyon Python 3.12 to verify the DuckDB cache works correctly.Notes
Requested by: AJ Steers (Aaron ("AJ") Steers (@aaronsteers))
Link to Devin run: https://app.devin.ai/sessions/5094f54055bd4fc68a357aa705357fce
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.