[Git][ghc/ghc][wip/andreask/9.10-backports] testsuite: workaround bug in python-3.12
Andreas Klebinger (@AndreasK)
gitlab at gitlab.haskell.org
Thu Dec 19 19:25:23 UTC 2024
Andreas Klebinger pushed to branch wip/andreask/9.10-backports at Glasgow Haskell Compiler / GHC
Commits:
1a7a0500 by Matthew Pickering at 2024-12-19T20:05:43+01:00
testsuite: workaround bug in python-3.12
There is some unexplained change to binding behaviour in python-3.12
which requires moving this import from the top-level into the scope of
the function.
I didn't feel any particular desire to do a deep investigation as to why
this changed as the code works when modified like this. No one in the
python IRC channel seemed to know what the problem was.
(cherry picked from commit 43aa99b8169fc6d8552844cd6fa0ce3cd4308185)
- - - - -
1 changed file:
- testsuite/tests/plugins/all.T
Changes:
=====================================
testsuite/tests/plugins/all.T
=====================================
@@ -11,11 +11,15 @@ setTestOpts([
when(opsys('mingw32'), multi_cpu_race),
])
-import itertools
# Check the simple-plugin tests without
# caring about the order of loading of interfaces
def normalizeIfaces(unnormalized_str):
+ # Why is this not at the top-level? Probably a python bug which I didn't fancy
+ # investigating deeply.
+ # NameError: name 'itertools' is not defined. Did you forget to import 'itertools'
+ # if placed at the top-level
+ import itertools
iface_plugin_prefix = "interfacePlugin: "
grouped_plugins = itertools.groupby(
unnormalized_str.split('\n'),
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1a7a0500b165a5f746691a37df1329c421b08b19
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1a7a0500b165a5f746691a37df1329c421b08b19
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/20241219/0298cb82/attachment-0001.html>
More information about the ghc-commits
mailing list