[Git][ghc/ghc][wip/junit-fixes] Compat

Ben Gamari gitlab at gitlab.haskell.org
Sat Jun 22 00:53:25 UTC 2019



Ben Gamari pushed to branch wip/junit-fixes at Glasgow Haskell Compiler / GHC


Commits:
20c59513 by Ben Gamari at 2019-06-22T00:53:20Z
Compat

- - - - -


2 changed files:

- testsuite/driver/my_typing.py
- testsuite/driver/testlib.py


Changes:

=====================================
testsuite/driver/my_typing.py
=====================================
@@ -1,5 +1,7 @@
 """
-This module provides some type definitions for use in the testsuite driver.
+This module provides some type definitions and backwards compatibility shims
+for use in the testsuite driver.
+
 The testsuite driver can be typechecked using mypy [1].
 
 
@@ -17,3 +19,7 @@ WayName = NewType("WayName", str)
 TestName = NewType("TestName", str)
 OutputNormalizer = Callable[[str], str]
 IssueNumber = NewType("IssueNumber", int)
+
+# TextIO is missing on some older Pythons.
+if 'TextIO' not in globals():
+    TextIO = None


=====================================
testsuite/driver/testlib.py
=====================================
@@ -2238,7 +2238,7 @@ def findTFiles(roots: List[str]) -> Iterator[str]:
 # -----------------------------------------------------------------------------
 # Output a test summary to the specified file object
 
-def summary(t: TestRun, file: "TextIO", short=False, color=False) -> None:
+def summary(t: TestRun, file: TextIO, short=False, color=False) -> None:
 
     file.write('\n')
     printUnexpectedTests(file,



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/20c59513af41ea8d85794d79bd9b970079dbd030

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/20c59513af41ea8d85794d79bd9b970079dbd030
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190621/8f2dfe46/attachment-0001.html>


More information about the ghc-commits mailing list