Workaround for importing ScalarAttributeImpl on SQLA2.1#804
Workaround for importing ScalarAttributeImpl on SQLA2.1#804Dev-iL wants to merge 1 commit intokvesteri:masterfrom
ScalarAttributeImpl on SQLA2.1#804Conversation
|
@Dev-iL It looks like sqlalchemy has an example that we should probably be following (and that base example appears to have existed in sqlalchemy 1.4 as well). I think that instead of causing this to fail on new versions of sqlalchemy, this PR should instead migrate the code to incorporate the example that sqlalchemy has defined. From the maintainers of sqlalchemy --
I'm closing this PR because it causes an outright failure on new versions of sqlalchemy instead of migrating the code to supported usage. |
The failure is already present. The suggested workaround turns the import-time error, into a runtime error. In other words, on SQLA2.1 sqlalchemy-utils can't even be imported at the moment since the broken import happens at the top level I think it is a suitable solution as a temporary measure until the "proper" way that you mentioned is implemented. Of course it wouldn't hurt to mention this behavior explicitly in the docs. |
Handle the below by disabling the
GenericAttributeImplclass on SQLA2.1:Note: although it looks like a lot has changed, this PR only adds ~10 lines and the rest are indentation changes.
Related #800, #803