🐛 [bug fix] Replace psycopg2 with psycopg for Python 3.14 compatibility - #225
🐛 [bug fix] Replace psycopg2 with psycopg for Python 3.14 compatibility#225JenR8ed wants to merge 2 commits into
Conversation
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Code Review
This pull request updates the PostgreSQL adapter in requirements.txt from psycopg2-binary to psycopg (v3). The reviewer notes that the pure Python psycopg package requires a system-installed libpq library, which can lead to runtime import errors in serverless environments like Vercel. They recommend using psycopg[binary] instead to bundle the pre-compiled binaries.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| Pillow>=10.0.0 | ||
| python-telegram-bot==21.0.1 | ||
| psycopg2-binary==2.9.9 | ||
| psycopg>=3.1.18 |
There was a problem hiding this comment.
In Psycopg 3, the base psycopg package is a pure Python implementation that requires a system-installed libpq library to function. On serverless environments like Vercel, libpq is typically not pre-installed, which will cause runtime import errors (e.g., ImportError: no pq wrapper available).
To ensure the library works out-of-the-box without requiring system-level dependencies or compilation, you should use the [binary] extra, which installs the pre-compiled psycopg-binary package alongside it.
psycopg[binary]>=3.1.18
…zation Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
The build is failing on Vercel because
psycopg2-binary==2.9.9does not have pre-compiled binary "wheels" available for CPython 3.14.3. This causes the build to fall back to a source compilation which fails due to the missingpg_configexecutable on Vercel's serverless environment.To fix this, I have:
psycopg2-binary==2.9.9with the modernpsycopg>=3.1.18(v3) inrequirements.txt.seed_db.pyfrompsycopg2topsycopg.tests/test_seed_db_security.pyto targetpsycopginstead ofpsycopg2.I verified that the test suite passes successfully.
PR created automatically by Jules for task 6982451464418265191 started by @JenR8ed