coala-bears icon indicating copy to clipboard operation
coala-bears copied to clipboard

pip fails to upgrade six on python3.4

Open abhishalya opened this issue 5 years ago • 22 comments

jsonschema has dropped support for Python3.4 as reported on gitter by @bkhanale.

The failure is here.

abhishalya avatar Mar 06 '19 07:03 abhishalya

What do we have to do here in a nutshell @abhishalya ?

shivank1234 avatar Mar 12 '19 15:03 shivank1234

The internal dependency seems to be conflicting, one of the reasons maybe the one I mentioned in the issue. We need a workaround, finally the goal is to make CI green.

I would request you to work on your own fork before submitting a PR, since if you activate travis on your PR you could check the build status (without the need of creating a PR).

abhishalya avatar Mar 13 '19 17:03 abhishalya

Cool I'll work upon it

shivank1234 avatar Mar 13 '19 19:03 shivank1234

@abhishalya so did you find a solution to fix this ? i too faced the travis failed

AkshJain99 avatar Mar 15 '19 13:03 AkshJain99

@abhishalya so did you find a solution to fix this ?

@AkshJain99 No, I haven't worked upon it yet. I guess @shivank1234 wanted to work on this issue.

i too faced the travis failed

Where do you face this issue?

abhishalya avatar Mar 15 '19 13:03 abhishalya

i got this issue while adding one bear, for python 3.5 and 3.6 its working good but for python 3.4 itz not working

AkshJain99 avatar Mar 15 '19 14:03 AkshJain99

Ah, this should be closed via https://github.com/coala/coala-bears/pull/2890 @KVGarg.

abhishalya avatar Mar 15 '19 15:03 abhishalya

@abhishalya Adding six~=1.11.0 to bear-requirements.txt is making Travis CI a perfect green. Have a look https://travis-ci.com/KVGarg/coala-bears/builds/104618212 But I guess adding a new dependency to bear-requirements.txt won't be accepted IMO. I think this change is needed to be done in the coala-core repository because the error also says that there is a version conflict with dependency installed by the coala repository.

KVGarg avatar Mar 15 '19 19:03 KVGarg

@KVGarg No, we can't do that. six is not our direct dependency (not coala or coala-bears). Its indirect.

You are free to research on it, I'll could only work on this tomorrow. If you fixed it you can append the changes to your PR.

abhishalya avatar Mar 15 '19 19:03 abhishalya

After updating the versions of several packages acc. to openSuse Build log the error shouldn't have been raised because there many packages that has a requirement of six>=1.11.0 but the package gets installed without satisfying this condition on travis CI. IDK why is this happening ? HTTPolice, jsonschema, packaging etc. are dependencies that currently require six>=1.11.0.

KVGarg avatar Mar 15 '19 23:03 KVGarg

After spending hours on it, I'm just able to find only one workaround to solve this problem - pip install six -U in the travis.yml packaging~=16.8 has a requirement of six (any version) HTTPolice~=0.7.0 has a requirement of six~=1.10.0 jsonschema~=3.0.1 has a requirement of six~=1.11.0

six>=1.11.0 isn't getting installed anywhere in the program by any dependency. The virtual env created already includes package six which is being used by Travis CI and hence doesn't install any new of six. And when we create venv using base Python3.4 version six~=1.10.0 is included which is causing a conflict error.

KVGarg avatar Mar 16 '19 06:03 KVGarg

@abhishalya did you find any solution to this problem?

KVGarg avatar Mar 17 '19 13:03 KVGarg

@abhishalya did you find any solution to this problem?

Sorry I was busy with my classes. Besides your findings are incorrect. pip won't install a package unless its told. Creating a new virtualenv in python3.4 won't include six by default (I verified this myself). The six is being used by many of the requirements, and is being installed by one of them first. I'll experiment few things today and will let you know.

abhishalya avatar Mar 17 '19 13:03 abhishalya

Creating a new virtualenv in python3.4 won't include six by default

Yeah, it's not getting included. Few days back I created a new env for coala-bears at that time it included six now I created a new env and it's not including 😄 Maybe I used some diff. instruction to create a new env.

KVGarg avatar Mar 17 '19 14:03 KVGarg

The six >= 1.11.0 dependency is as follows:

coala-bears==0.12.0.dev99999999999999
  - nbformat [required: ~=4.1]
    - jsonschema [required: >=2.4,!=2.5.0]
      - six [required: >=1.11.0]

Hence the dependency is third-order and idk why it gets ignores somehow. The six is never checked for version >= 1.11.0. To install six >= 1.11.0, I tried the following methods but the results were not satisfying:

  1. Change the order of the requirements giving nbformat the highest priority.
  2. Delete the cache on travis.
  3. Use pip install --no-cache-dir -r requirements.txt in install section.
  4. Locally try to install requirements on a Python3.4 virtualenv.

Step 1, 2 and 3 resulted in same results. The six 1.10.0 was already satisfied when installing requirements (idk why though). When doing step 4 six 1.12.0 was getting installed, which was expected. So, till now I think the only option is to include six in requirements.txt file.

If anyone has any suggestions please comment here, I would like to know what I am missing here.

abhishalya avatar Mar 25 '19 13:03 abhishalya

Satisfied with your research. I was able to figure out these findings and finded a workaround of either installing six>=1.11.0 Or upgrading the current version of six using pip. Till now, I guess these are the only two possible solutions for making the CI green.

KVGarg avatar Mar 25 '19 13:03 KVGarg

@KVGarg Upgrading the current version of six resulted in a travis red.I tried it out in one of the builds but I am not too sure.IMO adding it to the bear requirements.txt seems a bit more sane option.

sladyn98 avatar Mar 25 '19 13:03 sladyn98

Upgrading six on travis is not a very good option since it has the most chance of breaking the function of other dependencies. We need to keep the version for six manually updated with the requirements in coala-bears (through which we could avoid breakages).

Upgrading the current version of six resulted in a travis red

This seems a bit odd to me. Do you mean that six 1.12.0 is incompatible? Could you link the build log here.

abhishalya avatar Mar 25 '19 13:03 abhishalya

IMO adding it to the bear requirements.txt seems a bit more sane option.

👍

KVGarg avatar Mar 25 '19 15:03 KVGarg

Irrelevant now due to https://github.com/coala/coala-bears/pull/2910

abhishalya avatar Jun 04 '19 14:06 abhishalya

Problem still exists. PR was wrong because bear-requirements.txt is generated from the metadata inside the bears.

test-requirements.txt is where we do fixes for our CI, working around pip oddities. And that needs to be done in mobans repo so that the fixes are available in all our repos. Issue raised there https://gitlab.com/coala/mobans/issues/110 , and has a PR.

jayvdb avatar Jun 20 '19 22:06 jayvdb

test-requirements.txt is where we do fixes for our CI, working around pip oddities. And that needs to be done in mobans repo so that the fixes are available in all our repos. Issue raised there https://gitlab.com/coala/mobans/issues/110 , and has a PR.

Yep, I got that now :)

abhishalya avatar Jun 21 '19 03:06 abhishalya