+++ This bug was initially created as a clone of Bug #1252211 +++ Description of problem: When sti build python image with python app source using based image openshift/python-27-centos7 or python-27-rhel7,both print error:"File "/tmp/pip-build-Jk4HJj/gunicorn/gunicorn/workers/_gaiohttp.py", line 68,yield from self.wsgi.close(),SyntaxError: invalid syntax" Version-Release number of selected component (if applicable): devenv_fedora_2137 openshift v1.0.4-176-gc5c1a3b kubernetes v1.1.0-alpha.0-1155-gb73c53c sti v1.0.1-35-g5631099 How reproducible: always Steps to Reproduce: 1. Pull base image:openshift/python-27-centos7 $ docker pull openshift/python-27-centos7 2. STI build your own python image with python app source using based image openshift/python-27-centos7 $ sti build https://github.com/openshift/sti-python.git openshift/python-27-centos7 --context-dir="2.7/test/standalone-test-app" my-python-image Actual results: $ sti build https://github.com/openshift/sti-python.git openshift/python-27-centos7 --context-dir="2.7/test/standalone-test-app" my-python-image I0810 11:04:54.209586 01289 sti.go:401] ---> Copying application source ... I0810 11:04:54.216854 01289 sti.go:401] ---> Installing dependencies ... I0810 11:04:56.166370 01289 sti.go:401] Downloading/unpacking gunicorn (from -r requirements.txt (line 1)) I0810 11:04:56.642452 01289 sti.go:401] Installing collected packages: gunicorn I0810 11:04:56.838937 01289 sti.go:401] Compiling /tmp/pip-build-Jk4HJj/gunicorn/gunicorn/workers/_gaiohttp.py ... I0810 11:04:56.839102 01289 sti.go:401] File "/tmp/pip-build-Jk4HJj/gunicorn/gunicorn/workers/_gaiohttp.py", line 68 I0810 11:04:56.839114 01289 sti.go:401] yield from self.wsgi.close() I0810 11:04:56.839118 01289 sti.go:401] ^ I0810 11:04:56.839123 01289 sti.go:401] SyntaxError: invalid syntax I0810 11:04:56.839127 01289 sti.go:401] I0810 11:04:56.839131 01289 sti.go:401] Successfully installed gunicorn I0810 11:04:56.839432 01289 sti.go:401] Cleaning up... Expected results: Sti build successfully Additional info: --- Additional comment from Ben Parees on 2015-08-11 00:23:20 EDT --- Rodolfo can you take a look at this and/or pull the SCL guys who did the 2.7 image in? thanks --- Additional comment from wewang on 2015-08-11 04:07:09 EDT --- when excute the commands : sti build https://github.com/openshift/django-ex.git openshift/python-27-centos7 my-python-image or sti build https://github.com/openshift/django-ex.git openshift/python-27-rhel7 my-python-image have the same issues: I0811 08:00:14.901104 18891 sti.go:401] Compiling /tmp/pip-build-er3RdY/gunicorn/gunicorn/workers/_gaiohttp.py ... I0811 08:00:14.901134 18891 sti.go:401] File "/tmp/pip-build-er3RdY/gunicorn/gunicorn/workers/_gaiohttp.py", line 68 I0811 08:00:14.901141 18891 sti.go:401] yield from self.wsgi.close() I0811 08:00:14.901145 18891 sti.go:401] ^ I0811 08:00:14.901149 18891 sti.go:401] SyntaxError: invalid syntax I0811 08:00:14.901153 18891 sti.go:401] --- Additional comment from Rodolfo Carvalho on 2015-08-11 05:13:41 EDT --- I've seen this before, and it is a benign message caused by an old version of PIP. The fix would be upgrading pip, which is not feasible unless we have newer packages and we're not using them... IIRC we use pip 1.5.6, release on May 17, 2014. The next version which fixes this problem is 6.0, released on Dec 22, 2014. There are many GitHub issues in the gunicorn project mentioning this "bug": https://github.com/benoitc/gunicorn/issues/860 https://github.com/benoitc/gunicorn/issues/810 https://github.com/benoitc/gunicorn/issues/1017 https://github.com/benoitc/gunicorn/issues/982 https://github.com/benoitc/gunicorn/issues/974 https://github.com/benoitc/gunicorn/issues/952 https://github.com/benoitc/gunicorn/issues/871 https://github.com/benoitc/gunicorn/issues/868 https://github.com/benoitc/gunicorn/issues/819 https://github.com/benoitc/gunicorn/issues/788 Issue on pip: https://github.com/pypa/pip/issues/1873 --- Additional comment from Michal Fojtik on 2015-08-17 07:35:12 EDT --- wewang, since this is pending a fix in upstream pip being available in RHEL package of 'pip', I'm moving this bug to SCL team to deal with it. There is nothing we can do about this right now. Please feel free to re-open this after the SCL team bump the version and you will still see this error.