uranusjr commented on code in PR #64243:
URL: https://github.com/apache/airflow/pull/64243#discussion_r2999732915
##########
task-sdk/src/airflow/sdk/definitions/asset/__init__.py:
##########
@@ -404,6 +407,20 @@ def normalized_uri(self) -> str | None:
except ValueError:
return None
+ @property
+ def extra(self) -> dict[str, JsonValue]:
+ # No warning here; a warning is shown when the value is set.
+ return self._extra
+
+ @extra.setter
+ def extra(self, value: dict[str, JsonValue]) -> None:
+ warnings.warn(
+ "Asset.extra is deprecated and will be removed in the future.",
+ RemovedInAirflow4Warning,
+ stacklevel=2,
+ )
+ self._extra = value
Review Comment:
Honestly I am not even sure when `DeprecatedImportWarning` should be used (I
guess on imports…? And it also still implies removal on Airflow 4…?) But this
is not supposed to be triggered on an import anyway so
`RemovedInAirflow4Warning` is definitely the right one to use.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]