Return-Path: X-Original-To: apmail-spark-reviews-archive@minotaur.apache.org Delivered-To: apmail-spark-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1A76112FC for ; Tue, 29 Jul 2014 08:34:28 +0000 (UTC) Received: (qmail 73360 invoked by uid 500); 29 Jul 2014 08:34:28 -0000 Delivered-To: apmail-spark-reviews-archive@spark.apache.org Received: (qmail 73339 invoked by uid 500); 29 Jul 2014 08:34:28 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@spark.apache.org Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 73328 invoked by uid 99); 29 Jul 2014 08:34:28 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2014 08:34:28 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id EAFBE9B9BF5; Tue, 29 Jul 2014 08:34:27 +0000 (UTC) From: JoshRosen To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org References: In-Reply-To: Subject: [GitHub] spark pull request: [SPARK-1687] [PySpark] pickable namedtuple Content-Type: text/plain Message-Id: <20140729083427.EAFBE9B9BF5@tyr.zones.apache.org> Date: Tue, 29 Jul 2014 08:34:27 +0000 (UTC) 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---