Allow recent pytest versions to be used with Spack#25371
Merged
alalazo merged 7 commits intospack:developfrom Nov 18, 2021
Merged
Allow recent pytest versions to be used with Spack#25371alalazo merged 7 commits intospack:developfrom
alalazo merged 7 commits intospack:developfrom
Conversation
5ad3419 to
9be123d
Compare
9be123d to
874f951
Compare
tgamblin
pushed a commit
that referenced
this pull request
Aug 17, 2021
Spack is internally using a patched version of `argparse` mainly to backport Python 3 functionality into Python 2. This PR makes it such that for the supported Python 3 versions we use `argparse` from the standard Python library. This PR has been extracted from #25371 where it was needed to be able to use recent versions of `pytest`. * Fixed formatting issues when using a pristine argparse.py * Fix error message for Python 3.X when missing positional arguments * Account for the change of API in Python 3.7 * Layout multi-valued args into columns in error messages * Seamless transition in develop if argparse.pyc is in external * Be more defensive in case we can't remove the file.
874f951 to
8e53d6c
Compare
8e53d6c to
4613028
Compare
haampie
approved these changes
Nov 18, 2021
Member
|
Works for me, notice that output has changed its format in github actions, but that's not a big deal. |
3 tasks
linsword13
added a commit
to linsword13/ramble
that referenced
this pull request
May 6, 2025
Newer pytest changed its `--collect-only` output, which then busts the assumption in our code's regex matching. (Spack's corresponding change a while back: spack/spack#25371.) In this case, instead of relying on explicit regex parsing, use pytest's `--quiet` flag to get the `path::test_name` pair. Also add in test coverage for the unit-test command.
linsword13
added a commit
to linsword13/ramble
that referenced
this pull request
May 6, 2025
Newer pytest changed its `--collect-only` output, which then busts the assumption in our code's regex matching. (Spack's corresponding change a while back: spack/spack#25371.) In this case, instead of relying on explicit regex parsing, use pytest's `--quiet` flag to get the `path::test_name` pair. Also add in test coverage for the unit-test command.
linsword13
added a commit
to linsword13/ramble
that referenced
this pull request
May 6, 2025
Newer pytest changed its `--collect-only` output, which then busts the assumption in our code's regex matching. (Spack's corresponding change a while back: spack/spack#25371.) In this case, instead of relying on explicit regex parsing, use pytest's `--quiet` flag to get the `path::test_name` pair. Also add in test coverage for the unit-test command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently Spack vendors
pytestat a version which is three major versions behind the latest (3.2.5 vs. 6.2.4). We do that since v3.2.5 is the latest version supporting Python 2.6. Remaining so much behind the currently supported versions though might introduce some incompatibilities and is surely a technical debt.This PR modifies Spack to:
[email protected]only as a fallback solution, if the Python interpreter used for Spack doesn't provide a newer onepytest --collect-onlyin all the different output formats from v3.2.5 to v6.2.4 and use it consistently forspack unit-test --list-*pytestversion