From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OA6SE7DVjmQDRgAASxT56A (envelope-from ) for ; Sun, 18 Jun 2023 12:00:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8GWvE7DVjmSWmAAA9RJhRA (envelope-from ) for ; Sun, 18 Jun 2023 12:00:16 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D345B11E34 for ; Sun, 18 Jun 2023 12:00:15 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qApCZ-0007dK-OP; Sun, 18 Jun 2023 06:00:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qApCV-0007ck-Ll for guix-patches@gnu.org; Sun, 18 Jun 2023 06:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qApCV-0007qx-18 for guix-patches@gnu.org; Sun, 18 Jun 2023 06:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qApCU-00070A-9j for guix-patches@gnu.org; Sun, 18 Jun 2023 06:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64010] [PATCH v2] gnu: Add python-msgspec. References: In-Reply-To: Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Jun 2023 10:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64010 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64010@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 64010-submit@debbugs.gnu.org id=B64010.168708236726840 (code B ref 64010); Sun, 18 Jun 2023 10:00:02 +0000 Received: (at 64010) by debbugs.gnu.org; 18 Jun 2023 09:59:27 +0000 Received: from localhost ([127.0.0.1]:53235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qApBu-0006yq-JA for submit@debbugs.gnu.org; Sun, 18 Jun 2023 05:59:27 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:52330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qApBr-0006yZ-48 for 64010@debbugs.gnu.org; Sun, 18 Jun 2023 05:59:24 -0400 Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3094910b150so2204268f8f.0 for <64010@debbugs.gnu.org>; Sun, 18 Jun 2023 02:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687082357; x=1689674357; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=sz+PboTpQUEAIwOp76qmt8EGI8utOMbJt86dFMfW8Vo=; b=jd5uiwUbxlgq+2acp8nofKgrBoCRaCMcIbfhD3ekDfQsyHazDPZQDV/kCarohICrI3 3J9pH3eqDbwXP3W/nyqQQsIQFQ5KufMVdqYmaW2iIYGvpebU37BSGCRFvejuER4++aA9 Fd1XaKS0llv2aY+EivGO77C41SPk8aIg6exT/SW52DPS/HdQF/i0DMcrGRE2m7lG/oUa 7rOSX5GBtzIabyXOt7H5mk5uBoxN6XCiR3gaPRF9nm6EngW/w/NKndogd2plZjQXCFNC 6f7YULBh3o4W2VtVmSu9x21Pjg75kgeX3vhNhVXCBawUkxRH1Q6hkAUJWEYL7wAsVgfF MYoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687082357; x=1689674357; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sz+PboTpQUEAIwOp76qmt8EGI8utOMbJt86dFMfW8Vo=; b=Rfx9a5DPEeox1pE9tEvDH2qC7HemwQ4UUBJ/G4y7uAT2B29ERE3xTQ/1eht5uV616f HZy1pr2k7UOdKybTW9ZNOzKVAW4lLWUybf6l5wwkvlSFOt+26AQCLlnlIkCOofklRs0i RuNvi/MmfxJtWcuMaWwqpjU0/SwgAmXrOpHW8xVfWNEBM1W3+3fZ869fv6Tc6iybkwCn 6Ti/kC6pn6MksVCJe1DhYKq1dxNBLLgQvHvWByvpnz7glbs1Xy/4sVl/s5T0dANPGgh+ oHk9mwLB1U9ThNJV6BaaHEt6Qg3b2TqlSouDBTtOPlY0Ybotnsw54v6DvcxPFkqw1FZo IVTA== X-Gm-Message-State: AC+VfDySVTzhXKWGKQIdH+6XHFVZgKRY/ELBwPu4kANEsSHioIWbPRtW LQhQW7v9Bx34PIaPI3gSUzP3t/vf40c= X-Google-Smtp-Source: ACHHUZ7GVm3ekAAZ9JG49NPaYDYeyjvzdZSM3AlVtRWBXA+ihH6PY6zLLzj1NAodJ9nA/P1ZFkBENw== X-Received: by 2002:adf:ec43:0:b0:30f:aef1:2add with SMTP id w3-20020adfec43000000b0030faef12addmr5813241wrn.47.1687082356975; Sun, 18 Jun 2023 02:59:16 -0700 (PDT) Received: from guxtil.incerto.xyz (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id cr4-20020a05600004e400b003063a92bbf5sm28562189wrb.70.2023.06.18.02.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jun 2023 02:59:16 -0700 (PDT) From: Sharlatan Hellseher Date: Sun, 18 Jun 2023 10:59:13 +0100 Message-Id: <5f3b8f3c7b74f856587c73a43f2e25d9906410f5.1687082264.git.sharlatanus@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687082416; a=rsa-sha256; cv=none; b=O9QH5WhWdw945rTsJ+hIcYurN4JIxl7Ov4o60PFr98pzSs01qRxb12++TlIZBRPhj/oP9l JDq8r0OtZeTe9KaTEwBzck8N8RacNLHJQElMtU/Em33uGDb2whlUGFZu7mhfX3xTYPozAd TlFqI0+HKRdkTDYXX+s+zzc1s/bQCOfD+0pK1gCPlRbZTFsU/y89TlVWHJ/J/Qq6Rg7yOq +/gMiBi2mOGdiXjk14PZGFEh2siOzdvu+j+FYzYP6+NWcCRglCj3g8be2bC9UPdIHWVJh5 dBxNjGMAUAbDJR5JaTg1zNA3V7JZ47DRvlpbwULfCaXdQhUvKhpSnQk4F5jILw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=jd5uiwUb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687082416; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=sz+PboTpQUEAIwOp76qmt8EGI8utOMbJt86dFMfW8Vo=; b=cbMkdpHD5ntw5ZayRmTBt0exut/fGNjpFDZTfbVfeR90P+fQpJyXR27BH0tJPAsNY24dMn YFAeeRmYkoFlejtlc9izF+S7xDQgPTVxkTc7aPkEpxoDdHypCfpYzOEVgWlMsLnyghqcXS YEWYGl3ARD1cQs2YkkIFXy5zWsxnQCWFol/Sl7k+2qj1IaOcLjTNAsMFdAKTCNkfdANu/b 498l/UsGt95vP+5xK7FML5EBKoGxICIXJfTraDXWOcD/QRvT1R0zLrRKAkZmhv/9J9dCEU Sc14SgxcCqF2vkjLp/wmKV2yyHvxgrpp84CqAxgI2TzZPYneC3l7h15vTGn0Iw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=jd5uiwUb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -0.64 X-Spam-Score: -0.64 X-Migadu-Queue-Id: D345B11E34 X-TUID: mADXNWZFJt1j * gnu/packages/serialization.scm (python-msgspec): New variable. --- gnu/packages/serialization.scm | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 39954d6764..43c9473e95 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2020 Alexandros Theodotou ;;; Copyright © 2023 Alexey Abramov +;;; Copyright © 2023 Sharlatan Hellseher ;;; ;;; This file is part of GNU Guix. ;;; @@ -41,6 +42,7 @@ (define-module (gnu packages serialization) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages autotools) @@ -58,6 +60,8 @@ (define-module (gnu packages serialization) #:use-module (gnu packages lua) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-check) #:use-module (gnu packages python-science) #:use-module (gnu packages python-xyz) #:use-module (gnu packages perl)) @@ -613,6 +617,66 @@ (define-public capnproto RPC system. Think JSON, except binary. Or think Protocol Buffers, except faster.") (license license:expat))) +(define-public python-msgspec + (package + (name "python-msgspec") + (version "0.16.0") + (source (origin + ;; There are no tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/jcrist/msgspec") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "09q567klcv7ly60w9lqip2ffyhrij100ky9igh3p3vqwbml33zb3")))) + (build-system pyproject-build-system) + (arguments + (list + ;; Disable only one failing test. + ;; + ;; AssertionError: msgspec/structs.pyi:7: error: Positional-only parameters + ;; are only supported in Python 3.8 and greater + #:test-flags #~(list "-k" "not test_mypy") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'versioneer + (lambda _ + (invoke "versioneer" "install") + (substitute* "setup.py" + (("version=versioneer.get_version\\(),") + (format #f "version=~s," #$version)))))))) + ;; XXX: It might support more architectures but GitHub Actions listed only + ;; two right now. Try to build for the rest supported by Guix. + ;; See: + ;; https://github.com/jcrist/msgspec/blob/main/.github/workflows/ci.yml#L83 + (supported-systems (list "x86_64-linux" "aarch64-linux")) + (native-inputs (list python-attrs + python-gcovr + python-msgpack + python-mypy + python-pytest + python-setuptools-scm + python-versioneer)) + (propagated-inputs (list python-pyyaml python-tomli python-tomli-w)) + (home-page "https://jcristharif.com/msgspec/") + (synopsis + "Fast serialization/validation library for JSON, MessagePack, YAML, and TOML") + (description + "This package provides a fast serialization and validation library, with builtin +support for JSON, MessagePack, YAML, and TOML. It includes the following features: +@itemize +@item high performance encoders/decoders for common protocols. +@item support for a wide variety of Python types. Additional types may be +supported through extensions. +@item zero-cost schema validation using familiar Python type annotations. In +benchmarks msgspec decodes and validates JSON about 2x faster than @code{orjson} +can decode it alone. +@item a speedy Struct type for representing structured data. +@end itemize") + (license license:bsd-3))) + (define-public python-ruamel.yaml (package (name "python-ruamel.yaml") base-commit: 299f64adea72a4b360da54b0bffd06ee57a5517b -- 2.40.1