tox >= 3.2.0 breaks module import

Created on 7 Oct 2018  路  12Comments  路  Source: tox-dev/tox

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:

https://github.com/borgbackup/borg/issues/4094

normal wanted hard

All 12 comments

Can you investigate and find the actual problem?

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.

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.

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

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.

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

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

https://github.com/tox-dev/tox/compare/3.1.0...3.2.0

https://github.com/tox-dev/tox/compare/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.

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

https://github.com/tox-dev/tox/compare/3.1.3...3.2.0#diff-a7d930bb82917e733a5436ee035e5842L193

and the deps change to depend on a newer setuptools.

https://github.com/tox-dev/tox/compare/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.

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 https://github.com/encode/django-rest-framework/pull/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.

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

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

Was this page helpful?
0 / 5 - 0 ratings