[med-svn] [Git][python-team/packages/mypy][master] Add my patch, accepted by upstream, for a better riscv64 worker timeout fix; ...
Michael R. Crusoe (@crusoe)
gitlab at salsa.debian.org
Tue Sep 15 14:48:33 BST 2026
Michael R. Crusoe pushed to branch master at Debian Python Team / packages / mypy
Commits:
a8c7c53e by Michael R. Crusoe at 2026-09-15T15:40:07+02:00
Add my patch, accepted by upstream, for a better riscv64 worker timeout fix; instead of skipping tests.
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/riscv64-increase-worker-timeouts.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+mypy (2.2.0-6) UNRELEASED; urgency=medium
+
+ * Add my patch, accepted by upstream, for a better riscv64 worker timeout
+ fix; instead of skipping tests.
+
+ -- Michael R. Crusoe <crusoe at debian.org> Tue, 15 Sep 2026 15:38:58 +0200
+
mypy (2.2.0-5) unstable; urgency=medium
* d/rules: skip some tests on riscv64
=====================================
debian/patches/riscv64-increase-worker-timeouts.patch
=====================================
@@ -0,0 +1,40 @@
+From: "Michael R. Crusoe" <1330696+mr-c at users.noreply.github.com>
+Date: Tue, 15 Sep 2026 15:25:37 +0200
+Subject: riscv64: increase worker start timeout (#21988)
+Origin: upstream, https://github.com/python/mypy/pull/21988
+
+Fixes: #21969
+
+Increases `WORKER_START_TIMEOUT` on riscv64 machines, allowing
+`--num-workers` with 1 or greater to work.
+---
+ mypy/defaults.py | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+--- mypy.orig/mypy/defaults.py
++++ mypy/mypy/defaults.py
+@@ -1,6 +1,7 @@
+ from __future__ import annotations
+
+ import os
++import platform
+ import sys
+ from typing import Final
+
+@@ -47,10 +48,12 @@
+
+ RECURSION_LIMIT: Final = 2**14
+
+-# It looks like Windows is slow with processes, causing test flakiness even
+-# with our generous timeouts, so we set them higher.
+-WORKER_START_INTERVAL: Final = 0.01 if sys.platform != "win32" else 0.03
+-WORKER_START_TIMEOUT: Final = 3 if sys.platform != "win32" else 10
++# It looks like Windows & riscv64 are both slow with processes, causing test
++# flakiness even with our generous timeouts, so we set them higher.
++slow_fs = sys.platform == "win32" or platform.machine() == "riscv64"
++
++WORKER_START_INTERVAL: Final = 0.03 if slow_fs else 0.01
++WORKER_START_TIMEOUT: Final = 10 if slow_fs else 3
+ WORKER_SHUTDOWN_TIMEOUT: Final = 1 if sys.platform != "win32" else 3
+
+ WORKER_CONNECTION_TIMEOUT: Final = 10
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
+riscv64-increase-worker-timeouts.patch
remove-mypyc-test-run-timeout
hint-typeshed-package
verbose
=====================================
debian/rules
=====================================
@@ -27,16 +27,10 @@ else
endif
export TEST_MYPYC=$(build_MYPY_USE_MYPYC)
export MYPY_TEST_PREFIX=$(CURDIR)
-self_test_joblimit := $(or $(DEB_BUILD_OPTION_PARALLEL),1)
-ifneq (,$(filter $(DEB_HOST_ARCH),riscv64))
- self_test_joblimit=0
- riscv_no_test= or testShadowFileWithNativeParserParallel or testPackageRootMultipleParallel or testParallelRunWithSyntaxError or testCheckingStubPackagesWorksInParallelMode
-endif
-# riscv test failures: https://github.com/python/mypy/issues/21969
export PYBUILD_TEST_ARGS=$(DEB_BUILD_OPTION_PARALLEL:%=-n%) \
-o python_files=test*.py \
-o python_classes= -o python_functions= --pyargs mypy.test mypyc.test \
- -k 'not (PEP561Suite or testIgnoreImportIfNoPython3StubAvailable or testNoPython3StubAvailable or testCustomTypeshedDirWithRelativePathDoesNotCrash or testDaemonStatusKillRestartRecheck or testOutputJsonParallel or testOutputJsonSyntaxErrorParallel $(riscv_no_test))'
+ -k 'not (PEP561Suite or testIgnoreImportIfNoPython3StubAvailable or testNoPython3StubAvailable or testCustomTypeshedDirWithRelativePathDoesNotCrash or testDaemonStatusKillRestartRecheck or testOutputJsonParallel or testOutputJsonSyntaxErrorParallel)'
# PEP561Suite: needs internet access to pypi.org
# testIgnoreImportIfNoPython3StubAvailable: needs scribe installed (it isn't packaged for Debian)
# testNoPython3StubAvailable: no longer works because python3-typeshed includes docutils types, which it isn't expecting
@@ -45,7 +39,6 @@ export PYBUILD_TEST_ARGS=$(DEB_BUILD_OPTION_PARALLEL:%=-n%) \
# testOutputJsonParallel: flaky https://github.com/python/mypy/issues/21905
# testOutputJsonSyntaxErrorParallel: flaky https://github.com/python/mypy/issues/21905
-
%:
dh $@ --buildsystem=pybuild
@@ -100,15 +93,12 @@ execute_before_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_PROFILES)))
PYBUILD_SYSTEM=custom \
PYBUILD_TEST_ARGS="{interpreter} -m mypy \
- --config-file {dir}/mypy_self_check.ini \
- --num-workers $(self_test_joblimit) -p mypy" dh_auto_test
+ --config-file {dir}/mypy_self_check.ini -p mypy" dh_auto_test
PYBUILD_SYSTEM=custom \
PYBUILD_TEST_ARGS="{interpreter} -m mypy \
- --num-workers $(self_test_joblimit) \
--config-file {dir}/mypy_self_check.ini -p mypyc" dh_auto_test
PYBUILD_SYSTEM=custom \
PYBUILD_TEST_ARGS="{interpreter} -m mypy \
- --num-workers $(self_test_joblimit) \
--config-file {dir}/mypy_self_check.ini setup.py" dh_auto_test
endif
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/commit/a8c7c53e2394ac0642b9be32ab937bb5c7cbc0ff
--
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/commit/a8c7c53e2394ac0642b9be32ab937bb5c7cbc0ff
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260915/1637caa9/attachment-0001.htm>
More information about the debian-med-commit
mailing list