diff options
author | Greg Becker <becker33@llnl.gov> | 2023-06-16 17:52:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 20:52:26 -0400 |
commit | 0ac1c52d17e22810dca66b1c7b1de3ae055e48f1 (patch) | |
tree | 3c15570bfb8742202c52fd59ac0878976af96909 /.git-blame-ignore-revs | |
parent | a3c42715db33e07bf8fa98eed8d72c232577b2e6 (diff) | |
download | spack-0ac1c52d17e22810dca66b1c7b1de3ae055e48f1.tar.gz spack-0ac1c52d17e22810dca66b1c7b1de3ae055e48f1.tar.bz2 spack-0ac1c52d17e22810dca66b1c7b1de3ae055e48f1.tar.xz spack-0ac1c52d17e22810dca66b1c7b1de3ae055e48f1.zip |
unparser: drop Python 2, fix testing bugs with newer Pythons (#38424)
The `unparser` that Spack uses for package hashing had several tweaks to ensure compatibility
with Python 2.7:
1. Currently, the unparser automatically moves `*` and `**` args to the end to preserve
compatibility with `python@:3.4`
2. `print a, b, c` statements and single-tuple `print((a, b, c))` function calls were
remapped to `print(a, b, c)` in the unparsed output for consistency across versions.
(1) is causing issues in our tests because a recent patch to the Python source code
(https://github.com/python/cpython/pull/102953/files#diff-7972dffec6674d5f09410c71766ac6caacb95b9bccbf032061806ae304519c9bR813-R823)
has a `**` arg before an named argument, and we round-trip the core python source code
as a test of our unparser. This isn't actually a break with our consistent unpausing -- it's still
consistent, the python source just doesn't unparse to the same thing anymore. It does makes
it harder to test, so it's not worth maintaining the Python2-specific stuff anymore.
Since we only support `python@3.6:`, this PR removes (1) and (2) from the unparser, but keeps
one last tweak for unicode AST inconsistencies, as it's still needed for Python 3.5-3.7.
This fixes the CI error we've been seeing on `python@3.11.4` and `python@3.10.12`. Again, that
bug exists only in the test system and doesn't affect our canonical hashing of Python code.
Diffstat (limited to '.git-blame-ignore-revs')
0 files changed, 0 insertions, 0 deletions