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

Use attrs instead of cattrs in extra links (de)serialization #34672

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

Taragolis
Copy link
Contributor

@Taragolis Taragolis commented Sep 28, 2023

closes: #26130

Might also help to resolve

# pyupgrade assumes all type annotations can be lazily evaluated, but this is
# not the case for attrs-decorated classes, since cattrs needs to evaluate the
# annotation expressions at runtime, and Python before 3.9.0 does not lazily
# evaluate those. Putting the expression in a top-level assignment statement
# communicates this runtime requirement to pyupgrade.
BaseOperatorClassList = List[Type[BaseOperator]]

This changes should not produce breaking changes, in most worst scenario it required reserialize all DAGs


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@bolkedebruin
Copy link
Contributor

Note: this is not serde but the legacy serialization.

@Taragolis
Copy link
Contributor Author

Note: this is not serde but the legacy serialization.

Should we consider to move it into the airflow/serialization/serializers as follow up?

@Taragolis Taragolis changed the title Replace cattrs SerDe for extra links by attrs.asdict Use attrs instead of cattrs in extra links (de)serialization Sep 29, 2023
@uranusjr uranusjr merged commit e5238c2 into apache:main Oct 5, 2023
65 of 66 checks passed
@Taragolis Taragolis deleted the serde-extra-links branch October 5, 2023 12:00
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Oct 27, 2023
@ephraimbuddy ephraimbuddy added this to the Airflow 2.8.0 milestone Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools area:serialization changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove cattrs from project
5 participants