[med-svn] [Git][python-team/packages/mypy][master] 2 commits: Patch: sleep() in mypyc test suite to avoid races and fix FTBFS on s390x.

Stefano Rivera (@stefanor) gitlab at salsa.debian.org
Mon Sep 26 16:19:36 BST 2022



Stefano Rivera pushed to branch master at Debian Python Team / packages / mypy


Commits:
15326945 by Stefano Rivera at 2022-09-26T17:10:13+02:00
Patch: sleep() in mypyc test suite to avoid races and fix FTBFS on s390x.

- - - - -
941e4ff0 by Stefano Rivera at 2022-09-26T17:18:30+02:00
Team upload.

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/mypyc-test-races
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+mypy (0.971-4) unstable; urgency=medium
+
+  * Team upload.
+  * Patch: sleep() in mypyc test suite to avoid races and fix FTBFS on s390x.
+
+ -- Stefano Rivera <stefanor at debian.org>  Mon, 26 Sep 2022 17:18:20 +0200
+
 mypy (0.971-3) unstable; urgency=medium
 
   [ Michael R. Crusoe ]


=====================================
debian/patches/mypyc-test-races
=====================================
@@ -0,0 +1,37 @@
+From: Jukka Lehtosalo <jukka.lehtosalo at iki.fi>
+Date: Fri, 2 Sep 2022 13:40:35 +0100
+Subject: Work around mypyc test failures in CI (#13593)
+
+Temporary workaround to #13572 that slows down mypyc tests.
+
+Origin: upstream, https://github.com/python/mypy/commit/38eb6e8a05d201f0db94b62a69d5ee5ca68b3738
+Bug-Upstream: https://github.com/python/mypy/issues/13572
+---
+ mypyc/test/test_run.py | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/mypyc/test/test_run.py b/mypyc/test/test_run.py
+index 4013c30..5f08152 100644
+--- a/mypyc/test/test_run.py
++++ b/mypyc/test/test_run.py
+@@ -8,6 +8,7 @@ import subprocess
+ import contextlib
+ import shutil
+ import sys
++import time
+ from typing import Any, Iterator, List, cast
+ 
+ from mypy import build
+@@ -160,6 +161,12 @@ class TestRun(MypycDataSuite):
+             # new by distutils, shift the mtime of all of the
+             # generated artifacts back by a second.
+             fudge_dir_mtimes(WORKDIR, -1)
++            # On Ubuntu, changing the mtime doesn't work reliably. As
++            # a workaround, sleep.
++            #
++            # TODO: Figure out a better approach, since this slows down tests.
++            if sys.platform == "linux":
++                time.sleep(1.0)
+ 
+             step += 1
+             with chdir_manager('..'):


=====================================
debian/patches/series
=====================================
@@ -6,3 +6,4 @@ python3.10.3
 use_standard_sphinx_theme
 python3.10.7
 python3.19.7-tests
+mypyc-test-races



View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/5e39685c11b6114dd133b718bb9d3cf1bdb02abe...941e4ff088e0f7a4f9b48e047636d03d8c8c577b

-- 
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/compare/5e39685c11b6114dd133b718bb9d3cf1bdb02abe...941e4ff088e0f7a4f9b48e047636d03d8c8c577b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220926/e0b4b04a/attachment-0001.htm>


More information about the debian-med-commit mailing list