Bug 1254187 - [origin_devexp_646]When sti build using based image python-27-centos7 or python-27-rhel7, both print"SyntaxError: invalid syntax"
[origin_devexp_646]When sti build using based image python-27-centos7 or pyt...
Status: CLOSED DUPLICATE of bug 1251001
Product: Red Hat Software Collections
Classification: Red Hat
Component: python-pip (Show other bugs)
Unspecified Unspecified
medium Severity medium
: alpha
: 2.1
Assigned To: Python Maintainers
Depends On: 1252211
  Show dependency treegraph
Reported: 2015-08-17 07:47 EDT by Eliska Slobodova
Modified: 2016-04-06 05:05 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1252211
Last Closed: 2016-04-06 05:05:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eliska Slobodova 2015-08-17 07:47:34 EDT
+++ 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):
openshift v1.0.4-176-gc5c1a3b
kubernetes v1.1.0-alpha.0-1155-gb73c53c
sti v1.0.1-35-g5631099

How reproducible:

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?


--- 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 
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":


Issue on pip:

--- 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.

Note You need to log in before you can comment on or make changes to this bug.