-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix subquerload deprecation #11180
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
base: main
Are you sure you want to change the base?
Fix subquerload deprecation #11180
Conversation
Change-Id: I3d1b844dee6dc29da4a6aaa0c2916e6a1178aaec
Change-Id: Id23713cb4c00fa25f8ac99b5b87259dd1e7ac56d
im actually not on board deprecating subquery eager loading right now. It's "legacy" for sure but i dont want to be that aggressive about it |
Maybe we can just be more clear in labelling it as legacy? |
Six months ago I would agree with you, but with the pace of SQLAlchemy changes and newer alternatives to sub query loading, I think it would be wise to mark this as deprecated and emit warnings now. It could enjoy an extra long deprecation period and even possibly never be removed due to its importance in legacy applications - but I think signaling to users “hey, this is deprecated and you should update your code” is important. iirc, it complicated typing some statements, and migrating to newer code resolved that. |
when you deprecate and especially when you add warnings, people make a big deal out of getting off that API. which here wouldnt be necessarily a bad thing. but subqueryload is really entrenched and it would be a bit of a panic, which is a bit in conflict with my desire for 2.1 to be a very easy upgrade for people. for example adding this warning will greatly slow down openstack's adoption of 2.1. |
maybe a compromise could be that we write that it's very legacy in 2.1 and we are considering deprecating it in a future release and that new code should not use it and existing code should consider moving to a different loader. |
yah that's what "legacy" is |
and we have that already: https://docs.sqlalchemy.org/en/20/orm/queryguide/relationships.html#subquery-eager-loading |
let's just remove it from https://docs.sqlalchemy.org/en/20/orm/queryguide/relationships.html#summary-of-relationship-loading-styles then? |
Change-Id: I3d1b844dee6dc29da4a6aaa0c2916e6a1178aaec
The deprecation info does not appear in 3 important sections:
This PR notes the deprecation in the overview, and adds links/deprecation docstrings to the functions so they should show up in the API docs.
Description
Checklist
This pull request is:
must include a complete example of the issue. one line code fixes without an
issue and demonstration will not be accepted.
Fixes: #<issue number>
in the commit messageinclude a complete example of how the feature would look.
Fixes: #<issue number>
in the commit messageHave a nice day!