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

Unnecessary downloading of dependencies when they are constrained #9232

potiuk opened this issue Dec 6, 2020 · 3 comments · Fixed by #9241

Unnecessary downloading of dependencies when they are constrained #9232

potiuk opened this issue Dec 6, 2020 · 3 comments · Fixed by #9241
type: bug A confirmed bug or unintended behavior


Copy link

potiuk commented Dec 6, 2020

When we try to install 1.10.14rc1 release of Airflow with fully consistent set of requirements, At least google-cloud-bigquery and oauthlib libraries are needlessly downloaded (all versions) despite being properly constrained in

If you look to the file you will see:

  • google-cloud-bigquery==2.5.0
  • oauthlib==3.1.0

Running it with old resolver or pip 20.2.4 works perfectly fine:

pyenv virtualenv 3.6.12 test-new-resolver4
pyenv activate test-new-resolver4
pip --upgrade pip=20.2.4
pip install "apache-airflow[devel_ci]==1.10.14rc1" --constraint ""

When I run pip check I got:

[jarek:~/code/airflow] [test-new-resolver4] add-per-provider-javascript(+0/-0,+12/-2)+ 1m8s ± pip check
No broken requirements found.

Then it fails with 20.3:

pip install --upgrade pip
pip --version
pip 20.3.1 from /home/jarek/.pyenv/versions/3.6.12/envs/test-new-resolver4/lib/python3.6/site-packages/pip (python 3.6)
pip install "apache-airflow[devel_ci]==1.10.14rc1" --constraint ""

