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

tox >= 3.2.0 breaks module import #1037

Closed
ThomasWaldmann opened this issue Oct 6, 2018 · 12 comments
Closed

tox >= 3.2.0 breaks module import #1037

ThomasWaldmann opened this issue Oct 6, 2018 · 12 comments
Labels
bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. level:hard rought estimate that this might be quite hard to implement
Milestone

Comments

@ThomasWaldmann
Copy link

ThomasWaldmann commented Oct 6, 2018

After working ok for a long time, suddenly our build on travis-ci (linux) started to fail, having troubles importing the "main" module borg.archiver.

I had the suspicion that it might be due to a tox change / regression, so i downgraded tox and it worked again.

See there for details / links to travis:

borgbackup/borg#4094

@gaborbernat
Copy link
Member

Can you investigate and find the actual problem?

@ThomasWaldmann
Copy link
Author

The problem is that the import is not working.

I tried to reproduce it locally, but failed to (works ok). Don't feel like debugging this on travis.

@gaborbernat gaborbernat added bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. labels Oct 8, 2018
@gaborbernat gaborbernat added this to the 3.6 milestone Oct 8, 2018
@gaborbernat gaborbernat modified the milestones: 3.6, 3.7 Dec 16, 2018
@obestwalter
Copy link
Member

Hi @ThomasWaldmann I saw you "fixed" it, by freezing the tox version. Did you try again with a recent version of tox? If that problem still occurs it might be worth having a closer look.

@ThomasWaldmann
Copy link
Author

@obestwalter I am doing some experiments right now, see issue link above.

@obestwalter
Copy link
Member

obestwalter commented Jan 14, 2019

Still broken then ... https://travis-ci.org/borgbackup/borg/jobs/479214516

What changed between 3.2 and 3.3 was mainly adding pep 517 support, so my hunch is that it has to do with that, but I have no time to look further atm.

@ThomasWaldmann
Copy link
Author

IIRC, it was the change to 3.2.0 (not: 3.3.0) that broke it.

@obestwalter
Copy link
Member

oh <= :). that looks much less suspicious even ...

3.1.0...3.2.0

@ThomasWaldmann
Copy link
Author

ThomasWaldmann commented Jan 14, 2019

3.1.3...3.2.0 3.1.3 works, 3.2.0 not, so this is the suspicious diff.

not sure how the dependencies/requirements of tox changed, whether we need to search there also.

@obestwalter
Copy link
Member

the changed paths around the thread safe changes can't possibly be it, so then only these changes remain:

3.1.3...3.2.0#diff-a7d930bb82917e733a5436ee035e5842L193

and the deps change to depend on a newer setuptools.

3.1.3...3.2.0#diff-2eeaed663bd0d25b7e608891384b7298L64

I can remember dimly that we tried to change from pip to python -m pip during the sprint in 2016 and had weird effects in one package, so it really might have to do with that.

@rpkilby
Copy link
Member

rpkilby commented Jan 17, 2019

I can remember dimly that we tried to change from pip to python -m pip during the sprint in 2016 and had weird effects in one package, so it really might have to do with that.

I commented on additional pip vs python -m pip weirdness here. I don't know if it's related/helpful, but your comment jogged my memory.

Where I debugged the issue was in encode/django-rest-framework#6139. My solution was to remove the .egg-info, as this interacted with the pip vs python -m pip issue, preventing wheel installation.

tox now invokes pip as a python module instead of through its entry
point. "python -m" adds the current directory to the PYTHONPATH, picking
up the .egg-info/ metadata directory, tricking pip into thinking that
the package is already installed (and thus not installing the wheel).
Deleting the metadata directory fixes this.

@gaborbernat gaborbernat added the level:hard rought estimate that this might be quite hard to implement label Jan 25, 2019
@jugmac00
Copy link
Member

The OP has moved away from Travis and the affected branch is out of maintenance.

@ThomasWaldmann
Copy link
Author

Right, borg 1.0-maint branch won't see updates. Also, we do not currently see this tox issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:normal affects many people or has quite an impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. level:hard rought estimate that this might be quite hard to implement
Projects
None yet
Development

No branches or pull requests

5 participants