fix: add explicit greenlet dependency for SQLAlchemy async support#27
fix: add explicit greenlet dependency for SQLAlchemy async support#27szerintedmi wants to merge 1 commit intocodingworkflow:mainfrom
Conversation
Review Summary by QodoAdd explicit greenlet dependency for SQLAlchemy async
WalkthroughsDescription• Add explicit greenlet>=3.0.0 dependency for SQLAlchemy async support • Resolves missing module errors on macOS when running make start • Ensures greenlet is installed as direct dependency, not transitive Diagramflowchart LR
A["SQLAlchemy async features"] -- "requires at runtime" --> B["greenlet"]
C["pyproject.toml"] -- "adds explicit dependency" --> B
B -- "fixes missing module error" --> D["make start succeeds"]
File Changes1. pyproject.toml
|
Summary of ChangesHello @szerintedmi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical issue where SQLAlchemy's asynchronous capabilities, particularly when used with Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
📝 WalkthroughWalkthroughAdded Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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 |
There was a problem hiding this comment.
Code Review
This pull request correctly addresses a runtime dependency issue by explicitly adding greenlet for SQLAlchemy's async support. The change is necessary and well-justified. I've included one suggestion to add a comment to pyproject.toml to improve long-term maintainability by making the reason for this dependency clear directly in the configuration.
| "python-multipart>=0.0.6", | ||
| "pydantic-settings>=2.1.0", | ||
| "sqlalchemy>=2.0.23", | ||
| "greenlet>=3.0.0", |
There was a problem hiding this comment.
For better long-term maintainability, it's good practice to add a comment explaining why this explicit dependency is needed. This helps future developers understand the context without having to dig through git history. greenlet is required for SQLAlchemy's async support but isn't always installed as a transitive dependency, which is not immediately obvious.
| "greenlet>=3.0.0", | |
| # Required for SQLAlchemy async support (e.g., with aiosqlite) | |
| "greenlet>=3.0.0", |
Code Review by Qodo
1. setup.py omits greenlet
|
SQLAlchemy's async features (used with aiosqlite) require greenlet at runtime, but it's not always installed as a transitive dependency. This caused make start to fail on macOS with a missing module error. Added greenlet>=3.0.0 to both pyproject.toml and setup.py to ensure consistent installs across PEP517 and legacy/Docker fallback paths.
c3e8125 to
f092e04
Compare
|
@szerintedmi thanks for feedback. |
|
Closing as superseded by #32, which is merged and includes the dependency/install matrix validation and the greenlet runtime dependency fix on . |
|
@szerintedmi thank you and you are welcome if you have feedback. Hope to make this working and useful. |
Summary
greenlet>=3.0.0as an explicit dependency inpyproject.tomlProblem
SQLAlchemy's async features (used with
aiosqlite) requiregreenletat runtime, but it's not always installed as a transitive dependency. This causedmake startto fail on macOS with a missing module error.Test plan
make startruns without import errors on macOSSummary by CodeRabbit