From patchwork Wed Apr 20 17:28:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Gruber X-Patchwork-Id: 38705 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D978427BBE9; Wed, 20 Apr 2022 18:29:39 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 55C6A27BBEA for ; Wed, 20 Apr 2022 18:29:39 +0100 (BST) Received: from localhost ([::1]:35570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhE94-0008Ji-FH for patchwork@mira.cbaines.net; Wed, 20 Apr 2022 13:29:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhE8W-0007Q7-Hh for guix-patches@gnu.org; Wed, 20 Apr 2022 13:29:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhE8W-0003Co-6U for guix-patches@gnu.org; Wed, 20 Apr 2022 13:29:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nhE8W-0006Jd-3i for guix-patches@gnu.org; Wed, 20 Apr 2022 13:29:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55044] [PATCH 4/8] gnu: Add python-itemadapter. Resent-From: Felix Gruber Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 20 Apr 2022 17:29:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55044 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55044@debbugs.gnu.org Cc: Felix Gruber Received: via spool by 55044-submit@debbugs.gnu.org id=B55044.165047571624167 (code B ref 55044); Wed, 20 Apr 2022 17:29:04 +0000 Received: (at 55044) by debbugs.gnu.org; 20 Apr 2022 17:28:36 +0000 Received: from localhost ([127.0.0.1]:47345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhE84-0006Hb-GP for submit@debbugs.gnu.org; Wed, 20 Apr 2022 13:28:36 -0400 Received: from mout02.posteo.de ([185.67.36.66]:47707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhE7w-0006GZ-Is for 55044@debbugs.gnu.org; Wed, 20 Apr 2022 13:28:28 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 02598240108 for <55044@debbugs.gnu.org>; Wed, 20 Apr 2022 19:28:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1650475703; bh=Az/TISPeffBaA33+1O2pIblQHlWltkiORHzFOR2CZSw=; h=From:To:Cc:Subject:Date:From; b=N6UPGkbnJKPUoCWXvI6/J4ale0i71plLhiBne0QGrCYD23MBBmoNNewyVvQHybglY 6TQzFQvjdrZyZ7M7cvIiExeVPoCO73lGpMvdcB2fHHlWoAK5luSQuhmFFrcbVbsNXT 07q8+UnVtZSjD4KWqTKGv4+pWxuivGwdun6DYQYgRJGkeubSLBYjxcX4IEhq1rGVbH 8gbtyxy5oINNAFdCGcr5ZK8r9nPVpafBH4a9pi0JikdKKz8AhXUzuQ7Z7QyCUrlUPN VvEj2WeXNFOPw2Wl4xmHJx3xC2BFKGwQ+Ie1D1pwkdyQu1b9FdvYoWMluLJL16tX5q CDj58o6oSVe0A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Kk71L3bnLz9rxX; Wed, 20 Apr 2022 19:28:22 +0200 (CEST) From: Felix Gruber Date: Wed, 20 Apr 2022 17:28:00 +0000 Message-Id: <20220420172804.8849-4-felgru@posteo.net> In-Reply-To: <20220420172518.8609-1-felgru@posteo.net> References: <20220420172518.8609-1-felgru@posteo.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-itemadapter): New variable. --- gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 6c1aee8695..a7f7cc91de 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -29589,3 +29589,33 @@ Queuelib provides collections for queues (FIFO), stacks (LIFO), queues sorted by priority and queues that are emptied in a round-robin fashion.") (license license:bsd-3))) + +(define-public python-itemadapter + (package + (name "python-itemadapter") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "itemadapter" version)) + (sha256 + (base32 "083wp3h2brh8x19jbdr8rz3biqwp3jlqd0rfzcyrjyhssffsgdh5")))) + (build-system python-build-system) + (home-page "https://github.com/scrapy/itemadapter") + (synopsis "Common interface for data container classes") + (description "The ItemAdapter class is a wrapper for data container +objects, providing a common interface to handle objects of different +types in an uniform manner, regardless of their underlying implementation. + +Currently supported types are: +@itemize +@item scrapy.item.Item +@item dict +@item dataclass-based classes +@item attrs-based classes +@item pydantic-based classes +@end itemize + +Additionally, interaction with arbitrary types is supported by +implementing a pre-defined interface.") + (license license:bsd-3)))