From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4A0541382C5 for ; Wed, 5 May 2021 17:06:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BCE9CE08F1; Wed, 5 May 2021 17:06:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 93373E08F1 for ; Wed, 5 May 2021 17:06:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 892DF33BDEF for ; Wed, 5 May 2021 17:06:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0658378E for ; Wed, 5 May 2021 17:05:57 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1620234349.31b8a4c83acc4122f3823f77464a9b077c53b65f.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/hypothesis/, dev-python/hypothesis/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/hypothesis/files/hypothesis-6.10.1-py310.patch dev-python/hypothesis/hypothesis-6.10.1.ebuild X-VCS-Directories: dev-python/hypothesis/files/ dev-python/hypothesis/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 31b8a4c83acc4122f3823f77464a9b077c53b65f X-VCS-Branch: master Date: Wed, 5 May 2021 17:05:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bfaec308-129f-423f-989d-d5bbabb99011 X-Archives-Hash: ac921a47485f85a1bf26effe020ac47c commit: 31b8a4c83acc4122f3823f77464a9b077c53b65f Author: Michał Górny gentoo org> AuthorDate: Wed May 5 15:41:10 2021 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed May 5 17:05:49 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31b8a4c8 dev-python/hypothesis: Enable python3.10 Signed-off-by: Michał Górny gentoo.org> .../hypothesis/files/hypothesis-6.10.1-py310.patch | 75 ++++++++++++++++++++++ dev-python/hypothesis/hypothesis-6.10.1.ebuild | 11 ++-- 2 files changed, 82 insertions(+), 4 deletions(-) diff --git a/dev-python/hypothesis/files/hypothesis-6.10.1-py310.patch b/dev-python/hypothesis/files/hypothesis-6.10.1-py310.patch new file mode 100644 index 00000000000..f81186a46e6 --- /dev/null +++ b/dev-python/hypothesis/files/hypothesis-6.10.1-py310.patch @@ -0,0 +1,75 @@ +From 27ee073728e70e930118a36ffa4f8123ce363099 Mon Sep 17 00:00:00 2001 +From: Zac-HD +Date: Wed, 5 May 2021 13:01:21 +1000 +Subject: [PATCH] Test on 3.10-dev again + +now that pytest has been fixed +--- + tests/cover/test_annotations.py | 4 +--- + tests/cover/test_lookup.py | 7 +------ + tests/cover/test_lookup_py38.py | 2 -- + 4 files changed, 3 insertions(+), 12 deletions(-) + +diff --git a/tests/cover/test_annotations.py b/tests/cover/test_annotations.py +index 564339d39..95ebea3c5 100644 +--- a/tests/cover/test_annotations.py ++++ b/tests/cover/test_annotations.py +@@ -13,7 +13,6 @@ + # + # END HEADER + +-import sys + from inspect import getfullargspec + + import attr +@@ -116,8 +115,7 @@ def test_composite_edits_annotations(): + @pytest.mark.parametrize("nargs", [1, 2, 3]) + def test_given_edits_annotations(nargs): + spec_given = getfullargspec(given(*(nargs * [st.none()]))(pointless_composite)) +- expected = None if sys.version_info[:2] < (3, 10) else type(None) +- assert spec_given.annotations.pop("return") == expected ++ assert spec_given.annotations.pop("return") is None + assert len(spec_given.annotations) == 3 - nargs + + +diff --git a/tests/cover/test_lookup.py b/tests/cover/test_lookup.py +index b74eccc62..33cb78050 100644 +--- a/tests/cover/test_lookup.py ++++ b/tests/cover/test_lookup.py +@@ -756,12 +756,7 @@ def test_compat_get_type_hints_aware_of_None_default(): + find_any(strategy, lambda x: x.a is not None) + + assert typing.get_type_hints(constructor)["a"] == typing.Optional[str] +- annotation = inspect.signature(constructor).parameters["a"].annotation +- assert annotation == str or ( +- # See https://bugs.python.org/issue43006 +- annotation == typing.Optional[str] +- and sys.version_info[:2] >= (3, 10) +- ) ++ assert inspect.signature(constructor).parameters["a"].annotation == str + + + _ValueType = typing.TypeVar("_ValueType") +diff --git a/tests/cover/test_lookup_py38.py b/tests/cover/test_lookup_py38.py +index 6a68254a7..db11777fe 100644 +--- a/tests/cover/test_lookup_py38.py ++++ b/tests/cover/test_lookup_py38.py +@@ -14,7 +14,6 @@ + # END HEADER + + import dataclasses +-import sys + import typing + + import pytest +@@ -103,7 +102,6 @@ class NestedDict(typing.TypedDict): + inner: A + + +-@pytest.mark.skipif(sys.version_info[:2] >= (3, 10), reason="see issue #2897") + @given(from_type(NestedDict)) + def test_typeddict_with_nested_value(value): + assert type(value) == dict +-- +2.31.1 + diff --git a/dev-python/hypothesis/hypothesis-6.10.1.ebuild b/dev-python/hypothesis/hypothesis-6.10.1.ebuild index d2766062540..7afc12a8028 100644 --- a/dev-python/hypothesis/hypothesis-6.10.1.ebuild +++ b/dev-python/hypothesis/hypothesis-6.10.1.ebuild @@ -3,8 +3,7 @@ EAPI=7 -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{7..9} pypy3 ) +PYTHON_COMPAT=( python3_{7..10} pypy3 ) PYTHON_REQ_USE="threads(+),sqlite" inherit distutils-r1 multiprocessing optfeature @@ -26,7 +25,7 @@ RDEPEND=" $(python_gen_cond_dep ' dev-python/black[${PYTHON_USEDEP}] dev-python/click[${PYTHON_USEDEP}] - ' 'python*') + ' python3_{7..9}) ) " BDEPEND=" @@ -40,8 +39,12 @@ BDEPEND=" distutils_enable_tests --install pytest +PATCHES=( + "${FILESDIR}"/${P}-py310.patch +) + python_prepare() { - if ! use cli || [[ ${EPYTHON} != python* ]]; then + if ! use cli || ! has "${EPYTHON}" python3_{7..9}; then sed -i -e '/console_scripts/d' setup.py || die fi }