-
-
Notifications
You must be signed in to change notification settings - Fork 3k
SQLAlchemy plugin has "AssertionError: Synthetic types don't serialize" starting with 1.11.0 - no idea how to fix #17548
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
Comments
if you want to reproduce this, here are the steps:
|
Oof, I wish I saw this before I uploaded mypy 1.11.x to Debian @zzzeek Do you think this is just a failure of how the tests are run, or do you think this also affects the regular functionality of sqlalchemy? That is to say, would it be safe for the Debian package of sqlalchemy to ignore these tests for now? |
It's unclear at the moment. No one reported issues for the moment, and the fix for another issue that rendered the plugin unusable is not yet released. It's likely that the plugin is not used a lot |
Most likely this is fixed on latest master. Please feel free to re-open if it's not fixed on master. |
I can confirm this is fixed on master, thanks! |
In SQLAlchemy's mypy plugin , we have custom attributes that are serialized, using code that is taken directly from Mypy's own dataclasses plugin:
as of mypy 1.11.0 we are getting this stack trace when an
UnboundType
is serialized:I looked at mypy's source to see if this was new, however, that assertion seems to be 6 years old.
pdbing, if I come into the place where this happens, the type that fails is:
When using mypy 1.10.1, this type can be serialized:
so....I have no idea what to do here. Can this type just do what it used to do? I dont see how this is making things better to just throw an error for a serialization that has no reason it can't be serialized.
The text was updated successfully, but these errors were encountered: