13129 opened a new issue, #54952:
URL: https://github.com/apache/airflow/issues/54952
### Apache Airflow version
3.0.5
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
**There is no problem with airflow3.0.3
There is a problem when executing the following code**
### What you think should happen instead?
```
[2025-08-26, 15:18:12] ERROR - Task failed with exception: source="task"
NotImplementedError: Objects of type <class
'pydantic_core._pydantic_core.SerializationIterator'> are not supported
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/task_runner.py",
line 918 in run
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/task_runner.py",
line 1213 in _execute_task
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/bases/operator.py",
line 397 in wrapper
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/bases/decorator.py",
line 251 in execute
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/bases/operator.py",
line 397 in wrapper
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/standard/operators/python.py",
line 217 in execute
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/standard/operators/python.py",
line 240 in execute_callable
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/callback_runner.py",
line 81 in run
File "/opt/airflow/dags/sensor_triggerer/bbb.py", line 23 in push_objects
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/task_runner.py",
line 414 in xcom_push
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/task_runner.py",
line 561 in _xcom_push
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/bases/xcom.py",
line 75 in set
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/common/io/xcom/backend.py",
line 146 in serialize_value
File "/home/airflow/.local/lib/python3.12/site-packages/upath/core.py", line
762 in exists
File "/home/airflow/.local/lib/python3.12/site-packages/upath/core.py", line
288 in fs
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/io/path.py",
line 110 in _fs_factory
File "/usr/local/lib/python3.12/functools.py", line 998 in __get__
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/io/store.py",
line 63 in fs
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/io/__init__.py",
line 108 in get_fs
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/amazon/aws/fs/s3.py",
line 60 in get_fs
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/amazon/aws/hooks/base_aws.py",
line 705 in get_session
File "/usr/local/lib/python3.12/functools.py", line 998 in __get__
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/amazon/aws/hooks/base_aws.py",
line 638 in conn_config
File "<string>", line 9 in __init__
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/amazon/aws/utils/connection_wrapper.py",
line 201 in __post_init__
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/definitions/connection.py",
line 162 in extra_dejson
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/secrets_masker.py",
line 130 in mask_secret
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/comms.py",
line 187 in send
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/comms.py",
line 145 in as_bytes
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/comms.py",
line 122 in _msgpack_enc_hook
AttributeError: _fs_cached
File "/home/airflow/.local/lib/python3.12/site-packages/upath/core.py", line
286 in fs
File "/home/airflow/.local/lib/python3.12/site-packages/upath/core.py", line
463 in __getattr__
[2025-08-26, 23:18:12] INFO - Size of small object: 168: chan="stdout":
source="task"
[2025-08-26, 23:18:12] INFO - Size of big object: 3312: chan="stdout":
source="task"
```
### How to reproduce
```python
"""
## Toy DAG to show size dependant custom XCom serialization
This DAG pushes two dicts to XCom, one below, one above 1000 bytes.
It then pulls them and prints their sizes.
"""
from airflow.sdk import chain, dag, task
@dag(doc_md=__doc__)
def custom_xcom_backend_test():
@task
def push_objects(**context) -> None:
"""Create a small and a big dictionary, print their sizes and push
them to XCom."""
small_obj = {"a": 23}
big_obj = {f"key{i}": "x" * 100 for i in range(100)}
print(f"Size of small object: {small_obj.__sizeof__()}")
print(f"Size of big object: {big_obj.__sizeof__()}")
context["ti"].xcom_push(key="small_obj", value=small_obj)
context["ti"].xcom_push(key="big_obj", value=big_obj)
@task
def pull_objects(**context) -> None:
"""Pull the small and big dictionaries from XCom and print their
sizes."""
small_obj = context["ti"].xcom_pull(task_ids="push_objects",
key="small_obj")
big_obj = context["ti"].xcom_pull(task_ids="push_objects",
key="big_obj")
print(f"Size of small object: {small_obj.__sizeof__()}")
print(f"Size of big object: {big_obj}")
chain(push_objects(), pull_objects())
custom_xcom_backend_test()
```
### Operating System
docker image
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]