-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[BUGFIX] fix sqlalchemy import #9872
Conversation
✅ Deploy Preview for niobium-lead-7998 canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9872 +/- ##
===========================================
- Coverage 77.99% 77.99% -0.01%
===========================================
Files 495 495
Lines 42537 42539 +2
===========================================
+ Hits 33176 33177 +1
- Misses 9361 9362 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -64,6 +64,9 @@ | |||
if not LegacyRow: | |||
LegacyRow = SQLALCHEMY_NOT_IMPORTED | |||
|
|||
if not Row: |
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.
This and the above LegacyRow
conditional should not be necessary, the compatibility file already does this . SQLALCHEMY_NOT_IMPORTED
evaluates to False
so this should just be overwriting Row
with the same thing.
Could you remove this and try with just your change below? You could also verify this here by checking if Row
is already equal to SQLALCHEMY_NOT_IMPORTED
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.
that makes sense to me, but unfortunately it isn't the case. If we remove those null checks SQLALCHEMY_NOT_IMPORTED
raises a ModuleNotFoundError
because something is calling __getattr__
on SQLALCHEMY_NOT_IMPORTED
. Seems like something isn't quite working as expected, but not clear what, so i'll defer looking further and go with the established pattern.
Due to a recent change,
convert_to_json_serializable
errors if sqlalchemy is not installed.