Return-Path: X-Original-To: apmail-incubator-allura-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 894961024C for ; Fri, 25 Oct 2013 21:09:16 +0000 (UTC) Received: (qmail 24218 invoked by uid 500); 25 Oct 2013 21:09:15 -0000 Delivered-To: apmail-incubator-allura-dev-archive@incubator.apache.org Received: (qmail 24203 invoked by uid 500); 25 Oct 2013 21:09:15 -0000 Mailing-List: contact allura-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-dev@incubator.apache.org Received: (qmail 24194 invoked by uid 99); 25 Oct 2013 21:09:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 21:09:14 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of noreply@sourceforge.net designates 216.34.181.60 as permitted sender) Received: from [216.34.181.60] (HELO smtp.ch3.sourceforge.com) (216.34.181.60) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 21:09:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.com; s=x; h=Date:Message-ID:Subject:Reply-To:From:To:MIME-Version:Content-Type; bh=QXgo3zuHh6TuffryZXCpdCARlgoFgp/xEZxSe8kxXQU=; b=ifIIJoqOK3Q3QiySjmceN1S6Qp+5Xnrnt9nWToCP39i26S55p+FJkm0cFB8VrADGBKxv1aMdbOS1I+TJcD94x2ktVlyWHwbxHJ/ewziJL/ysYflxV7d+G+cNiZEdEkySlbqy4+WYgH6B0ckArenD62VyVlvZwwrmka7D/ZmGf2s=; Received: from localhost ([127.0.0.1] helo=sfs-alluradaemon-3.v29.ch3.sourceforge.com) by sfs-alluradaemon-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1VZoch-0002Go-Lb for allura-dev@incubator.apache.org; Fri, 25 Oct 2013 21:08:47 +0000 Content-Type: multipart/related; boundary="===============3383808780525061815==" MIME-Version: 1.0 To: "[allura:tickets] " <6716@tickets.allura.p.re.sf.net> From: "Dave Brondsema" Reply-To: "[allura:tickets] " <6716@tickets.allura.p.re.sf.net> Subject: [allura:tickets] #6716 __json__ should return plain dicts Message-ID:

Date: Fri, 25 Oct 2013 21:08:47 +0000 X-Virus-Checked: Checked by ClamAV on apache.org --===============3383808780525061815== Content-Type: multipart/alternative; boundary="===============6027741337617468068==" MIME-Version: 1.0 --===============6027741337617468068== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit - **status**: code-review --> closed - **QA**: Dave Brondsema --- ** [tickets:#6716] __json__ should return plain dicts** **Status:** closed **Labels:** cleanup **Created:** Fri Sep 27, 2013 07:39 PM UTC by Dave Brondsema **Last Updated:** Wed Oct 23, 2013 08:54 PM UTC **Owner:** Cory Johns All `__json__` methods should return "plain" data structures. A particular example is that lists and dicts shouldn't be ming instrumented containers. Then it'll always be safe to modify the results without side effects (i.e. changing the database). Some sort of helper function seems like it would be useful. It should preserve certain types (e.g. datetime, int, float, etc) since those aren't any risk and are converted to json just fine by TurboGears --- Sent from sourceforge.net because allura-dev@incubator.apache.org is subscribed to https://sourceforge.net/p/allura/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/allura/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. --===============6027741337617468068== MIME-Version: 1.0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: 7bit
  • status: code-review --> closed
  • QA: Dave Brondsema

[tickets:#6716] json should return plain dicts

Status: closed
Labels: cleanup
Created: Fri Sep 27, 2013 07:39 PM UTC by Dave Brondsema
Last Updated: Wed Oct 23, 2013 08:54 PM UTC
Owner: Cory Johns

All __json__ methods should return "plain" data structures. A particular example is that lists and dicts shouldn't be ming instrumented containers. Then it'll always be safe to modify the results without side effects (i.e. changing the database).

Some sort of helper function seems like it would be useful. It should preserve certain types (e.g. datetime, int, float, etc) since those aren't any risk and are converted to json just fine by TurboGears


Sent from sourceforge.net because allura-dev@incubator.apache.org is subscribed to https://sourceforge.net/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/allura/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

--===============6027741337617468068==-- --===============3383808780525061815==--