-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: #1276 add Asyncio SQLAlchemy support #1633
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments; Also, it seems the tests fail even for supported Python runtime versions. Could you check the issue?
4be23e7
to
bdcea76
Compare
@seratch will look into that probably today. The problem is that my tests are passing, it just something happens later in tests that they are braking - I think it's somehow related to retrieving asyncio loop by std library. |
bdcea76
to
69822e9
Compare
I've identified the source of the test failures @seratch. The original async_test helper created a single event loop and set it globally, which was the core of the problem. I assume I have to still rework this to make it work with Python 3.6 and 3.7 so in the end I will revert that - but it was nice to find root cause of this. |
…nto feature/async-sqlalchemy
I've tested locally now with support from Python 3.6/3.7 Testing with Python 3.7 I got
On my M1 Macbook. |
@seratch not sure why the test on 3.13 fail - but looks like some flaky test - it passed here on same commit: Can we re run those? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1633 +/- ##
==========================================
+ Coverage 85.06% 85.19% +0.12%
==========================================
Files 113 113
Lines 12665 12823 +158
==========================================
+ Hits 10774 10924 +150
- Misses 1891 1899 +8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me; thank you so much for taking the time to complete this PR!
We will add one more minor change to the next release, which includes your contribution. Until it's released, please copy and paste these source files in your project. |
Don't need to copy paste ;) - in [project]
name = "ProjectName"
dependencies = [
"slack-bolt>=1.21.3",
"slack-sdk",
"sqlalchemy[asyncio]>=2.0.36",
]
[tool.uv]
dev-dependencies = [
"pytest>=8.3.4",
]
[tool.uv.sources]
slack-sdk = { git = "https://github.com/galuszkak/python-slack-sdk", branch = "feature/async-sqlalchemy" } |
Ah, yeah it sounds great! |
Summary
Add support for Asyncio SQLAlchemy Installation and StateStore
Testing
Category
/docs
(Documents)/tutorial
(PythOnBoardingBot tutorial)tests
/integration_tests
(Automated tests for this library)Requirements
python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh
after making the changes.