nikolauspschuetz opened a new pull request, #70220:
URL: https://github.com/apache/airflow/pull/70220

   `BaseSerialization` handles `set` and `tuple` as first-class types but omits 
`frozenset`. Since `frozenset` is not a subclass of `set`, it falls through the 
type ladder to `default_serialization`, which `str()`-casts it:
   
   ```python
   from airflow.serialization.serialized_objects import BaseSerialization as B
   B.deserialize(B.serialize(frozenset({1, 2, 3})))
   # -> 'frozenset({1, 2, 3})'   (a str, not a frozenset)
   ```
   
   So any Dag param, operator argument, or XCom value containing a `frozenset` 
is silently corrupted into a string on round-trip. Every other module in the 
serialization subsystem already treats `frozenset` like `set` 
(`serialization/helpers.py`, `serialization/stringify.py`, and the task-sdk 
`serde` builtin serializer); only the core `BaseSerialization` type ladder 
forgot it.
   
   This adds `frozenset` handling mirroring the existing `set` path 
(encode/decode + a `DagAttributeTypes.FROZENSET` enum member), so a `frozenset` 
round-trips back to a `frozenset`.
   
   A regression row was added to the pure/offline `test_serialize_deserialize` 
parametrization — it fails before this change and passes after.
   
   (Happy to add a `newsfragment` if you'd like one; omitted per the "when in 
doubt, leave it to review" guidance.)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8)
   
   Generated-by: Claude Code (Opus 4.8) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

Reply via email to