Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/tqdm/files/, dev-python/tqdm/
Date: Sun, 13 Jun 2021 11:27:28
Message-Id: 1623583639.336b08c335da578ffcc00b9bec66cb64ec0c8f56.mgorny@gentoo
1 commit: 336b08c335da578ffcc00b9bec66cb64ec0c8f56
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 13 11:09:19 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 13 11:27:19 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=336b08c3
7
8 dev-python/tqdm: Enable py3.10
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/tqdm/files/tqdm-4.61.1-py310.patch | 35 +++++++++++++++++++++++++++
13 dev-python/tqdm/tqdm-4.61.1.ebuild | 6 ++++-
14 2 files changed, 40 insertions(+), 1 deletion(-)
15
16 diff --git a/dev-python/tqdm/files/tqdm-4.61.1-py310.patch b/dev-python/tqdm/files/tqdm-4.61.1-py310.patch
17 new file mode 100644
18 index 00000000000..10cb898d480
19 --- /dev/null
20 +++ b/dev-python/tqdm/files/tqdm-4.61.1-py310.patch
21 @@ -0,0 +1,35 @@
22 +From d2a6ec2ab84aec847b1598bb2a777103cea7fc9f Mon Sep 17 00:00:00 2001
23 +From: Casper da Costa-Luis <tqdm@××××.ml>
24 +Date: Sat, 12 Jun 2021 17:39:37 +0100
25 +Subject: [PATCH] fix py3.10 `asyncio` tests
26 +
27 +- fixes #1176
28 +---
29 + tqdm/asyncio.py | 7 ++++++-
30 + 1 file changed, 6 insertions(+), 1 deletion(-)
31 +
32 +diff --git a/tqdm/asyncio.py b/tqdm/asyncio.py
33 +index 0d3ba747d..8f9b4ed6e 100644
34 +--- a/tqdm/asyncio.py
35 ++++ b/tqdm/asyncio.py
36 +@@ -8,6 +8,7 @@
37 + ... ...
38 + """
39 + import asyncio
40 ++from sys import version_info
41 +
42 + from .std import tqdm as std_tqdm
43 +
44 +@@ -60,7 +61,11 @@ def as_completed(cls, fs, *, loop=None, timeout=None, total=None, **tqdm_kwargs)
45 + """
46 + if total is None:
47 + total = len(fs)
48 +- yield from cls(asyncio.as_completed(fs, loop=loop, timeout=timeout),
49 ++
50 ++ kwargs = {}
51 ++ if version_info[:2] < (3, 10):
52 ++ kwargs['loop'] = loop
53 ++ yield from cls(asyncio.as_completed(fs, timeout=timeout, **kwargs),
54 + total=total, **tqdm_kwargs)
55 +
56 + @classmethod
57
58 diff --git a/dev-python/tqdm/tqdm-4.61.1.ebuild b/dev-python/tqdm/tqdm-4.61.1.ebuild
59 index efd3b71ffe2..52874533157 100644
60 --- a/dev-python/tqdm/tqdm-4.61.1.ebuild
61 +++ b/dev-python/tqdm/tqdm-4.61.1.ebuild
62 @@ -3,7 +3,7 @@
63
64 EAPI=7
65
66 -PYTHON_COMPAT=( pypy3 python3_{8..9} )
67 +PYTHON_COMPAT=( pypy3 python3_{8..10} )
68 inherit distutils-r1
69
70 if [[ ${PV} == 9999 ]]; then
71 @@ -31,6 +31,10 @@ BDEPEND="
72
73 distutils_enable_tests pytest
74
75 +PATCHES=(
76 + "${FILESDIR}"/${P}-py310.patch
77 +)
78 +
79 python_test() {
80 # Skip unpredictable performance tests
81 epytest --ignore 'tests/tests_perf.py'