From patchwork Thu Oct 10 08:39:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Anavi X-Patchwork-Id: 50208 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FCF1CF07C7 for ; Thu, 10 Oct 2024 08:39:58 +0000 (UTC) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by mx.groups.io with SMTP id smtpd.web11.38824.1728549592709164343 for ; Thu, 10 Oct 2024 01:39:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=fDU5n/M7; spf=pass (domain: konsulko.com, ip: 209.85.208.45, mailfrom: leon.anavi@konsulko.com) Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5c87c7d6ad4so817257a12.3 for ; Thu, 10 Oct 2024 01:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1728549591; x=1729154391; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gxvGVBjQ+OA8PZdtiPcNQR2OzalYbL84Vu72PsHpRj4=; b=fDU5n/M73iQDOYgoC+YBXtkVx/SH8t9Y5uH9Tmy4V4LJ+pGnfxJ3YJKD0qVejjKSfZ br8wHW5HBA1Xk9dX2Yx99JQhkmyjY0Lxa4cjlayH4r7+OtjWcjhFWealIh50cs+ByMA9 Gm/qf4Tz+k61HoLCIDM+f1raCFx9VNi5jWEQI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728549591; x=1729154391; 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=gxvGVBjQ+OA8PZdtiPcNQR2OzalYbL84Vu72PsHpRj4=; b=otgfHozQlFQWYqU1UUtLK5lq+7GqFDvj5p+53QJ7oZFTXIMh+LQt97RPz8m0yFTnqn 4+01PRAMYP9eKaLoLxH9CsCkNBePBcOOA0ZPRtCPmLCiMKxdRfJPHSiOeQY+oBbkmKC4 aGl1aq7r6sdFC6OiREJVjLR9Nwy2NJrdnVAcNn4jhfyJ8cKikhYpiIGpPsP4ra6DSIxC AOq7fPN+xecztMPPpTngrETkcREQtgJbJEPCRSfvV8m4SpiVZ8YxuELZ+xDKiijPU0If /qGs8xzipNKHnnpNXe4jpgCeXst6Jxk3WtywTyZz+/0loTpOzEZwgCqbPW9joRNa+iUV NpHg== X-Gm-Message-State: AOJu0YzoGSEBLof/aXQoUMx93iqkNYfzKm+nrxRmlEMvqpvE1crzfv3/ hCAQ0cOs3bGbr4jmzO8oBW9dN5zp9mnzzHvBJSOeY1BF8l8rDx7KI7ffgZTmGQccCIYHda8fvO4 y X-Google-Smtp-Source: AGHT+IFjY6XZItqGG9JrK6IkROA5wOlUOq2MJj7H3GlZbaqDpo7JcEbDcOx9gdJbBFkLuvDBzcLsbQ== X-Received: by 2002:a05:6402:27d0:b0:5c8:9515:cc1 with SMTP id 4fb4d7f45d1cf-5c91d53cfaamr4028044a12.7.1728549590720; Thu, 10 Oct 2024 01:39:50 -0700 (PDT) Received: from tone.k.g (lan.nucleusys.com. [92.247.61.126]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c937153939sm476047a12.47.2024.10.10.01.39.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 01:39:50 -0700 (PDT) From: Leon Anavi To: openembedded-devel@lists.openembedded.org Cc: Leon Anavi Subject: [meta-python][PATCH 1/3] python3-toolz: Upgrade 0.12.1 -> 1.0.0 Date: Thu, 10 Oct 2024 11:39:45 +0300 Message-Id: <20241010083947.7303-1-leon.anavi@konsulko.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Oct 2024 08:39:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/112763 Upgrade to release 1.0.0: - Test fixes for changes in recent upstream Python - Drop Python 3.7 - Test against Python 3.13 - Update docs Signed-off-by: Leon Anavi --- .../python/{python3-toolz_0.12.1.bb => python3-toolz_1.0.0.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta-python/recipes-devtools/python/{python3-toolz_0.12.1.bb => python3-toolz_1.0.0.bb} (79%) diff --git a/meta-python/recipes-devtools/python/python3-toolz_0.12.1.bb b/meta-python/recipes-devtools/python/python3-toolz_1.0.0.bb similarity index 79% rename from meta-python/recipes-devtools/python/python3-toolz_0.12.1.bb rename to meta-python/recipes-devtools/python/python3-toolz_1.0.0.bb index f1763ee51..ec67a4b16 100644 --- a/meta-python/recipes-devtools/python/python3-toolz_0.12.1.bb +++ b/meta-python/recipes-devtools/python/python3-toolz_1.0.0.bb @@ -4,7 +4,7 @@ SECTION = "devel/python" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca09cab178326d18433aae982d1edf5d" -SRC_URI[sha256sum] = "ecca342664893f177a13dac0e6b41cbd8ac25a358e5f215316d43e2100224f4d" +SRC_URI[sha256sum] = "2c86e3d9a04798ac556793bced838816296a2f085017664e4995cb40a1047a02" inherit pypi setuptools3 From patchwork Thu Oct 10 08:39:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Anavi X-Patchwork-Id: 50207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CF88CF07C4 for ; Thu, 10 Oct 2024 08:39:58 +0000 (UTC) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mx.groups.io with SMTP id smtpd.web10.38721.1728549593913824771 for ; Thu, 10 Oct 2024 01:39:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=UX7mkTSQ; spf=pass (domain: konsulko.com, ip: 209.85.167.48, mailfrom: leon.anavi@konsulko.com) Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-53995380bb3so794594e87.1 for ; Thu, 10 Oct 2024 01:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1728549592; x=1729154392; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VuoFnM7lELNdPCaJ7RCd7VQsUISFD7fSaJLSco7yTCM=; b=UX7mkTSQomZTOpYBrqmVFRfxTvq/l2nVgEoceq6fIlwRuyE7WhL0eH8hzoi4i+//PT MiVg7D4PEyWzk5C3S5TPOvPr0e11cInQmtqQEINwCe4Zl5d3OID4hO2LTTUOILP8mbZm xY8o4FxKNzS3HDOkHkMdFdFAhQdkZ2qJCADMc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728549592; x=1729154392; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VuoFnM7lELNdPCaJ7RCd7VQsUISFD7fSaJLSco7yTCM=; b=uA7OaR3DC4z74yBKcbSYF3dH9Udd3pCP0vhcoKFzUQYAKPqDBy/SgKr4TcV/qqhRVJ PpkskrJopQXmUvgurlE4uIboZxk11hugXHYKXLVgLiz5fYpngLRmkn7DnzhXZVPDhDPV A5ojGRPSbPiKs2I/qr9TVHjSIP1Jz18rkJDfWXPqtuZIzDf3XaBfieDcH4cmzIK+ETcV U0J3PTlYT7uEhbCQ3cQDLJqkjhczIFX3wFyZYLHoNWK3ebepJv8KW3MG0Yi5afJw11ax fH7ISFvKawM1TpkyQNYGaz21ZKM942AMdWSnMcbis+jYUkOjKOK/OH/61YoENOsBOEVZ Bf5Q== X-Gm-Message-State: AOJu0YyrU755zPXpvHvt8BvVmWs4lUae7/+KAMDiEHOKRJeiSfhw3yJI NlFtGewpqgGS55zQuWmPLW+x5wtmYgXsC8g7jrsN0BzZl/WPi+WfTFWajgXmIp+vu1nsmkNeNKm p X-Google-Smtp-Source: AGHT+IGEQ4wXNHPQShkHKKtzc4zAolPeEMoMlFdv4QFhLWmAxv2t6/CSh7Ega+9Fen9SO3Gtak2WSg== X-Received: by 2002:a05:6512:1394:b0:533:43bf:565d with SMTP id 2adb3069b0e04-539c48df098mr2785386e87.27.1728549591555; Thu, 10 Oct 2024 01:39:51 -0700 (PDT) Received: from tone.k.g (lan.nucleusys.com. [92.247.61.126]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c937153939sm476047a12.47.2024.10.10.01.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 01:39:51 -0700 (PDT) From: Leon Anavi To: openembedded-devel@lists.openembedded.org Cc: Leon Anavi Subject: [meta-python][PATCH 2/3] python3-aiohttp: Upgrade 3.10.8 -> 3.10.9 Date: Thu, 10 Oct 2024 11:39:46 +0300 Message-Id: <20241010083947.7303-2-leon.anavi@konsulko.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241010083947.7303-1-leon.anavi@konsulko.com> References: <20241010083947.7303-1-leon.anavi@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Oct 2024 08:39:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/112764 Upgrade to release 3.10.9: - Fixed proxy headers being used in the ConnectionKey hash when a proxy was not being used - Widened the type of the trace_request_ctx parameter of :meth:`ClientSession.request() - Fixed failure to try next host after single-host connection timeout - Improved performance of resolving hosts with Python 3.12+ - Reduced memory required for timer objects created during the client request lifecycle Signed-off-by: Leon Anavi --- .../{python3-aiohttp_3.10.8.bb => python3-aiohttp_3.10.9.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta-python/recipes-devtools/python/{python3-aiohttp_3.10.8.bb => python3-aiohttp_3.10.9.bb} (86%) diff --git a/meta-python/recipes-devtools/python/python3-aiohttp_3.10.8.bb b/meta-python/recipes-devtools/python/python3-aiohttp_3.10.9.bb similarity index 86% rename from meta-python/recipes-devtools/python/python3-aiohttp_3.10.8.bb rename to meta-python/recipes-devtools/python/python3-aiohttp_3.10.9.bb index e762eca52..cf39dd376 100644 --- a/meta-python/recipes-devtools/python/python3-aiohttp_3.10.8.bb +++ b/meta-python/recipes-devtools/python/python3-aiohttp_3.10.9.bb @@ -4,7 +4,7 @@ HOMEPAGE = "https://github.com/aio-libs/aiohttp" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=748073912af33aa59430d3702aa32d41" -SRC_URI[sha256sum] = "21f8225f7dc187018e8433c9326be01477fb2810721e048b33ac49091b19fb4a" +SRC_URI[sha256sum] = "143b0026a9dab07a05ad2dd9e46aa859bffdd6348ddc5967b42161168c24f857" PYPI_PACKAGE = "aiohttp" inherit python_setuptools_build_meta pypi From patchwork Thu Oct 10 08:39:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Anavi X-Patchwork-Id: 50209 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FF9ECF07C7 for ; Thu, 10 Oct 2024 08:40:08 +0000 (UTC) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by mx.groups.io with SMTP id smtpd.web10.38722.1728549594557979282 for ; Thu, 10 Oct 2024 01:39:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=W9dHsQps; spf=pass (domain: konsulko.com, ip: 209.85.208.54, mailfrom: leon.anavi@konsulko.com) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5c9362c26d8so648703a12.1 for ; Thu, 10 Oct 2024 01:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1728549593; x=1729154393; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hT5BchYO3SualrRp0NfwRU9Aaezt51I194ciVWJ4DsM=; b=W9dHsQpsUnZidfb1KALIxE/yehcuJGceJmMEz9DVEzkMFXTwYmDrktaNgacYGjfPoo xMbu5wHEcXb5VWXaVWT9XWBqKB9+VL7bAwEqSyyw4E3ntAMf3DL9/S+sOkDrw/90YsYZ kz3B3D6ez0mlaXfjZnZmlT8ZjZ06fT4Pd0yYw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728549593; x=1729154393; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hT5BchYO3SualrRp0NfwRU9Aaezt51I194ciVWJ4DsM=; b=WGUhrw0rNB3g3JSmVeoowCjwu50IQRgpipU4YSIORVtzENXGkqnmMg761+V09yFDyD Sxw85jCFxY9tm+PTRV/rxE2PssIYLXetFUgd9okLZZyn/6zofjVcHQ3WoCov9I/9ZU8O JqymtC+Z1Neh0BL69cbs8aAzViV+J9akq4RRdZeA/xgjhV4yd3Bji+UJP/0tjkq8QATG 0svqBybgWFG9mvTEpw93tMAuGeUzrJlX8woD7FXjH9RnxASKkJXIZxgvUkzl0vw5MQJ6 fFabiu9geaKUVqyTOfrsYOzJuGLZkMHUHGnuNwX/5bswxyUCf0LWZrOatKYwRNgVcQUG 0jDQ== X-Gm-Message-State: AOJu0YwKpVF49cbcXt+fImPvkomHkxztSxZvAbpaoiCKGm8wRA5dbwtv KFHFSXgjf/HnHBcbgofasgRZ8ebWS7Eq33dPAfHIrdzTkRK78lBOZKNDwuIgYkDg+iQJ53pvoTS D X-Google-Smtp-Source: AGHT+IFJMZoNsLviUW/AvBqZJX5hHQt8cc6kH8aePTgI5NvbkH2oTstdjbF2xyHTzG1O8YxGLfc9QA== X-Received: by 2002:a05:6402:278d:b0:5c5:bda8:8635 with SMTP id 4fb4d7f45d1cf-5c93354844fmr2092439a12.8.1728549592462; Thu, 10 Oct 2024 01:39:52 -0700 (PDT) Received: from tone.k.g (lan.nucleusys.com. [92.247.61.126]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c937153939sm476047a12.47.2024.10.10.01.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 01:39:52 -0700 (PDT) From: Leon Anavi To: openembedded-devel@lists.openembedded.org Cc: Leon Anavi Subject: [meta-python][PATCH 3/3] python3-gmpy2: Upgrade 2.1.5 -> 2.2.1 Date: Thu, 10 Oct 2024 11:39:47 +0300 Message-Id: <20241010083947.7303-3-leon.anavi@konsulko.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241010083947.7303-1-leon.anavi@konsulko.com> References: <20241010083947.7303-1-leon.anavi@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Oct 2024 08:40:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/112765 Upgrade to release 2.2.1: - Bug fix: use C int instead of C char for some internal code - Bug fix: add xmpz.bit_count method Drop 0001-src-fix-python-3.12-builds.patch because a similar change has been implemented upstream and the patch is not needed. The project has a proper pyproject.toml which declares the setuptools.build.meta PEP-517 backend. Fixes: WARNING: python3-gmpy2-2.2.1-r0 do_check_backend: QA Issue: inherits setuptools3 but has pyproject.toml with setuptools.build_meta, use the correct class [pep517-backend] Signed-off-by: Leon Anavi --- .../0001-src-fix-python-3.12-builds.patch | 263 ------------------ ...-gmpy2_2.1.5.bb => python3-gmpy2_2.2.1.bb} | 6 +- 2 files changed, 2 insertions(+), 267 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-gmpy2/0001-src-fix-python-3.12-builds.patch rename meta-python/recipes-devtools/python/{python3-gmpy2_2.1.5.bb => python3-gmpy2_2.2.1.bb} (63%) diff --git a/meta-python/recipes-devtools/python/python3-gmpy2/0001-src-fix-python-3.12-builds.patch b/meta-python/recipes-devtools/python/python3-gmpy2/0001-src-fix-python-3.12-builds.patch deleted file mode 100644 index 1171322e2..000000000 --- a/meta-python/recipes-devtools/python/python3-gmpy2/0001-src-fix-python-3.12-builds.patch +++ /dev/null @@ -1,263 +0,0 @@ -From 43f132103cedfd92b85173bcdacfbabd5916d9fc Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Wed, 27 Dec 2023 14:52:16 +0100 -Subject: [PATCH] src: fix python 3.12 builds - -This is a backport for 3.1.x versions provided separately in https://github.com/aleaxit/gmpy/issues/446 - -Upstream-Status: Inappropriate [can be dropped when 2.2.x is released] - -Signed-off-by: Alexander Kanavin ---- - src/gmpy2_convert.h | 21 +++++++ - src/gmpy2_convert_gmp.c | 129 +++++++++++++------------------------- - src/gmpy2_convert_utils.c | 2 +- - 3 files changed, 65 insertions(+), 87 deletions(-) - -diff --git a/src/gmpy2_convert.h b/src/gmpy2_convert.h -index f887d47..3e8cb2b 100644 ---- a/src/gmpy2_convert.h -+++ b/src/gmpy2_convert.h -@@ -142,6 +142,27 @@ extern "C" { - #define IS_TYPE_COMPLEX_ONLY(x) ((x > OBJ_TYPE_REAL) && \ - (x < OBJ_TYPE_COMPLEX)) - -+/* Compatibility macros (to work with PyLongObject internals). -+ */ -+ -+#if PY_VERSION_HEX >= 0x030C0000 -+# define TAG_FROM_SIGN_AND_SIZE(is_neg, size) ((is_neg?2:(size==0)) | (((size_t)size) << 3)) -+# define _PyLong_SetSignAndDigitCount(obj, is_neg, size) (obj->long_value.lv_tag = TAG_FROM_SIGN_AND_SIZE(is_neg, size)) -+#elif PY_VERSION_HEX >= 0x030900A4 -+# define _PyLong_SetSignAndDigitCount(obj, is_neg, size) (Py_SET_SIZE(obj, (is_neg?-1:1)*size)) -+#else -+# define _PyLong_SetSignAndDigitCount(obj, is_neg, size) (Py_SIZE(obj) = (is_neg?-1:1)*size) -+#endif -+ -+#if PY_VERSION_HEX >= 0x030C0000 -+# define GET_OB_DIGIT(obj) obj->long_value.ob_digit -+# define _PyLong_IsNegative(obj) ((obj->long_value.lv_tag & 3) == 2) -+# define _PyLong_DigitCount(obj) (obj->long_value.lv_tag >> 3) -+#else -+# define GET_OB_DIGIT(obj) obj->ob_digit -+# define _PyLong_IsNegative(obj) (Py_SIZE(obj) < 0) -+# define _PyLong_DigitCount(obj) (_PyLong_IsNegative(obj)? -Py_SIZE(obj):Py_SIZE(obj)) -+#endif - - /* Since the macros are used in gmpy2's codebase, these functions are skipped - * until they are needed for the C API in the future. -diff --git a/src/gmpy2_convert_gmp.c b/src/gmpy2_convert_gmp.c -index cf0891e..8b8df81 100644 ---- a/src/gmpy2_convert_gmp.c -+++ b/src/gmpy2_convert_gmp.c -@@ -59,33 +59,24 @@ GMPy_MPZ_From_PyIntOrLong(PyObject *obj, CTXT_Object *context) - } - #endif - -- switch (Py_SIZE(templong)) { -- case -1: -- mpz_set_si(result->z, -(sdigit)templong->ob_digit[0]); -+ len = _PyLong_DigitCount(templong); -+ negative = _PyLong_IsNegative(templong); -+ -+ switch (len) { -+ case 1: -+ mpz_set_si(result->z, (sdigit)GET_OB_DIGIT(templong)[0]); - break; - case 0: - mpz_set_si(result->z, 0); - break; -- case 1: -- mpz_set_si(result->z, templong->ob_digit[0]); -- break; - default: -- mpz_set_si(result->z, 0); -- -- if (Py_SIZE(templong) < 0) { -- len = - Py_SIZE(templong); -- negative = 1; -- } else { -- len = Py_SIZE(templong); -- negative = 0; -- } -- -- mpz_import(result->z, len, -1, sizeof(templong->ob_digit[0]), 0, -- sizeof(templong->ob_digit[0])*8 - PyLong_SHIFT, templong->ob_digit); -+ mpz_import(result->z, len, -1, sizeof(GET_OB_DIGIT(templong)[0]), 0, -+ sizeof(GET_OB_DIGIT(templong)[0])*8 - PyLong_SHIFT, -+ GET_OB_DIGIT(templong)); -+ } - -- if (negative) { -- mpz_neg(result->z, result->z); -- } -+ if (negative) { -+ mpz_neg(result->z, result->z); - } - return result; - } -@@ -105,33 +96,24 @@ mpz_set_PyIntOrLong(mpz_t z, PyObject *obj) - } - #endif - -- switch (Py_SIZE(templong)) { -- case -1: -- mpz_set_si(z, -(sdigit)templong->ob_digit[0]); -+ len = _PyLong_DigitCount(templong); -+ negative = _PyLong_IsNegative(templong); -+ -+ switch (len) { -+ case 1: -+ mpz_set_si(z, (sdigit)GET_OB_DIGIT(templong)[0]); - break; - case 0: - mpz_set_si(z, 0); - break; -- case 1: -- mpz_set_si(z, templong->ob_digit[0]); -- break; - default: -- mpz_set_si(z, 0); -- -- if (Py_SIZE(templong) < 0) { -- len = - Py_SIZE(templong); -- negative = 1; -- } else { -- len = Py_SIZE(templong); -- negative = 0; -- } -- -- mpz_import(z, len, -1, sizeof(templong->ob_digit[0]), 0, -- sizeof(templong->ob_digit[0])*8 - PyLong_SHIFT, templong->ob_digit); -+ mpz_import(z, len, -1, sizeof(GET_OB_DIGIT(templong)[0]), 0, -+ sizeof(GET_OB_DIGIT(templong)[0])*8 - PyLong_SHIFT, -+ GET_OB_DIGIT(templong)); -+ } - -- if (negative) { -- mpz_neg(z, z); -- } -+ if (negative) { -+ mpz_neg(z, z); - } - return; - } -@@ -186,12 +168,7 @@ GMPy_PyLong_From_MPZ(MPZ_Object *obj, CTXT_Object *context) - - /* Assume gmp uses limbs as least as large as the builtin longs do */ - -- if (mpz_sgn(obj->z) < 0) { -- negative = 1; -- } else { -- negative = 0; -- } -- -+ negative = mpz_sgn(obj->z) < 0; - size = (mpz_sizeinbase(obj->z, 2) + PyLong_SHIFT - 1) / PyLong_SHIFT; - - if (!(result = _PyLong_New(size))) { -@@ -200,31 +177,20 @@ GMPy_PyLong_From_MPZ(MPZ_Object *obj, CTXT_Object *context) - /* LCOV_EXCL_STOP */ - } - -- mpz_export(result->ob_digit, &count, -1, sizeof(result->ob_digit[0]), 0, -- sizeof(result->ob_digit[0])*8 - PyLong_SHIFT, obj->z); -+ mpz_export(GET_OB_DIGIT(result), &count, -1, sizeof(GET_OB_DIGIT(result)[0]), 0, -+ sizeof(GET_OB_DIGIT(result)[0])*8 - PyLong_SHIFT, obj->z); - - if (count == 0) { -- result->ob_digit[0] = 0; -+ GET_OB_DIGIT(result)[0] = 0; - } - - /* long_normalize() is file-static so we must reimplement it */ - /* longobjp = long_normalize(longobjp); */ -- while ((size>0) && (result->ob_digit[size-1] == 0)) { -+ while ((size>0) && (GET_OB_DIGIT(result)[size-1] == 0)) { - size--; - } --#if PY_VERSION_HEX >= 0x030900A4 -- Py_SET_SIZE(result, size); --#else -- Py_SIZE(result) = size; --#endif - -- if (negative) { --#if PY_VERSION_HEX >= 0x030900A4 -- Py_SET_SIZE(result, - Py_SIZE(result)); --#else -- Py_SIZE(result) = - Py_SIZE(result); --#endif -- } -+ _PyLong_SetSignAndDigitCount(result, negative, size); - return (PyObject*)result; - } - -@@ -476,33 +442,24 @@ GMPy_XMPZ_From_PyIntOrLong(PyObject *obj, CTXT_Object *context) - } - #endif - -- switch (Py_SIZE(templong)) { -- case -1: -- mpz_set_si(result->z, -(sdigit)templong->ob_digit[0]); -+ len = _PyLong_DigitCount(templong); -+ negative = _PyLong_IsNegative(templong); -+ -+ switch (len) { -+ case 1: -+ mpz_set_si(result->z, (sdigit)GET_OB_DIGIT(templong)[0]); - break; - case 0: - mpz_set_si(result->z, 0); - break; -- case 1: -- mpz_set_si(result->z, templong->ob_digit[0]); -- break; - default: -- mpz_set_si(result->z, 0); -- -- if (Py_SIZE(templong) < 0) { -- len = - Py_SIZE(templong); -- negative = 1; -- } else { -- len = Py_SIZE(templong); -- negative = 0; -- } -- -- mpz_import(result->z, len, -1, sizeof(templong->ob_digit[0]), 0, -- sizeof(templong->ob_digit[0])*8 - PyLong_SHIFT, templong->ob_digit); -+ mpz_import(result->z, len, -1, sizeof(GET_OB_DIGIT(templong)[0]), 0, -+ sizeof(GET_OB_DIGIT(templong)[0])*8 - PyLong_SHIFT, -+ GET_OB_DIGIT(templong)); -+ } - -- if (negative) { -- mpz_neg(result->z, result->z); -- } -+ if (negative) { -+ mpz_neg(result->z, result->z); - } - return result; - } -@@ -639,7 +596,7 @@ GMPy_MPQ_From_PyStr(PyObject *s, int base, CTXT_Object *context) - } - - cp = PyBytes_AsString(ascii_str); -- -+ - { - char *whereslash = strchr((char*)cp, '/'); - char *wheredot = strchr((char*)cp, '.'); -diff --git a/src/gmpy2_convert_utils.c b/src/gmpy2_convert_utils.c -index d676eaf..8908d17 100644 ---- a/src/gmpy2_convert_utils.c -+++ b/src/gmpy2_convert_utils.c -@@ -123,7 +123,7 @@ static unsigned long - GMPy_Integer_AsUnsignedLongWithType_v2(PyObject *x, int xtype) - { - if IS_TYPE_PyInteger(xtype) { -- if (Py_SIZE(x) < 0) { -+ if (_PyLong_IsNegative(((PyLongObject*)x))) { - VALUE_ERROR("n must be > 0"); - return (unsigned long)-1; - } diff --git a/meta-python/recipes-devtools/python/python3-gmpy2_2.1.5.bb b/meta-python/recipes-devtools/python/python3-gmpy2_2.2.1.bb similarity index 63% rename from meta-python/recipes-devtools/python/python3-gmpy2_2.1.5.bb rename to meta-python/recipes-devtools/python/python3-gmpy2_2.2.1.bb index d9e9bd50e..15599bfad 100644 --- a/meta-python/recipes-devtools/python/python3-gmpy2_2.1.5.bb +++ b/meta-python/recipes-devtools/python/python3-gmpy2_2.2.1.bb @@ -6,10 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ DEPENDS += "gmp mpfr libmpc" -PYPI_PACKAGE = "gmpy2" -SRC_URI[sha256sum] = "bc297f1fd8c377ae67a4f493fc0f926e5d1b157e5c342e30a4d84dc7b9f95d96" +SRC_URI[sha256sum] = "e83e07567441b78cb87544910cb3cc4fe94e7da987e93ef7622e76fb96650432" -inherit pypi setuptools3 python3native -SRC_URI += "file://0001-src-fix-python-3.12-builds.patch" +inherit pypi python_setuptools_build_meta python3native BBCLASSEXTEND = "native nativesdk"