Bug 1344674 - Harmless warning showed during gunicorn install
Summary: Harmless warning showed during gunicorn install
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: python-pip
Version: python27
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 2.4
Assignee: Python Maintainers
QA Contact: Branislav Náter
URL:
Whiteboard:
Depends On: 1433067
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-10 10:12 UTC by Honza Horak
Modified: 2017-04-26 10:20 UTC (History)
4 users (show)

Fixed In Version: python27-python-pip-8.1.2-1.el7 python27-python-pip-8.1.2-1.el6
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Rebase package(s) to version: 8.1.2 Highlights, important fixes, or notable enhancements: Large amount of small fixes and improvements: https://pip.pypa.io/en/stable/news/
Clone Of:
Environment:
Last Closed: 2017-04-26 10:20:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1162 0 normal SHIPPED_LIVE Moderate: python27 security, bug fix, and enhancement update 2017-04-26 14:18:34 UTC

Description Honza Horak 2016-06-10 10:12:36 UTC
Description of problem:
This issue was found in python-27-rhel7 Docker container, while installing the gunicorn package using pip:
https://github.com/openshift/s2i-python/issues/117

Version-Release number of selected component (if applicable):
python27-python-pip-7.1.0-2.el7

How reproducible:
every-time

Steps to Reproduce:
1. s2i build git://github.com/mnagy/stress_test centos/python-27-centos7 python-sample-app  --context-dir=sti-python/test-app

Actual results:
File "/tmp/pip-build-izJkqx/gunicorn/gunicorn/workers/_gaiohttp.py", line 84
yield from self.wsgi.close()
^
SyntaxError: invalid syntax

Expected results:
no error shown

Additional info:
https://github.com/openshift/s2i-python/issues/117
https://github.com/benoitc/gunicorn/issues/788#issuecomment-92877751
What is important, pip install succeeds so it is not harmful very much

Comment 1 Honza Horak 2016-06-10 10:13:24 UTC
The issues mentioned in comment #0 say that rebasing pip to 8.1.2 fix this issue.

Comment 4 Tomas Orsava 2017-01-16 13:28:10 UTC
python-pip will be rebased to 8.1.2 which fixes the issue.

Comment 6 Branislav Náter 2017-03-10 16:24:23 UTC
Interesting results here. Where I run reproducer with old version of python27-python-pip (python27-python-pip-7.1.0-2.el7), I'm not able to reproduce issue:

# pip -V
pip 7.1.0 from /opt/rh/python27/root/usr/lib/python2.7/site-packages (python 2.7)
# s2i build git://github.com/mnagy/stress_test centos/python-27-centos7 python-sample-app  --context-dir=sti-python/test-app
I0310 06:04:18.470415 01945 docker.go:354] Image "centos/python-27-centos7:latest" not available locally, pulling ...
I0310 06:04:37.884809 01945 clone.go:30] Downloading "git://github.com/mnagy/stress_test" ("sti-python/test-app") ...
I0310 06:04:38.145701 01945 install.go:251] Using "assemble" installed from "image:///usr/libexec/s2i/assemble"
I0310 06:04:38.145753 01945 install.go:251] Using "run" installed from "image:///usr/libexec/s2i/run"
I0310 06:04:38.145768 01945 install.go:251] Using "save-artifacts" installed from "image:///usr/libexec/s2i/save-artifacts"
---> Installing application source ...
---> Installing dependencies ...
E0310 06:04:38.793800 01945 util.go:91] You are using pip version 7.1.0, however version 9.0.1 is available.
E0310 06:04:38.793829 01945 util.go:91] You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting gunicorn (from -r requirements.txt (line 1))
Downloading gunicorn-19.7.0-py2.py3-none-any.whl (112kB)
Installing collected packages: gunicorn
Successfully installed gunicorn-19.7.0
<snip>
===================================================================

