Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow recent pytest versions to be used with Spack #25371

Merged
merged 7 commits into from Nov 18, 2021

Conversation

alalazo
Copy link
Member

@alalazo alalazo commented Aug 11, 2021

Currently Spack vendors pytest at 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:

  • Use the vendored pytest@3.2.5 only as a fallback solution, if the Python interpreter used for Spack doesn't provide a newer one
  • Be able to parse pytest --collect-only in all the different output formats from v3.2.5 to v6.2.4 and use it consistently for spack unit-test --list-*
  • Updating the unit tests in Github Actions to use a more recent pytest version

@alalazo alalazo force-pushed the qa/allow_to_use_recent_pytest branch from 5ad3419 to 9be123d Compare August 11, 2021 21:34
@alalazo alalazo force-pushed the qa/allow_to_use_recent_pytest branch from 9be123d to 874f951 Compare August 12, 2021 10:50
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.
@alalazo alalazo added ci Issues related to Continuous Integration maintainers vendored-dependencies labels Aug 18, 2021
@alalazo alalazo force-pushed the qa/allow_to_use_recent_pytest branch from 874f951 to 8e53d6c Compare August 18, 2021 17:42
@alalazo alalazo mentioned this pull request Aug 20, 2021
2 tasks
@alalazo alalazo force-pushed the qa/allow_to_use_recent_pytest branch from 8e53d6c to 4613028 Compare November 17, 2021 17:27
@alalazo alalazo marked this pull request as ready for review November 18, 2021 07:47
@haampie
Copy link
Member

haampie commented Nov 18, 2021

Works for me, notice that output has changed its format in github actions, but that's not a big deal.

@alalazo alalazo merged commit f981682 into spack:develop Nov 18, 2021
@alalazo alalazo deleted the qa/allow_to_use_recent_pytest branch November 18, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues related to Continuous Integration maintainers vendored-dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants