-
Notifications
You must be signed in to change notification settings - Fork 14.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
Use MyPy support for SQLAlchemy #20484
Comments
Except we're still on 1.3 😔 |
Yeah :( Which dep is causing us to stay on <1.4, I can't remember anymore |
Flask-Appbuilder ... 😢 |
Ehhhh |
Actually, it looks like it is because of pallets-eco/flask-sqlalchemy#1001 that FAB has to still use <1.4. FAB Issue: dpgaspar/Flask-AppBuilder#1710 |
Very apt XKCD 😄 |
@kaxil I noticed they deleted your comment and locked the convo... petition to start an opensource war? |
I started a few already, some of them with success .... some of them ... not yet. Maybe time for another one ;) |
Please, use that Apache clout 🤣 |
I took a look at the code path and tried an alternative fix that does not need to involve the Pallets team (since they do not seem to be interested in supporting this): dpgaspar/Flask-AppBuilder#1783 |
so isn't this done now via dpgaspar/Flask-AppBuilder#1786 ? |
It's in https://pypi.org/project/Flask-AppBuilder/3.4.4rc1/ - so as soon as it's released we will be able to switch to it. |
hi just an FYI, the SQLAlchemy mypy plugin is not going anywhere but in the 2.0 series of SQLAlchemy we hope to have a completely plugin-less approach to typing in place and the mypy plugin itself should become legacy. bugs within the mypy plugin that don't have an easy fix we will likely just "wontfix". so support the plugin sure but don't get too reliant on it. |
dpgaspar/Flask-AppBuilder/releases/tag/v3.4.4 the fix has now been released - it would be nice to be able to update sqlalchemy to 1.4 since we have some other dependencies that we would like to update and they require 1.4. |
We did already - but currently we are dealing with the aftermath of it - there are couple of things that broke even our PRs and main builds and we are a bit scrambling to get the full SQLAlchemy 1.4 compatibility (and FAB 3.4.4 compatibility) in There are many issues: #20874 #19294 #21294 #21296 #21272 Until those are fixed and our BTW. If you want you are most welcome to help with any of the above (see the comments to find out how and if you can help) or even attempt to work on adding MyPy support n Parallel. |
@saulbein - maybe you would like to add support for MyPY - seems that most of the problems with SQLAlchemy 1.4 have been addresse,d you could take care about it ? |
go ahead. There is still an issue with going beyond SQLAlchemy 4.1.9 (but It should not clash with mypy support) |
@potiuk I would like to help, but sadly I don't know much (if at all) about Flask-AppBuilder and can't allocate enough time to learn with other work 😞. I'll see if I can at least contribute some typing. |
@potiuk I apologize, I just saw this now. I'm going on vacation until the 7th and I will try to tackle this after that time. If anyone wants to assign to themselves, please feel free. Otherwise I will make sure to get this done then. |
How about now :) ? |
@potiuk Finally getting back to this. Just wanted to note that the docs listed in the description state that there will be native type checking without the use of the plugin when 2.0 is released and it is now considered a legacy library. I'll just add that change however and add a note in the setup.cfg. |
Cool |
https://docs.sqlalchemy.org/en/20/orm/extensions/mypy.html
I guess we should wait till after we bump to 2.0 (after we completely remove 1.4)? #28723 |
Body
https://docs.sqlalchemy.org/en/14/orm/extensions/mypy.html describes how type checking can be used with SQLAlchemy.
This is possible after we bump the SQLAlchemy version to 1.4+
The text was updated successfully, but these errors were encountered: