Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/1623#issuecomment-50449220
Is there a way to do this that doesn't require PySpark to be imported
before the namedtuples are created? Can you directly replace the `__reduce__`
method on the `namedtuple` class? Alternatively, maybe you can register a new
`__reduce__` method using
[copy_reg](https://docs.python.org/2/library/copy_reg.html). Cloudpickle
doesn't use `copy_reg.pickle()` directly, so the actual fix might be
lower-level.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---