When running with newer pip (python27-python-pip-8.1.2-1.el7), I can see bellow that pip 7.1.0 was used (...using pip version 7.1.0, however version 9.0.1 is available.):
# pip -V
pip 8.1.2 from /opt/rh/python27/root/usr/lib/python2.7/site-packages (python 2.7)
[0 root@qeos-248 ~]# s2i build git://github.com/mnagy/stress_test centos/python-27-centos7 python-sample-app  --context-dir=sti-python/test-app
I0310 06:05:49.061696 02544 clone.go:30] Downloading "git://github.com/mnagy/stress_test" ("sti-python/test-app") ...
I0310 06:05:49.283092 02544 install.go:251] Using "assemble" installed from "image:///usr/libexec/s2i/assemble"
I0310 06:05:49.283126 02544 install.go:251] Using "run" installed from "image:///usr/libexec/s2i/run"
I0310 06:05:49.283139 02544 install.go:251] Using "save-artifacts" installed from "image:///usr/libexec/s2i/save-artifacts"
---> Installing application source ...
---> Installing dependencies ...
E0310 06:05:49.973364 02544 util.go:91] You are using pip version 7.1.0, however version 9.0.1 is available.
E0310 06:05:49.973415 02544 util.go:91] You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting gunicorn (from -r requirements.txt (line 1))
Downloading gunicorn-19.7.0-py2.py3-none-any.whl (112kB)
Installing collected packages: gunicorn
Successfully installed gunicorn-19.7.0
<snip>
==================================================================

And test with just running "pip install gunicorn". No issue present:
# pip install gunicorn
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting gunicorn
  Downloading gunicorn-19.7.0-py2.py3-none-any.whl (112kB)
    100% |████████████████████████████████| 114kB 2.1MB/s 
Installing collected packages: gunicorn
Successfully installed gunicorn-19.7.0
=================================================================

But running installation in verbose mode shows syntax error:
# pip -v install gunicorn
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting gunicorn
  Getting page https://pypi.python.org/simple/gunicorn/
  1 location(s) to search for versions of gunicorn:
  * https://pypi.python.org/simple/gunicorn/
  Getting page https://pypi.python.org/simple/gunicorn/
<snip>
Compiling /tmp/pip-build-ziOFLD/gunicorn/gunicorn/workers/_gaiohttp.py ...
    File "/tmp/pip-build-ziOFLD/gunicorn/gunicorn/workers/_gaiohttp.py", line 84
      yield from self.wsgi.close()
               ^
  SyntaxError: invalid syntax


BUT the same syntax error appears with pip 8.1.2 and even with newest pip 9.0.1:
# pip -v install gunicorn
Collecting gunicorn
  1 location(s) to search for versions of gunicorn:
  * https://pypi.python.org/simple/gunicorn/
  Getting page https://pypi.python.org/simple/gunicorn/
<snip>
Installing collected packages: gunicorn
  Compiling /tmp/pip-build-HyQ0ea/gunicorn/gunicorn/workers/_gaiohttp.py ...
    File "/tmp/pip-build-HyQ0ea/gunicorn/gunicorn/workers/_gaiohttp.py", line 84
      yield from self.wsgi.close()
               ^
  SyntaxError: invalid syntax
  

  changing mode of /opt/rh/python27/root/usr/bin/gunicorn to 755
  changing mode of /opt/rh/python27/root/usr/bin/gunicorn_paster to 755
Successfully installed gunicorn-19.7.0
Cleaning up...
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


Honzo, Tomas any thoughts?

Comment 7 Tomas Orsava 2017-03-13 08:51:05 UTC
I believe the syntax error showing up in verbose mode is correct, as the upstream discussion mentions that the warning is harmful and they decided to just make pip ignore it [0]. I'm not sure why it's not reproducible on 7.1.0 anymore, however.

[0] https://github.com/benoitc/gunicorn/issues/788#issuecomment-92877751

Comment 8 Tomas Orsava 2017-03-13 14:18:08 UTC
(In reply to Tomas Orsava from comment #7)
> upstream discussion mentions that the warning is harmful and they decided to

s/harmful/harmless/

Comment 9 Branislav Náter 2017-03-16 17:31:18 UTC
And it starts to be even more interesting. I've found out that collection pip is not used in images. See BZ#1433067.

Comment 10 Branislav Náter 2017-04-11 15:36:03 UTC
Several attempts to reproduce issue failed. Marking this bug as SanityOnly, as issue doesn't occur.

Comment 12 errata-xmlrpc 2017-04-26 10:20:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1162


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