Skip to content
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

3.20.0 seems to break marshmallow_sqlalchemy #2152

Closed
Cheaterman opened this issue Jul 20, 2023 · 4 comments · Fixed by #2153
Closed

3.20.0 seems to break marshmallow_sqlalchemy #2152

Cheaterman opened this issue Jul 20, 2023 · 4 comments · Fixed by #2153

Comments

@Cheaterman
Copy link

Cheaterman commented Jul 20, 2023

As you can see in the title, my CI just broke:

/env/lib/python3.11/site-packages/marshmallow_sqlalchemy/schema.py:143: in <module>
    class SQLAlchemySchema(
/env/lib/python3.11/site-packages/marshmallow/schema.py:116: in __new__
    klass._declared_fields = mcs.get_declared_fields(
E   TypeError: SQLAlchemySchemaMeta.get_declared_fields() missing 1 required positional argument: 'dict_cls'

Possibly an issue on their end more than yours, but someone had to report it somewhere. :-)

@alissonpelizaro
Copy link

alissonpelizaro commented Jul 20, 2023

Same here:

../../../.cache/pypoetry/virtualenvs/alertmanager-N7xkbwbh-py3.10/lib/python3.10/site-packages/marshmallow_sqlalchemy/__init__.py:9: in <module>
    from .schema import (
../../../.cache/pypoetry/virtualenvs/alertmanager-N7xkbwbh-py3.10/lib/python3.10/site-packages/marshmallow_sqlalchemy/schema.py:143: in <module>
    class SQLAlchemySchema(
../../../.cache/pypoetry/virtualenvs/alertmanager-N7xkbwbh-py3.10/lib/python3.10/site-packages/marshmallow/schema.py:116: in __new__
    klass._declared_fields = mcs.get_declared_fields(
E   TypeError: SQLAlchemySchemaMeta.get_declared_fields() missing 1 required positional argument: 'dict_cls'

Downgrading to 3.19 solve that.

@Cheaterman
Copy link
Author

Yeah I also downgraded temporarily ; but on second thought (and as opposed to what I originally wrote) I suppose this is part of public API given the lack of leading underscore, and probably something that shouldn't have broken on marshmallow's side?

jmsanders added a commit to dagster-io/dagster that referenced this issue Jul 20, 2023
marshmallow-code/marshmallow#2152

I think this release breaks part of sqlalchemy that airflow is using.
Let's pin until they have a fix so our builds stay green.
jmsanders added a commit to dagster-io/dagster that referenced this issue Jul 20, 2023
marshmallow-code/marshmallow#2152

I think this release breaks part of sqlalchemy that airflow is using.
Let's pin until they have a fix so our builds stay green.
@lafrech
Copy link
Member

lafrech commented Jul 20, 2023

Yep, my bad. Fix released.

Adding a default value to get_declared_fields is not a breaking change in itself. The issue was the removal of the dict_cls parameter used to call it from __new__ , which broke class overriding get_declared_fields.

Sorry about that.

Thanks for reporting immediately.

@techguydave
Copy link

Thanks for fixing this so quickly! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants