Skip to content

Commit

Permalink
Limits GitHub3.py in order to avoid backtracking (#21824)
Browse files Browse the repository at this point in the history
* Limits GitHub3.py in order to avoid backtracking

Github3 version 3.1.2 requires PyJWT>=2.3.0 which clashes with Flask App
Builder where PyJWT is <2.0.0 Actually GitHub3.1.0 already introduced
PyJWT>=2.3.0 but so far `pip` was able to resolve it without getting
into a long backtracking loop and figure out that github3 3.0.0 version
is the right version similarly limiting it to 3.1.2 causes pip not to
enter the backtracking loop. Apparently when there Are 3 versions with
PyJWT>=2.3.0 (3.1.0, 3.1.1 an 3.1.2) pip enters into backtrack loop and
fails to resolve that github3 3.0.0 is the right version to use.
This limitation could be removed if PyJWT limitation < 2.0.0 is dropped
from FAB or when pip resolution is improved to handle the case, The
issue which describes this PIP behaviour and hopefully allowing to
improve it is tracked in pypa/pip#10924.

GitOrigin-RevId: 16f5185d7fa01df9432bb1228dcd676c35745222
  • Loading branch information
potiuk authored and Cloud Composer Team committed Dec 7, 2022
1 parent 0faea9a commit 5ee610f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,16 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
'flake8-colors',
'flaky',
'freezegun',
'github3.py',
# Github3 version 3.1.2 requires PyJWT>=2.3.0 which clashes with Flask App Builder where PyJWT is <2.0.0
# Actually GitHub3.1.0 already introduced PyJWT>=2.3.0 but so far `pip` was able to resolve it without
# getting into a long backtracking loop and figure out that github3 3.0.0 version is the right version
# similarly limiting it to 3.1.2 causes pip not to enter the backtracking loop. Apparently when there
# are 3 versions with PyJWT>=2.3.0 (3.1.0, 3.1.1 an 3.1.2) pip enters into backtrack loop and fails
# to resolve that github3 3.0.0 is the right version to use.
# This limitation could be removed if PyJWT limitation < 2.0.0 is dropped from FAB or when
# pip resolution is improved to handle the case. The issue which describes this PIP behaviour
# and hopefully allowing to improve it is tracked in https://github.com/pypa/pip/issues/10924
'github3.py<3.1.0',
'gitpython',
'ipdb',
'jira',
Expand Down

0 comments on commit 5ee610f

Please sign in to comment.