Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18734#discussion_r130766049
  
    --- Diff: python/pyspark/cloudpickle.py ---
    @@ -397,42 +625,7 @@ def save_global(self, obj, name=None, 
pack=struct.pack):
     
             typ = type(obj)
             if typ is not obj and isinstance(obj, (type, types.ClassType)):
    -            d = dict(obj.__dict__)  # copy dict proxy to a dict
    -            if not isinstance(d.get('__dict__', None), property):
    -                # don't extract dict that are properties
    -                d.pop('__dict__', None)
    -            d.pop('__weakref__', None)
    -
    -            # hack as __new__ is stored differently in the __dict__
    -            new_override = d.get('__new__', None)
    -            if new_override:
    -                d['__new__'] = obj.__new__
    -
    -            # workaround for namedtuple (hijacked by PySpark)
    -            if getattr(obj, '_is_namedtuple_', False):
    -                self.save_reduce(_load_namedtuple, (obj.__name__, 
obj._fields))
    -                return
    -
    -            self.save(_load_class)
    -            self.save_reduce(typ, (obj.__name__, obj.__bases__, 
{"__doc__": obj.__doc__}), obj=obj)
    -            d.pop('__doc__', None)
    -            # handle property and staticmethod
    -            dd = {}
    -            for k, v in d.items():
    --- End diff --
    
    I assume we are fine per the tests added in 
https://github.com/apache/spark/commit/e044705b4402f86d0557ecd146f3565388c7eeb4.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to