kacpermuda commented on code in PR #75860:
URL: https://github.com/apache/airflow/pull/75860#discussion_r4403845966


##########
providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:
##########
@@ -951,8 +953,13 @@ def _include_fields(self):
                     "nor is defined as an attrs class."
                 )
             for field, val in obj_fields.items():
+                # Keys that aren't identifiers are set by libraries rather 
than being attributes, e.g. the
+                # unpicklable ``__wire|<class>|<method>`` caches of 
``methodtools.lru_cache``.
+                if not field.isidentifier():
+                    continue
                 if field not in self._fields and field not in self.excludes 
and field not in self.renames:
-                    setattr(self, field, val)
+                    # Any attribute may hold live Airflow objects, even nested 
ones that can't be pickled
+                    setattr(self, field, 
_convert_to_json_safe(self._cast_basic_types(val), field))

Review Comment:
   addressed in last commit, thanks !



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