Skip to content

fix(ci): do not install_egg_info to fix importlib_metadata not found #15255

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

Closed
wants to merge 7 commits into from

Conversation

joshuarli
Copy link
Member

@joshuarli joshuarli commented Oct 23, 2019

pluggy (via pytest)'s complaining about importlib_metadata again. This happened with the Riak test suite, which was removed (#15072) after I noticed it was deprecated. Back then, that was the path of least resistance, but now the issue's come back.

Related: pytest-dev/pluggy#205

@joshuarli joshuarli requested a review from wedamija October 23, 2019 23:15
@joshuarli
Copy link
Member Author

Dang, adding the importlib backport explicitly led to

  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/importlib_metadata/_compat.py", line 19, in <module>

    from backports.configparser import ConfigParser

ImportError: No module named backports.configparser

And pinning pluggy back down to 0.11.0 results in the same. Actually forcing pluggy back down will break during runtime:

pluggy.manager.PluginValidationError: Plugin 'metadata' could not be loaded: (pluggy 0.11.0 (/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages), Requirement.parse('pluggy<1.0,>=0.12'), set(['pytest']))!

@joshuarli
Copy link
Member Author

joshuarli commented Oct 24, 2019

Yep, looks like it was because we did python setup.py install_egg_info. Not entirely sure why but there was talk among pytest/pluggy devs about eggs not being too well supported.

EDIT: see #15255 (comment)

@joshuarli joshuarli changed the title fix(ci): add importlib.metadata backport to dev dependencies for pytest fix(ci): do not install_egg_info Oct 24, 2019
Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok, not sure if there was some reason we installed eggs in ci?

@joshuarli joshuarli changed the title fix(ci): do not install_egg_info fix(ci): do not install_egg_info to fix importlib_metadata not found Oct 24, 2019
@joshuarli
Copy link
Member Author

joshuarli commented Oct 24, 2019

Don't really know much about eggs, but I suspect it has something to do with testing sentry releases...? @mattrobenolt is this install_egg_info thing in ci good to be removed?

Edit: @BYK see above^

@joshuarli joshuarli requested review from mattrobenolt and BYK and removed request for mattrobenolt October 24, 2019 00:31
@joshuarli
Copy link
Member Author

joshuarli commented Oct 24, 2019

Hmm, ci in master seems to be working again. Probably some weird caching stuff, but I wanna say travis caching is per pr/branch. Wonder if the real solution was just to nuke travis cache (which was done during this pr). Because I was confused reading pytest-dev/pluggy#205 since the egg issues seem to have been fixed.

Anyways, I don't think these changes hurt anything.

@BYK
Copy link
Member

BYK commented Oct 24, 2019

So this was added by @mitsuhiko in #10654. Not sure you asked for my review but I don't have anything intelligent to say 😀

Yielding to @mitsuhiko

@BYK BYK requested review from mitsuhiko and removed request for BYK October 24, 2019 18:34
@joshuarli
Copy link
Member Author

Oh, matt just guessed you'd have more context. (I didn't try and follow the git blame trail, haha)

@mitsuhiko
Copy link
Contributor

@BYK it clearly says workaround ;) You overstate my comprehension of the nightmare that is python packaging.

@BYK
Copy link
Member

BYK commented Oct 24, 2019

@mitsuhiko, what I meant was I have no idea whether we still need this workaround or not and you were the closest to this car crash 😁

@mitsuhiko
Copy link
Contributor

From my understand we still need it. Yes. Otherwise travis will break on certain dependency changes.

@joshuarli joshuarli closed this Dec 5, 2019
@joshuarli joshuarli deleted the fix/add-importlib-backport-for-pytest branch December 5, 2019 11:54
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants