Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

pip version in Travis build #696

Closed
SimoRubi opened this issue Sep 29, 2021 · 5 comments
Closed

pip version in Travis build #696

SimoRubi opened this issue Sep 29, 2021 · 5 comments

Comments

@SimoRubi
Copy link
Member

In https://app.travis-ci.com/github/OCA/l10n-italy/jobs/536447241#L481 Travis raises an error because it is trying to install unidecode at version 1.3.1 but only versions < 1.3.0 support Python2.

In my local environment I can't reproduce the error and I found out that the difference is in pip's version:

  • Travis uses pip at version 18.1 (https://app.travis-ci.com/github/OCA/l10n-italy/jobs/536447241#L238-L239) and raises the error
  • My local virtualenv uses pip at version 20.3.4 and it automatically chooses the correct unidecode:
    $ pip install unidecode -v --no-cache
    [...]
      Found link https://files.pythonhosted.org/packages/9e/25/723487ca2a52ebcee88a34d7d1f5a4b80b793f179ee0f62d5371938dfa01/Unidecode-1.2.0-py2.py3-none-any.whl#sha256=12435ef2fc4cdfd9cf1035a1db7e98b6b047fe591892e81f34e94959591fad00 (from https://pypi.org/simple/unidecode/), version: 1.2.0
      Found link https://files.pythonhosted.org/packages/cd/31/245d8a384939aa0ee152c76fc62890f79f35fc41cd12839f5df268d9081d/Unidecode-1.2.0.tar.gz#sha256=8d73a97d387a956922344f6b74243c2c6771594659778744b2dbdaad8f6b727d (from https://pypi.org/simple/unidecode/), version: 1.2.0
      Found link https://files.pythonhosted.org/packages/2f/45/118b264e2740a29bb3f6e52431e2425c45f0ef44f37e985c147624042f00/Unidecode-1.3.0-py2.py3-none-any.whl#sha256=d01b0a22f7d90dea483da658782884de5162f40359fcaf79630738db93045c84 (from https://pypi.org/simple/unidecode/), version: 1.3.0
      Found link https://files.pythonhosted.org/packages/51/8e/1f9811ff26c04ff16e406e2cd7e5fc9b1e21ac80fcbaa29f38077733492b/Unidecode-1.3.0.tar.gz#sha256=9f8235681cc520912fe02e7dd73d455c2f0471f39d36485bc278b97b3e2f2390 (from https://pypi.org/simple/unidecode/), version: 1.3.0
      Skipping link: none of the wheel's tags match: py3-none-any: https://files.pythonhosted.org/packages/cf/c4/b27794ddf7658bd2b32418419a1b1165e109d238b3bd17ccd93a0fbd36b5/Unidecode-1.3.1-py3-none-any.whl#sha256=5f58926b9125b499f8ab6816828e737578fa3e31fa24d351a3ab7f4b7c064ab0 (from https://pypi.org/simple/unidecode/)
      Found link https://files.pythonhosted.org/packages/df/11/60a304d3bfa84173f0bfb64f81e26ac5b0bff4c657d8fb6c26ff89ab8240/Unidecode-1.3.1.tar.gz#sha256=6efac090bf8f29970afc90caf4daae87b172709b786cb1b4da2d0c0624431ecc (from https://pypi.org/simple/unidecode/), version: 1.3.1
      Skipping link: none of the wheel's tags match: py3-none-any: https://files.pythonhosted.org/packages/e2/3a/3c35e04ea05724f29c77bf5c7a27cf0c80310483655bfdc2c1c5d1ab36b6/Unidecode-1.3.2-py3-none-any.whl#sha256=215fe33c9d1c889fa823ccb66df91b02524eb8cc8c9c80f9c5b8129754d27829 (from https://pypi.org/simple/unidecode/) (requires-python:>=3.5)
      Link requires a different Python (2.7.18 not in: u'>=3.5'): https://files.pythonhosted.org/packages/41/a6/93288318cfae2fa0ca978dfe6bb94b22b7e9a9e98b6149a4af00b1e76ee8/Unidecode-1.3.2.tar.gz#sha256=669898c1528912bcf07f9819dc60df18d057f7528271e31f8ec28cc88ef27504 (from https://pypi.org/simple/unidecode/) (requires-python:>=3.5)
    Given no hashes to check 33 links for project 'unidecode': discarding no candidates
    Using version 1.2.0 (newest of versions: 0.4.1, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.4.10, 0.4.11, 0.4.12, 0.4.13, 0.4.14, 0.4.16, 0.4.17, 0.4.18, 0.4.19, 0.4.20, 0.4.21, 1.0.22, 1.0.23, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.3.0, 1.3.1)
    Collecting unidecode
      Created temporary directory: /tmp/pip-unpack-MlGDot
      Starting new HTTPS connection (1): files.pythonhosted.org:443
      https://files.pythonhosted.org:443 "GET /packages/9e/25/723487ca2a52ebcee88a34d7d1f5a4b80b793f179ee0f62d5371938dfa01/Unidecode-1.2.0-py2.py3-none-any.whl HTTP/1.1" 200 241669
      Downloading Unidecode-1.2.0-py2.py3-none-any.whl (241 kB)
         |████████████████████████████████| 241 kB 2.0 MB/s
    
    correctly discarding versions <=1.3.0 due to python's version

I've checked that pip's version is not fixed anywhere in this repo's code but it should be updated enough because it is installed with --upgrade

pip install --upgrade pip setuptools wheel

So the question is: why is Travis choosing an old version for pip?
How can I help to fix that?
I've looked through issues or PRs in this repo but found nothing

@sbidoul
Copy link
Member

sbidoul commented Dec 22, 2021

So the question is: why is Travis choosing an old version for pip?

I see no reason not to upgrade it.
It is already upgraded but later in the install script. We can do it at the beginning, I think.

Do you want to do a PR ? We can merge and revert if it causes too much trouble.

@SimoRubi
Copy link
Member Author

So the question is: why is Travis choosing an old version for pip?

I see no reason not to upgrade it. It is already upgraded but later in the install script. We can do it at the beginning, I think.

Do you want to do a PR ? We can merge and revert if it causes too much trouble.

Thanks for having a look, I already noticed that pip is upgraded twice in the script and in both cases that happens before installing other packages from requirements:

I think it wouldn't make sense to move it anywhere sooner in the script, that's why I haven't proposed a PR in the beginning.

I'm guessing that maybe the VM/container where Travis is running doesn't have any other more recent version of pip, or maybe it is using an old cached version for some reason?

@sbidoul
Copy link
Member

sbidoul commented Dec 22, 2021

I think it wouldn't make sense to move it anywhere sooner in the script

Why?

@SimoRubi
Copy link
Member Author

I think it wouldn't make sense to move it anywhere sooner in the script

Why?

Because the problem I have found is due to the pip used to install the requirements, so upgrading pip just before installing the requirements should be enough

@sbidoul
Copy link
Member

sbidoul commented Dec 22, 2021

Ah, yes, sorry, I misread your original post...

So... I don't know what's happening 🤷

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants