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

pip fails to upgrade six on python3.4 #2885

Open
abhishalya opened this issue Mar 6, 2019 · 22 comments
Open

pip fails to upgrade six on python3.4 #2885

abhishalya opened this issue Mar 6, 2019 · 22 comments
Labels

Comments

@abhishalya
Copy link
Member

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

The failure is here.

@shivank1234
Copy link

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

@abhishalya
Copy link
Member Author

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).

@shivank1234
Copy link

Cool I'll work upon it

@AkshJain99
Copy link
Member

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

@abhishalya
Copy link
Member Author

@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?

@AkshJain99
Copy link
Member

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

@abhishalya
Copy link
Member Author

Ah, this should be closed via #2890 @KVGarg.

@KVGarg
Copy link
Contributor

KVGarg commented Mar 15, 2019

@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.

@abhishalya
Copy link
Member Author

abhishalya commented Mar 15, 2019

@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.

@KVGarg
Copy link
Contributor

KVGarg commented Mar 15, 2019

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
Copy link
Contributor

KVGarg commented Mar 16, 2019

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
Copy link
Contributor

KVGarg commented Mar 17, 2019

@abhishalya did you find any solution to this problem?

@abhishalya
Copy link
Member Author

@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.

@KVGarg
Copy link
Contributor

KVGarg commented Mar 17, 2019

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.

@abhishalya
Copy link
Member Author

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.

@KVGarg
Copy link
Contributor

KVGarg commented Mar 25, 2019

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.

@sladyn98
Copy link

@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.

@abhishalya
Copy link
Member Author

abhishalya commented Mar 25, 2019

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.

@KVGarg
Copy link
Contributor

KVGarg commented Mar 25, 2019

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

👍

abhishalya added a commit to abhishalya/coala-bears that referenced this issue Mar 26, 2019
coala-bears has been throwing internal version
conflict due to six requirement. This works as
temporary fix and ensures that six is managed
manually.

Closes coala#2885
abhishalya added a commit to abhishalya/coala-bears that referenced this issue Mar 26, 2019
coala-bears has been throwing internal version
conflict due to six requirement. This works as
temporary fix and ensures that six is managed
manually.

Closes coala#2885
@abhishalya
Copy link
Member Author

Irrelevant now due to #2910

@jayvdb jayvdb reopened this Jun 20, 2019
@jayvdb
Copy link
Member

jayvdb commented Jun 20, 2019

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 jayvdb changed the title Travis build faliure on python3.4 pip fails to upgrade six on python3.4 Jun 21, 2019
@abhishalya
Copy link
Member Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

7 participants