amoghrajesh commented on code in PR #70558:
URL: https://github.com/apache/airflow/pull/70558#discussion_r3712507895
##########
task-sdk/tests/task_sdk/serde/test_serializers.py:
##########
@@ -289,12 +289,18 @@ def test_pandas_serializers(self):
@pytest.mark.parametrize(
("klass", "version", "data", "msg"),
[
- (pd.DataFrame, 999, "", r"serialized 999 of
pandas.core.frame.DataFrame > 1"), # version too new
+ # pandas 3 qualifies the class as pandas.DataFrame, pandas 2 as
pandas.core.frame.DataFrame
+ (
+ pd.DataFrame,
+ 999,
+ "",
+ r"serialized 999 of pandas(\.core\.frame)?\.DataFrame > 1",
+ ), # version too new
Review Comment:
The round-trip test and the error message tests only exercise whichever
pandas major is installed.
Maybe we should add a test that manufactures an encoded payload with the
older version too.(eg: `pandas.core.frame.DataFrame` as CLASSNAME and assert
deserialize() succeeds while running under pandas 3, and the reverse).
--
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]