public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/hypothesis/, dev-python/hypothesis/files/
@ 2018-10-10 22:02 Patrice Clement
  0 siblings, 0 replies; 2+ messages in thread
From: Patrice Clement @ 2018-10-10 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     8831dbe8568d042c8ebd4ebe7fc8042103728b77
Author:     Michael Seifert <m.seifert <AT> digitalernachschub <DOT> de>
AuthorDate: Tue Oct  9 06:17:46 2018 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Oct 10 22:01:49 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8831dbe8

dev-python/hypothesis: Version bump to 3.74.3.

Closes: https://bugs.gentoo.org/668108
Closes: https://github.com/gentoo/gentoo/pull/10112
Signed-off-by: Michael Seifert <m.seifert <AT> digitalernachschub.de>
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 dev-python/hypothesis/Manifest                     |  1 +
 .../files/hypothesis-3.74.3-no-werror.patch        | 12 +++++
 dev-python/hypothesis/hypothesis-3.74.3.ebuild     | 51 ++++++++++++++++++++++
 3 files changed, 64 insertions(+)

diff --git a/dev-python/hypothesis/Manifest b/dev-python/hypothesis/Manifest
index cd6a22e9e0c..32ea03e1378 100644
--- a/dev-python/hypothesis/Manifest
+++ b/dev-python/hypothesis/Manifest
@@ -1,2 +1,3 @@
 DIST hypothesis-3.6.0.tar.gz 73586 BLAKE2B b0ec133e8c71f752114211061155c15a7d536e771ba85eab6489440b2063d3083018bf8502d9e9dbc73105ee5f03060e3189e64574a3dfa052b091040e7e7915 SHA512 cb885628e5c38ab9312cfb177ebc3c014617d21031737f5fba343ba485c1b8ff82b1302e7bc1d3e79192bfd8324fd0501498c968f3ac8343829f8965f6354389
 DIST hypothesis-python-3.59.1.tar.gz 500529 BLAKE2B 5c171045e363f2337d7ca30797b9fc7f96430c805dd4b3ec78fe927247d2c2ba4a216789a82f1e956b89d66c5ecdb2050a5f93467f2d557a05d1d48507fc06db SHA512 c3aad4cc54152963806e09af5f351e60e30cd64ad48ba3d922451b10dbb1747ea3e5d432ebc611dcb0646687d7e8755051b967304e74798d091be0b2901c832f
+DIST hypothesis-python-3.74.3.tar.gz 552616 BLAKE2B e19a0991e7ae2fa6208c81d336cc66e3392bb78663f567fe28b570a1463a5359ccf713776f1f9cbd19a27a53b9a71a5be6eedfa05599fa12c047c373aa339592 SHA512 f4927d6e908a9222fa06f82ad6e4cf90c62a0a3d0c7632c17ee57a3705239901fcb5dbbcfca402c153bf2bea9dde0e51c852d2024ed5a236888327963fe13a3e

diff --git a/dev-python/hypothesis/files/hypothesis-3.74.3-no-werror.patch b/dev-python/hypothesis/files/hypothesis-3.74.3-no-werror.patch
new file mode 100644
index 00000000000..1e09133c6fb
--- /dev/null
+++ b/dev-python/hypothesis/files/hypothesis-3.74.3-no-werror.patch
@@ -0,0 +1,12 @@
+--- hypothesis-python/tests/common/setup.py	2018-10-09 15:41:19.106029968 +0200
++++ hypothesis-python/tests/common/setup.py	2018-10-09 15:42:09.464413825 +0200
+@@ -33,6 +33,9 @@
+     filterwarnings('ignore', category=ImportWarning)
+     filterwarnings('ignore', category=FutureWarning, module='pandas._version')
+ 
++    # Fixed in recent versions but allowed by pytest=3.0.0; see #1630
++    filterwarnings('ignore', category=DeprecationWarning, module='pluggy')
++
+     # See https://github.com/numpy/numpy/pull/432
+     filterwarnings('ignore', message='numpy.dtype size changed')
+     filterwarnings('ignore', message='numpy.ufunc size changed')

diff --git a/dev-python/hypothesis/hypothesis-3.74.3.ebuild b/dev-python/hypothesis/hypothesis-3.74.3.ebuild
new file mode 100644
index 00000000000..e213b96fb5f
--- /dev/null
+++ b/dev-python/hypothesis/hypothesis-3.74.3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy{,3} )
+PYTHON_REQ_USE="threads(+),sqlite"
+
+inherit distutils-r1 eutils
+
+DESCRIPTION="A library for property based testing"
+HOMEPAGE="https://github.com/HypothesisWorks/hypothesis https://pypi.org/project/hypothesis/"
+SRC_URI="https://github.com/HypothesisWorks/${PN}/archive/${PN}-python-${PV}.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd"
+IUSE="test"
+
+CDEPEND="
+	>=dev-python/attrs-16.0.0[${PYTHON_USEDEP}]
+	$(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' 'python2*' pypy)
+"
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	test? (
+		dev-python/flaky[${PYTHON_USEDEP}]
+		dev-python/mock[${PYTHON_USEDEP}]
+		dev-python/pytest[${PYTHON_USEDEP}]
+		dev-python/pytest-xdist[${PYTHON_USEDEP}]
+	)
+"
+
+S="${WORKDIR}/${PN}-${PN}-python-${PV}/${PN}-python"
+
+# See https://github.com/HypothesisWorks/hypothesis/issues/1630
+PATCHES=(  ${FILESDIR}/${P}-no-werror.patch )
+
+python_test() {
+	 pytest tests/cover/test_testdecorators.py || die "Tests fail with ${EPYTHON}"
+}
+
+pkg_postinst() {
+	optfeature "datetime support" dev-python/pytz
+	optfeature "dateutil support" dev-python/python-dateutil
+	optfeature "numpy support" dev-python/numpy
+	optfeature "django support" dev-python/django dev-python/pytz
+	optfeature "pandas support" dev-python/pandas
+	optfeature "pytest support" dev-python/pytest
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/hypothesis/, dev-python/hypothesis/files/
@ 2021-05-05 17:05 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-05-05 17:05 UTC (permalink / raw
  To: gentoo-commits

commit:     31b8a4c83acc4122f3823f77464a9b077c53b65f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May  5 15:41:10 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> 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 <mgorny <AT> 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 <zac.hatfield.dodds@gmail.com>
+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
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-05 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-05 17:05 [gentoo-commits] repo/gentoo:master commit in: dev-python/hypothesis/, dev-python/hypothesis/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2018-10-10 22:02 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox