Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip syntax errors when installing modules for python 3 on python 2 #1954

Closed
benoitc opened this issue Aug 1, 2014 · 3 comments
Closed

pip syntax errors when installing modules for python 3 on python 2 #1954

benoitc opened this issue Aug 1, 2014 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@benoitc
Copy link

benoitc commented Aug 1, 2014

I am getting this warning when I try to install benoitc/gunicorn (branch fix/830) on python 2:

warning: no previously-included files matching '*.pyo' found under directory 'examples'
   File "/Users/benoitc/work/gunicorn_py2/lib/python2.7/site-packages/gunicorn/workers/gaiohttp.py", line 76
     yield from iterator
              ^
 SyntaxError: invalid syntax

While the python 3 support of this worker is handled by testing the version of python 3 in gunicorn, it seems that pip is trying to check the syntax of any modules depending on the version of Python it's running on. Is there any good way to remove this warning ?

@benoitc
Copy link
Author

benoitc commented Aug 1, 2014

More information about it. The error happen when it is trying to byte-compile the module:

 byte-compiling /Users/benoitc/work/gunicorn_py2/lib/python2.7/site-packages/gunicorn/workers/gaiohttp.py to gaiohttp.pyc
   File "/Users/benoitc/work/gunicorn_py2/lib/python2.7/site-packages/gunicorn/workers/gaiohttp.py", line 76
     yield from self.wsgi.close()
              ^
 SyntaxError: invalid syntax

@benoitc
Copy link
Author

benoitc commented Aug 1, 2014

maybe related to #1873

@dstufft
Copy link
Member

dstufft commented Aug 26, 2014

Closed via 09a74c6

@dstufft dstufft closed this as completed Aug 26, 2014
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Dec 27, 2015
- Update PORTVERSION and distinfo checksum (19.4.1)
- Match COMMENT to setup.py:description=
- Add LICENSE_FILE
- Options: Rename SETPROC option -> Add PROCTITLE to defaults
- Options: Add GAIOHTTP async worker
- Options: Update all descriptions
- Options: Remove TESTS optionjs
- Enable "concurrent" Python support
- Add NO_ARCH (architecture independent package)
- Rename test target to new conventions
- Check, limit, and add BROKEN message for Option/Python version
  combinations that aren't supported.
- Patch out non-compulsory dependencies from test requirements file
- Delete requirements_dev.txt patch file (no longer necessary)

- Add post-patch: target to remove _gaiohttp.py, because compileall() of this file
  fails on 2.x with a SyntaxError, but is not handled, so .py[co] files references
  are added to --record output, breaking file list generation. [1][2][3][4][5]

Changes:

  http://docs.gunicorn.org/en/stable/news.html

[1] benoitc/gunicorn#788
[2] benoitc/gunicorn#860
[3] benoitc/gunicorn#982
[4] pypa/pip#1873
[5] pypa/pip#1954


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@404558 35697150-7ecd-e111-bb59-0022644237b5
koobs added a commit to freebsd/freebsd-ports that referenced this issue Dec 27, 2015
- Update PORTVERSION and distinfo checksum (19.4.1)
- Match COMMENT to setup.py:description=
- Add LICENSE_FILE
- Options: Rename SETPROC option -> Add PROCTITLE to defaults
- Options: Add GAIOHTTP async worker
- Options: Update all descriptions
- Options: Remove TESTS optionjs
- Enable "concurrent" Python support
- Add NO_ARCH (architecture independent package)
- Rename test target to new conventions
- Check, limit, and add BROKEN message for Option/Python version
  combinations that aren't supported.
- Patch out non-compulsory dependencies from test requirements file
- Delete requirements_dev.txt patch file (no longer necessary)

- Add post-patch: target to remove _gaiohttp.py, because compileall() of this file
  fails on 2.x with a SyntaxError, but is not handled, so .py[co] files references
  are added to --record output, breaking file list generation. [1][2][3][4][5]

Changes:

  http://docs.gunicorn.org/en/stable/news.html

[1] benoitc/gunicorn#788
[2] benoitc/gunicorn#860
[3] benoitc/gunicorn#982
[4] pypa/pip#1873
[5] pypa/pip#1954
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

2 participants