fix: psycopg3 connection issues on windows debugging environment. - #47
Conversation
|
Thanks for the detailed diagnosis and the Windows reproduction steps — the root cause identification is spot on. After reviewing the three changes, here's my assessment: ✅
|
463230c to
03b6980
Compare
|
Hope you could take some time to review this PR and see whether it could be merged. |
Thanks for your patience and for taking the time to revise the PR based on my feedback — and sorry for the slow review on my end. After a closer look at the updated diff and verifying that mem0ai does not list psycopg as a required dependency (confirmed via pip show mem0ai), I'm satisfied that all three changes are correct and safe to merge: main.py — event loop policy: Cleanly scoped to win32, zero impact on Linux/macOS production deployments. |
|
Thank you for the thorough review and thoughtful feedback! I really appreciate you taking the time to re-examine the changes and explain the reasoning behind each one — especially the confirmation that I'm glad the three changes make sense and are safe to merge:
No worries at all about the review timing — I completely understand how busy things get. Thanks again for your patience and for merging the PR! |
- Bump version to 0.3.1 across manifest.yaml and pyproject.toml - Update CHANGELOG and README with v0.3.1 release notes Changes included (from PRs beersoccer#46 and beersoccer#47 by sususweet): - Fix psycopg3 connection errors on Windows (gevent/ProactorEventLoop conflict) - Add WindowsSelectorEventLoopPolicy on win32 at plugin startup - Conditional psycopg deps: psycopg3 on Linux/macOS, psycopg2 on Windows - Raise WRITE_OPERATION_TIMEOUT 15s → 45s to reduce silent write failures - Add missing ollama dependency to pyproject.toml Co-authored-by: Cursor <cursoragent@cursor.com>

When this plugin is running or debugging on Windows platform, it may encounter psycopg3 connection issues, as the error log shown below:
"sending query failed: another command is already in progress, another command is already in progress"
So this PR changes the
WRITE_OPERATION_TIMEOUTto avoid slow database I/O and uses fallback to psycopg2 on Windows platform to enable plugin running and debugging on Windows.