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
AttributeError after upgrading to 1.3.13 #5110
Comments
OK so I really do not want to encourage bug reports like these. the stack trace is helpful but if you can at least share the mappings, that will save me a lot of time. This is reproducible as I stepped through the stack trace and attempted to reproduce the conditions at each step and I then got a bit lucky on a few guesses. here is the test case, bisection coming next.
|
the issue does not appear in 1.4, only in 1.3. the commit that breaks it is 47f0aa4 which is the reference cycle refactor. The specific sub-commit within that breaks it is the path registry refactor in https://gerrit.sqlalchemy.org/#/c/sqlalchemy/sqlalchemy/+/1631/5..6 . The error so far seems to be that because PathRegistry does not have a |
1.4 is not failing beacuse eager loaders are not running within the refresh() and it is not clear why this is happening. may be a new issue. |
1.4 raises if we reduce the test to the below, which does run the joined loaders on the refresh:
|
OK in 1.4, the original test case does not run the eager loaders on the refresh because of https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#change-1763, where in this case the "lazyload()" option is taking effect. so this is intentional. but surprising, because this is a downgraded loader, not an upgraded one which is what the above change was intended to work with. |
Mike Bayer has proposed a fix for this issue in the master branch: InstanceState default path is RootRegistry, not tuple https://gerrit.sqlalchemy.org/1677 |
Mike Bayer has proposed a fix for this issue in the rel_1_3 branch: InstanceState default path is RootRegistry, not tuple https://gerrit.sqlalchemy.org/1678 |
Fixed regression caused in 1.3.13 by 🎫`5056` where a refactor of the ORM path registry system made it such that a path could no longer be compared to an empty tuple, which can occur in a particular kind of joined eager loading path. The "empty tuple" use case has been resolved so that the path registry is compared to a path registry in all cases; the :class:`.PathRegistry` object itself now implements ``__eq__()`` and ``__ne__()`` methods which will take place for all equality comparisons and continue to succeed in the not anticipated case that a non- :class:`.PathRegistry` object is compared, while emitting a warning that this object should not be the subject of the comparison. Fixes: #5110 Change-Id: I6cab6cd771c131d12b17939b369212f12c6bee16 (cherry picked from commit f5eeac3)
Has the fix for this issue been pushed to PyPi SQLAlchemy 1.3.13? We are still seeing the error in 1.3.13 (not 1.3.12). Traceback (most recent call last): |
1.3.13 is the version that the issue was reported against, it's in the title of the bug :) the standard way to deal with a pending fix is to exclude sqlalchemy==1.3.13 in your requirements.txt file so that when 1.3.14 comes out it will upgrade to the next working version. |
Thank you. I misinterpreted sqlalchemy-bot closed this in f5eeac3 19 days ago as being fixed in 1.3.13. Thank you for the clarification. |
I don’t know if this somehow affects the problem, but I use Flask-SQLAlchemy.
The part of code is as follows:
After upgrading SQLAlchemy version from 1.3.12 to 1.3.13 I got the following exception traceback:
@zzzeek unfortunately, right now I don't have time to prepare an example that reproduces the problem, but I hope you'll be able to understand what is the reason.
The text was updated successfully, but these errors were encountered: