[gentoo-commits] repo/gentoo:master commit in: dev-python/tornado/files/, dev-python/tornado/

2023-05-28 Thread Sam James
commit: e2675dd4fd44f7b6799759d4febf6c48561b1d31
Author: Sam James  gentoo  org>
AuthorDate: Sun May 28 22:50:10 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun May 28 22:50:49 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2675dd4

dev-python/tornado: add test suite tweaks

- Skip tests marked as skipOnTravis (timing sensitive)
- Explicitly set NO_NETWORK too to avoid network tests
- Don't treat DeprecationWarning as fatal for tests (grabbed from Fedora)

Signed-off-by: Sam James  gentoo.org>

 .../files/tornado-6.3.2-ignore-deprecationwarning.patch  | 12 
 dev-python/tornado/tornado-6.3.2.ebuild  |  8 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git 
a/dev-python/tornado/files/tornado-6.3.2-ignore-deprecationwarning.patch 
b/dev-python/tornado/files/tornado-6.3.2-ignore-deprecationwarning.patch
new file mode 100644
index ..7a6139173faf
--- /dev/null
+++ b/dev-python/tornado/files/tornado-6.3.2-ignore-deprecationwarning.patch
@@ -0,0 +1,12 @@
+https://src.fedoraproject.org/rpms/python-tornado/raw/rawhide/f/Do-not-turn-DeprecationWarning-into-Exception.patch
+--- a/tornado/test/runtests.py
 b/tornado/test/runtests.py
+@@ -126,7 +126,6 @@
+ # Tornado generally shouldn't use anything deprecated, but some of
+ # our dependencies do (last match wins).
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
+-warnings.filterwarnings("error", category=DeprecationWarning, 
module=r"tornado\..*")
+ warnings.filterwarnings("ignore", category=PendingDeprecationWarning)
+ warnings.filterwarnings(
+ "error", category=PendingDeprecationWarning, module=r"tornado\..*"
+

diff --git a/dev-python/tornado/tornado-6.3.2.ebuild 
b/dev-python/tornado/tornado-6.3.2.ebuild
index 6f7c89f5d33a..aa07dcb6f320 100644
--- a/dev-python/tornado/tornado-6.3.2.ebuild
+++ b/dev-python/tornado/tornado-6.3.2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
+PYTHON_COMPAT=( python3_{10..11} pypy3 )
 PYTHON_REQ_USE="threads(+)"
 
 inherit distutils-r1 pypi
@@ -37,6 +37,7 @@ BDEPEND="
 
 PATCHES=(
"${FILESDIR}"/${PN}-6.3.2-test-timeout-increase.patch
+   "${FILESDIR}"/${PN}-6.3.2-ignore-deprecationwarning.patch
 )
 
 src_prepare() {
@@ -49,6 +50,11 @@ src_prepare() {
 
 python_test() {
local -x ASYNC_TEST_TIMEOUT=60
+   # Avoid time-sensitive tests
+   # 
https://github.com/tornadoweb/tornado/blob/10974e6ebee80a26a2a65bb9bd715cf858fafde5/tornado/test/util.py#L19
+   local -x TRAVIS=1
+   local -x NO_NETWORK=1
+
cd "${T}" || die
"${EPYTHON}" -m tornado.test.runtests --verbose ||
die "tests failed under ${EPYTHON}"



[gentoo-commits] repo/gentoo:master commit in: dev-python/tornado/files/, dev-python/tornado/

2023-05-27 Thread Sam James
commit: 0a25391ed01c4be0c5bad772da965db43ea3404c
Author: Sam James  gentoo  org>
AuthorDate: Sat May 27 09:07:02 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat May 27 09:15:30 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a25391e

dev-python/tornado: increase test timeout

Closes: https://bugs.gentoo.org/727934
Signed-off-by: Sam James  gentoo.org>

 .../files/tornado-6.3.2-test-timeout-increase.patch   | 15 +++
 dev-python/tornado/tornado-6.3.2.ebuild   |  4 
 2 files changed, 19 insertions(+)

diff --git a/dev-python/tornado/files/tornado-6.3.2-test-timeout-increase.patch 
b/dev-python/tornado/files/tornado-6.3.2-test-timeout-increase.patch
new file mode 100644
index ..271880c28469
--- /dev/null
+++ b/dev-python/tornado/files/tornado-6.3.2-test-timeout-increase.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/727934
+--- a/tornado/test/simple_httpclient_test.py
 b/tornado/test/simple_httpclient_test.py
+@@ -293,9 +293,9 @@ class SimpleHTTPClientTestMixin(object):
+ 
+ @skipOnTravis
+ def test_request_timeout(self: typing.Any):
+-timeout = 0.1
++timeout = 5
+ if os.name == "nt":
+-timeout = 0.5
++timeout = 10
+ 
+ with self.assertRaises(HTTPTimeoutError):
+ self.fetch("/trigger?wake=false", request_timeout=timeout, 
raise_error=True)

diff --git a/dev-python/tornado/tornado-6.3.2.ebuild 
b/dev-python/tornado/tornado-6.3.2.ebuild
index 2191de2910dd..6f7c89f5d33a 100644
--- a/dev-python/tornado/tornado-6.3.2.ebuild
+++ b/dev-python/tornado/tornado-6.3.2.ebuild
@@ -35,6 +35,10 @@ BDEPEND="
)
 "
 
+PATCHES=(
+   "${FILESDIR}"/${PN}-6.3.2-test-timeout-increase.patch
+)
+
 src_prepare() {
# network-sandbox? ipv6?
sed -i -e 's:test_localhost:_&:' \