From patchwork Mon Jul 13 15:29:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lars-Dominik Braun X-Patchwork-Id: 23216 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 890C827BBE3; Mon, 13 Jul 2020 16:31:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id A228127BBE1 for ; Mon, 13 Jul 2020 16:31:09 +0100 (BST) Received: from localhost ([::1]:36070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jv0Q9-0000Bl-6v for patchwork@mira.cbaines.net; Mon, 13 Jul 2020 11:31:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jv0Q3-0000BZ-0l for guix-patches@gnu.org; Mon, 13 Jul 2020 11:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jv0Q2-0004kx-Nn for guix-patches@gnu.org; Mon, 13 Jul 2020 11:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jv0Q2-0004SF-L2 for guix-patches@gnu.org; Mon, 13 Jul 2020 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42344] [PATCH] gnu: Fix python-aionotify testcases with Python 3.8 Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jul 2020 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42344 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42344@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159465421417065 (code B ref -1); Mon, 13 Jul 2020 15:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jul 2020 15:30:14 +0000 Received: from localhost ([127.0.0.1]:49058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jv0PC-0004R7-MZ for submit@debbugs.gnu.org; Mon, 13 Jul 2020 11:30:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:51574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jv0P8-0004Pz-0t for submit@debbugs.gnu.org; Mon, 13 Jul 2020 11:30:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jv0P7-0008JG-LU for guix-patches@gnu.org; Mon, 13 Jul 2020 11:30:05 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:33649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jv0P2-0004IU-Cu for guix-patches@gnu.org; Mon, 13 Jul 2020 11:30:05 -0400 Received: by mail-wr1-x42c.google.com with SMTP id f18so17033905wrs.0 for ; Mon, 13 Jul 2020 08:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leibniz-psychology-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=nB24B4PV4b+5zwXdop8gCmupl5gPGAmdVjcFlrX+z2E=; b=bVOaJEcUj2GFuZ+tiGBiMsfNVBrJx088KC9hbLnW/WHviYdKyktoD9AgrXKi2k7lam CeztzrXHvDILnShKqh4vlAck9X+e1o8tesm4qcYz4iYycNlO8C+AqWvDL0eT0g/Yt6ZI iKT7zqDuqLNRX/oOZZVhkGsYYcFhL8WFgQKRFiAbr2CrBmxgyQFeQcCAjp8IMNJohn6f 2HAfRm7a/r+Ar6t0V6qNnuBUbjBn18HVV+T0WaKS4DuSO7F4GugqgWjkYXIb9bZOwBLc aCQDC7X7+dI8XnluJLFOr/XA8Gd/8HzHOKrFzyb63qH5aGSzhKNE0NfciPascG5rp1gn paNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=nB24B4PV4b+5zwXdop8gCmupl5gPGAmdVjcFlrX+z2E=; b=YLS+i+ROhVg4KGu8Bc2kAAfu6tBjYSS3572B2EagjFymXUaVH1vslSGH67PaKCluEJ ROUrd7ex1T2S9pJSWI1PqkIEwy6x5itC/1Oxpi6B7RZisGYXpiS8SgXjGAScUolrm0Fu sGZBG+GBRM7hEaqGd/7OMPJoeM7psSb1p+Eibe/llC7KGUsJF6aD1gWdpV4z9Jr3qmsL ENwiq7IbUysvMQgYsj44U+HLQ56r7pebAggxhBDObNmL5vUc/m0jq/m8e+Y13GqQgkgy +5GGdjreGVFOEURMKyDT7VtoPu+lJYOK6TwFYDLXRzsI9z+lZHaqxOcBHTQGMJjgSbZf Az8A== X-Gm-Message-State: AOAM530O2JNBM4MCSfPLRle1NbLPYKZQh8XjmJ1PabNyWJIuMQrGCfhQ znJTHWGh3Qk78m1ejDvMyy8KATyLazh2lrcroGBQyb8nx0RTzolWgR4Xu7gfC2eMWXMNOK7oShp AfJFQYoUg2hVxsw8Fyx1QuOeeAWfCoWvErLjR+fbsRScMzgOlhOCh3qZG6scDA3mS8eyphRY+Nf jc0JGRAgg= X-Google-Smtp-Source: ABdhPJxtDxSGL2ehDeoCswStKm5uvpAxMH6iGbW72vub9HitIqWQSPiVuizauhAiEMEKCdHXd5gD5Q== X-Received: by 2002:adf:c185:: with SMTP id x5mr87483351wre.403.1594654198004; Mon, 13 Jul 2020 08:29:58 -0700 (PDT) Received: from localhost (dynamic-2a01-0c23-782b-1900-1085-8180-26a4-e2c4.c23.pool.telefonica.de. [2a01:c23:782b:1900:1085:8180:26a4:e2c4]) by smtp.gmail.com with ESMTPSA id f12sm23329969wrw.53.2020.07.13.08.29.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 08:29:57 -0700 (PDT) Date: Mon, 13 Jul 2020 17:29:56 +0200 From: Lars-Dominik Braun Message-ID: <20200713152956.GA3240@zpidnp36> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: none client-ip=2a00:1450:4864:20::42c; envelope-from=ldb@leibniz-psychology.org; helo=mail-wr1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 Hi, python-aionotify’s upstream seems to be dead, so I’m sending a patch that at least fixes the package with Python 3.8 here in Guix. Lars From c0bf6b640a7f91d78b89c4aa86818345c40e44b0 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 13 Jul 2020 17:25:00 +0200 Subject: [PATCH] gnu: Fix python-aionotify testcases with Python 3.8 * gnu/packages/python-xyz.scm (patches): Add fix. * gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch: New file. * gnu/local.mk: Add it. --- gnu/local.mk | 1 + .../python-aionotify-0.2.0-py3.8.patch | 48 +++++++++++++++++++ gnu/packages/python-xyz.scm | 4 +- 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch diff --git a/gnu/local.mk b/gnu/local.mk index ddd024677a..b6d5592ccd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1437,6 +1437,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3.8-fix-tests.patch \ %D%/packages/patches/python-CVE-2018-14647.patch \ %D%/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch \ + %D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \ %D%/packages/patches/python-alembic-exceptions-cause.patch \ %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ diff --git a/gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch b/gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch new file mode 100644 index 0000000000..ebeef34720 --- /dev/null +++ b/gnu/packages/patches/python-aionotify-0.2.0-py3.8.patch @@ -0,0 +1,48 @@ +Compatibility with Python 3.8, see upstream issue +https://github.com/rbarrois/aionotify/pull/15 + +diff --git a/setup.py b/setup.py +index 21a554f..094de64 100755 +--- a/setup.py ++++ b/setup.py +@@ -40,7 +40,7 @@ setup( + setup_requires=[ + ], + tests_require=[ +- 'asynctest', ++ 'asynctest; python_version<"3.8"', + ], + classifiers=[ + "Development Status :: 4 - Beta", +diff --git a/tests/test_usage.py b/tests/test_usage.py +index f156291..0476ff1 100644 +--- a/tests/test_usage.py ++++ b/tests/test_usage.py +@@ -8,7 +8,11 @@ import os.path + import tempfile + import unittest + +-import asynctest ++try: ++ testBase = unittest.IsolatedAsyncioTestCase ++except AttributeError: ++ import asynctest ++ testBase = asynctest.TestCase + + import aionotify + +@@ -25,11 +29,13 @@ if AIODEBUG: + TESTDIR = os.environ.get('AIOTESTDIR') or os.path.join(os.path.dirname(__file__), 'testevents') + + +-class AIONotifyTestCase(asynctest.TestCase): ++class AIONotifyTestCase(testBase): + forbid_get_event_loop = True + timeout = 3 + + def setUp(self): ++ if not getattr (self, 'loop', None): ++ self.loop = asyncio.get_event_loop() + if AIODEBUG: + self.loop.set_debug(True) + self.watcher = aionotify.Watcher() diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 6fe2ca0a2e..7739772292 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -19237,9 +19237,9 @@ and cuts down boilerplate code when testing libraries for asyncio.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y")))) + (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y")) + (patches (search-patches "python-aionotify-0.2.0-py3.8.patch")))) (build-system python-build-system) - (native-inputs `(("python-asynctest" ,python-asynctest))) (home-page "https://github.com/rbarrois/aionotify") (synopsis "Asyncio-powered inotify library") (description -- 2.26.2