What we get (despite having both google-cloud-bigquery==2.5.0:

Collecting google-cloud-bigquery[bqstorage,pandas]<3.0.0dev,>=1.11.1
  Using cached google_cloud_bigquery-2.4.0-py2.py3-none-any.whl (210 kB)
  Using cached google_cloud_bigquery-2.3.1-py2.py3-none-any.whl (208 kB)
  Using cached google_cloud_bigquery-2.2.0-py2.py3-none-any.whl (200 kB)
  Using cached google_cloud_bigquery-2.1.0-py2.py3-none-any.whl (190 kB)
  Using cached google_cloud_bigquery-2.0.0-py2.py3-none-any.whl (193 kB)
  Using cached google_cloud_bigquery-1.28.0-py2.py3-none-any.whl (187 kB)
  Using cached google_cloud_bigquery-1.27.2-py2.py3-none-any.whl (172 kB)
  Using cached google_cloud_bigquery-1.26.1-py2.py3-none-any.whl (170 kB)
  Using cached google_cloud_bigquery-1.26.0-py2.py3-none-any.whl (170 kB)
  Using cached google_cloud_bigquery-1.25.0-py2.py3-none-any.whl (169 kB)
  Using cached google_cloud_bigquery-1.24.0-py2.py3-none-any.whl (165 kB)
  Using cached google_cloud_bigquery-1.23.1-py2.py3-none-any.whl (162 kB)
  Using cached google_cloud_bigquery-1.23.0-py2.py3-none-any.whl (162 kB)
  Using cached google_cloud_bigquery-1.22.0-py2.py3-none-any.whl (161 kB)
  Using cached google_cloud_bigquery-1.21.0-py2.py3-none-any.whl (158 kB)
  Using cached google_cloud_bigquery-1.20.0-py2.py3-none-any.whl (154 kB)
  Using cached google_cloud_bigquery-1.19.1-py2.py3-none-any.whl (149 kB)
  Using cached google_cloud_bigquery-1.19.0-py2.py3-none-any.whl (149 kB)
  Using cached google_cloud_bigquery-1.18.1-py2.py3-none-any.whl (146 kB)
  Using cached google_cloud_bigquery-1.18.0-py2.py3-none-any.whl (146 kB)
  Using cached google_cloud_bigquery-1.17.1-py2.py3-none-any.whl (142 kB)
  Using cached google_cloud_bigquery-1.17.0-py2.py3-none-any.whl (140 kB)
  Using cached google_cloud_bigquery-1.16.1-py2.py3-none-any.whl (140 kB)
  Using cached google_cloud_bigquery-1.16.0-py2.py3-none-any.whl (139 kB)
  Using cached google_cloud_bigquery-1.15.1-py2.py3-none-any.whl (137 kB)
  Using cached google_cloud_bigquery-1.15.0-py2.py3-none-any.whl (133 kB)
  Using cached google_cloud_bigquery-1.14.1-py2.py3-none-any.whl (137 kB)
  Using cached google_cloud_bigquery-1.14.0-py2.py3-none-any.whl (132 kB)
  Using cached google_cloud_bigquery-1.13.1-py2.py3-none-any.whl (137 kB)
  Using cached google_cloud_bigquery-1.13.0-py2.py3-none-any.whl (132 kB)
  Using cached google_cloud_bigquery-1.12.2-py2.py3-none-any.whl (137 kB)
  Using cached google_cloud_bigquery-1.12.1-py2.py3-none-any.whl (130 kB)
  Using cached google_cloud_bigquery-1.12.0-py2.py3-none-any.whl (130 kB)
  Using cached google_cloud_bigquery-1.11.4-py2.py3-none-any.whl (134 kB)
  Using cached google_cloud_bigquery-1.11.3-py2.py3-none-any.whl (127 kB)
  Using cached google_cloud_bigquery-1.11.2-py2.py3-none-any.whl (127 kB)
  Using cached google_cloud_bigquery-1.11.1-py2.py3-none-any.whl (127 kB)

And then despite Having oauthlib==3.1.0 in the constrains, we get:

Collecting oauthlib[signedtoken]>=1.0.0
  Using cached oauthlib-3.0.2-py2.py3-none-any.whl (143 kB)
  Using cached oauthlib-3.0.1-py2.py3-none-any.whl (142 kB)
  Using cached oauthlib-3.0.0-py2.py3-none-any.whl (142 kB)
  Using cached oauthlib-2.1.0-py2.py3-none-any.whl (121 kB)
  Using cached oauthlib-2.0.7-py2.py3-none-any.whl (124 kB)
  Using cached oauthlib-2.0.6.tar.gz (127 kB)
  Using cached oauthlib-2.0.5.tar.gz (129 kB)
  Using cached oauthlib-2.0.4.tar.gz (127 kB)
  Using cached oauthlib-2.0.3.tar.gz (127 kB)
  Using cached oauthlib-2.0.2.tar.gz (125 kB)
  Using cached oauthlib-2.0.1.tar.gz (122 kB)
  Using cached oauthlib-2.0.0.tar.gz (122 kB)
  Using cached oauthlib-1.1.2.tar.gz (111 kB)
  Using cached oauthlib-1.1.1.tar.gz (108 kB)
  Downloading oauthlib-1.0.3.tar.gz (109 kB)
     |████████████████████████████████| 109 kB 2.1 MB/s 
  Downloading oauthlib-1.0.2.tar.gz (108 kB)
     |████████████████████████████████| 108 kB 4.7 MB/s 
  Downloading oauthlib-1.0.1.tar.gz (108 kB)
     |████████████████████████████████| 108 kB 4.7 MB/s 
  Downloading oauthlib-1.0.0.tar.gz (108 kB)
     |████████████████████████████████| 108 kB 4.1 MB/s 
  Using cached oauthlib-1.1.0-1.tar.gz (106 kB)
ERROR: Requested oauthlib[signedtoken]>=1.0.0 from (from jira->apache-airflow[devel_ci]==1.10.14rc1) has different version in metadata: '1.1.0'

And installation crashes here. This crash was originally raised in #9203 and it is likely workarounded (not solved yet - this is only possible because we asked oauthlib maintainers to yank the release and they kindly agreed) in #9226 .

I would love to know when we can expect fix to that.

Copy link
Contributor Author

potiuk commented Dec 6, 2020

CC: @pradyunsg

Copy link

uranusjr commented Dec 7, 2020

Fix proposed in #9241.

Copy link
Contributor Author

potiuk commented Dec 7, 2020


bors bot added a commit to duckinator/emanate that referenced this issue Dec 15, 2020
204: Update pip to 20.3.3 r=duckinator a=pyup-bot

This PR updates [pip]( from **20.3.1** to **20.3.3**.

   ### 20.3.3

Bug Fixes

- Revert &quot;Skip candidate not providing valid metadata&quot;, as that caused pip to be overeager about downloading from the package index. (`9264 &lt;;`_)
   ### 20.3.2


- New resolver: Resolve direct and pinned (``==`` or ``===``) requirements first
  to improve resolver performance. (`9185 &lt;;`_)
- Add a mechanism to delay resolving certain packages, and use it for setuptools. (`9249 &lt;;`_)

Bug Fixes

- New resolver: The &quot;Requirement already satisfied&quot; log is not printed only once
  for each package during resolution. (`9117 &lt;;`_)
- Fix crash when logic for redacting authentication information from URLs
  in ``--help`` is given a list of strings, instead of a single string. (`9191 &lt;;`_)
- New resolver: Correctly implement PEP 592. Do not return yanked versions from
  an index, unless the version range can only be satisfied by yanked candidates. (`9203 &lt;;`_)
- New resolver: Make constraints also apply to package variants with extras, so
  the resolver correctly avoids backtracking on them. (`9232 &lt;;`_)
- New resolver: Discard a candidate if it fails to provide metadata from source,
  or if the provided metadata is inconsistent, instead of quitting outright. (`9246 &lt;;`_)

Vendored Libraries

- Update vendoring to 20.8

Improved Documentation

- Update documentation to reflect that pip still uses legacy resolver by default in Python 2 environments. (`9269 &lt;;`_)


  - PyPI:
  - Changelog:
  - Homepage:

205: Update pytest to 6.2.1 r=duckinator a=pyup-bot

This PR updates [pytest]( from **6.1.2** to **6.2.1**.

*The bot wasn't able to find a changelog for this release. [Got an idea?](*

  - PyPI:
  - Homepage:

Co-authored-by: pyup-bot <>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
type: bug A confirmed bug or unintended behavior
None yet

Successfully merging a pull request may close this issue.

2 participants