vendoring: remove dependency on setuptools from vendored pytest#15612
Merged
vendoring: remove dependency on setuptools from vendored pytest#15612
Conversation
Member
Author
|
@adamjstewart: can you try this out and see if it allows you to test within your spack environment successfully? |
299d1ba to
71edbca
Compare
Member
Author
|
I'm able to get tests working in a bare python (no |
scheibelp
requested changes
Mar 23, 2020
Member
scheibelp
left a comment
There was a problem hiding this comment.
This looks like it will work but IMO should be edited for clarity. Right now I think it's not clear from reading the code why turning these functions into noops is "OK" (i.e. why they don't cause the rest of the code to break).
71edbca to
4fccede
Compare
Member
Author
|
@scheibelp: ready for re-review. |
4fccede to
3e7c07f
Compare
Member
Author
|
I made some changes based on @scheibelp's comments that simplify this quite a bit. |
Previously, `spack test` would fail within a new spack environment, because it could not import `pkg_resources` (part of `setuptools`) Parts of `pytest` use `setuptools`, but we do not need them for Spack, so it's an unnecessary dependency. - [x] Remove calls to parts of `pytest` that need setuptools
3e7c07f to
441e4ad
Compare
Member
Author
|
@scheibelp: I removed both functions -- I suppose that does make it much less likely someone will reintroduce this bug. |
scheibelp
approved these changes
Mar 23, 2020
Member
|
Thanks! |
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.
Closes #15369.
Closes #9034.
Follow-up of #9261.
Previously,
spack testwould fail within a new spack environment, because it could not importpkg_resources(part ofsetuptools) Parts ofpytestusesetuptools, but we do not need them for Spack, so it's an unnecessary dependency.Patching
pytestis nasty but it's a lot simpler than vendoring yet another mess of packages. Also, recent versions ofpytestdo not depend onsetuptools(see pytest-dev/pytest#5063). We're just stuck with an old version ofpytestbecause we still support Python 2.6.Astute readers may note that
jinja2also usespkg_resources, but we don't use any parts of it that actually importpkg_resources. So we do not need to remove these imports fromjinja2.pytestthat need setuptools