summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2019-10-15 15:40:16 +0100
committerAndrii Ostapenko <andrii.ostapenko@att.com>2020-05-18 08:06:05 -0500
commit2a8f89b1e52ad39dd1a5ae9963dab398105272d5 (patch)
tree52a9b1f5ed168db42cf51dbb3a1dfda9b5b5852a
parent95b2bbeab113d9f04d1c81f7f1b48bf692bce979 (diff)
downloadkeystone-2a8f89b1e52ad39dd1a5ae9963dab398105272d5.tar.gz
Stop explicitly requiring pycodestyle
pip doesn't have a dependency resolver. Instead, it "simply uses the first specification it finds for a project." [1] In Train, keystone switched from hacking 0.12.x/0.13.x to hacking 1.1.x [2]. That change explicitly added a pycodestyle dependency for reasons that aren't entirely clear to me, but pip's broken dependency resolution leads to the below funkiness when trying to install the dependencies. ERROR: flake8 2.6.2 has requirement pycodestyle<2.1,>=2.0, but you'll have pycodestyle 2.5.0 which is incompatible. As seen below, this can be easily reproduced and seems to happen because pip doesn't go further than one level of dependencies, meaning it knows about the dependency on flake8<2.7.0,>=2.6.0 from hacking, but not the dependency on pycodestyle<2.1,>=2.0 that this in-turn introduces. $ virtualenv venv $ source venv/bin/activate $ (venv) cat requirements.txt hacking>=1.1.0,<1.2.0 # Apache-2.0 pycodestyle>=2.0.0 # MIT License $ pip install -r requirements-new.txt Collecting hacking<1.2.0,>=1.1.0 Using cached ... Collecting pycodestyle>=2.0.0 Using cached ... Collecting six>=1.10.0 Using cached ... Collecting flake8<2.7.0,>=2.6.0 Using cached ... Collecting pbr!=2.1.0,>=2.0.0 Using cached ... Collecting mccabe<0.6,>=0.2.1 Using cached ... Collecting pyflakes!=1.2.0,!=1.2.1,!=1.2.2,<1.3,>=0.8.1 Using cached ... ERROR: flake8 2.6.2 has requirement pycodestyle<2.1,>=2.0, but you'll have pycodestyle 2.5.0 which is incompatible. Installing collected packages: six, pycodestyle, mccabe, pyflakes, flake8, pbr, hacking Successfully installed flake8-2.6.2 hacking-1.1.0 mccabe-0.5.3 pbr-5.4.3 pycodestyle-2.5.0 pyflakes-1.2.3 six-1.12.0 The solution is simple: stop explicitly requiring this dependency and instead rely on flake8 bringing it in. [1] https://pip.pypa.io/en/stable/user_guide/#requirements-files [2] I3fc591e09c1e25a3bd2a3922880772ea9617f1e3 This cherry-pick includes an update to setup.cfg to align the python-memcached version with global requirements. Also includes an update for doc/requirements.txt to facilitate changes for global sphinx requirements. Change-Id: Ic0991d3eeae018609be0ecbd43fa0b0b9f13d6ba Signed-off-by: Stephen Finucane <sfinucan@redhat.com> (cherry picked from commit 5c71ebd7a92d25df83e2e7cc5fad9990e9eebbf5) (cherry picked from commit 7eeb144b7dbca29cb30cf65bb740227f4c4c7a55)
-rw-r--r--doc/requirements.txt3
-rw-r--r--lower-constraints.txt5
-rw-r--r--setup.cfg3
-rw-r--r--test-requirements.txt1
4 files changed, 7 insertions, 5 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 7247e6aee..47cafa36c 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -2,7 +2,8 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
openstackdocstheme>=1.18.1 # Apache-2.0
-sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
+sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
sphinxcontrib-apidoc>=0.2.0 # BSD
sphinxcontrib-seqdiag>=0.8.4 # BSD
reno>=2.5.0 # Apache-2.0
diff --git a/lower-constraints.txt b/lower-constraints.txt
index dab11af99..3aa07482c 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -8,7 +8,7 @@ docutils==0.14
dogpile.cache==0.6.2
fixtures==3.0.0
flake8-docstrings==0.2.1.post1
-flake8==2.5.5
+flake8==2.6.0
Flask===1.0.2
Flask-RESTful===0.3.5
freezegun==0.3.6
@@ -51,7 +51,8 @@ pymongo===3.0.2
pysaml2==4.5.0
PyJWT==1.6.1
python-keystoneclient==3.8.0
-python-memcached===1.56
+python-memcached==1.56;python_version=='2.7'
+python-memcached==1.58;python_version>='3.4'
pytz==2013.6
requests==2.14.2
scrypt==0.8.0
diff --git a/setup.cfg b/setup.cfg
index 20f674d9a..80ad3b74c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -31,7 +31,8 @@ ldap =
python-ldap>=3.0.0 # PSF
ldappool>=2.3.1 # MPL
memcache =
- python-memcached>=1.56 # PSF
+ python-memcached>=1.56:python_version=='2.7' # PSF
+ python-memcached>=1.58:python_version>='3.4' # PSF
mongodb =
pymongo!=3.1,>=3.0.2 # Apache-2.0
bandit =
diff --git a/test-requirements.txt b/test-requirements.txt
index a86a1fa44..6cdc34d31 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -4,7 +4,6 @@
hacking>=1.1.0,<1.2.0 # Apache-2.0
pep257==0.7.0 # MIT License
-pycodestyle>=2.0.0 # MIT License
flake8-docstrings==0.2.1.post1 # MIT
bashate>=0.5.1 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0