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

Already on GitHub? Sign in to your account

virtualenv-1.11.2 not compatible with Python-2.6 anymore #572

Closed
cecton opened this Issue Feb 24, 2014 · 8 comments

Comments

Projects
None yet
5 participants

cecton commented Feb 24, 2014

Hello,

Sorry I'm totally new with virtualenv so this issue may be false.

  • I downloaded and compiled Python2.6.
  • I tried to run my virtualenv-1.11.2 provided by my distribution (which is virtualenv-1.11.2) using Python-2.6 and it fails while trying to import pip.
  • I tried to make a simple test to make sure it is an incompatibility problem:
  • export the PYTHONPATH make sure it will use the system virtualenv-1.11.2
  • start python2.6 and simply import pip
[09:22:12] ~> set -x PYTHONPATH /usr/lib/python2.7/site-packages/virtualenv_support/pip-1.5.2py2.py3-none-any.whl
[09:22:32] ~> ./env_2.6/bin/python -c 'import pip'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/__init__.py", line 11, in <module>
  File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/vcs/subversion.py", line 4, in <module>
  File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/index.py", line 17, in <module>
  File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/_vendor/html5lib/__init__.py", line 16, in <module>
  File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/_vendor/html5lib/html5parser.py", line 7, in <module>
  File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/_vendor/html5lib/tokenizer.py", line 21, in <module>
  File "/usr/lib/python2.7/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/_vendor/html5lib/trie/py.py", line 12, in __init__
TypeError: All keys must be strings

It is the exact same error. Am I right to conclude that if Python-2.6 can't import pip from virtualenv-1.11.2, it means that the module is not compatible anymore?

I downloaded virtualenv-1.9.1, use setup.py to install the library in my Python2.6 environment, and run the same test. It works fine.

After that, I downloaded the same version of my system of virtualenv and install in my Python2.6 environment. I got the very same error:

[09:58:30] ~> set -e PYTHONPATH
[10:13:46] ~> env_2.6/bin/virtualenv -p env_2.6/bin/python /tmp/new_env
New python executable in /tmp/new_env/bin/python
Installing setuptools, pip...
  Complete output from command /tmp/new_env/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/__init__.py", line 11, in <module>
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/vcs/subversion.py", line 4, in <module>
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/index.py", line 17, in <module>
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/_vendor/html5lib/__init__.py", line 16, in <module>
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/_vendor/html5lib/html5parser.py", line 7, in <module>
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/_vendor/html5lib/tokenizer.py", line 21, in <module>
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv_support/pip-1.5.2-py2.py3-none-any.whl/pip/_vendor/html5lib/trie/py.py", line 12, in __init__
TypeError: All keys must be strings
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv.py", line 2338, in <module>
    main()
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv.py", line 824, in main
    symlink=options.symlink)
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv.py", line 992, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv.py", line 960, in install_wheel
    'PIP_NO_INDEX': '1'
  File "/home/cecile/env_2.6/lib/python2.6/site-packages/virtualenv.py", line 902, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /tmp/new_env/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1
Running virtualenv with interpreter env_2.6/bin/python

Hope to not make a mistake.

Edit: tested virtualenv-1.11.2 with Python-2.6.5, it works fine

Best regards

Member

Ivoz commented Apr 9, 2014

Edit: tested virtualenv-1.11.2 with Python-2.6.5, it works fine

So... is this still an issue then? Still present with 1.11.4?

cecton commented Apr 9, 2014

Tested with virtualenv-1.11.4 on Python 2.6 => same error
With Python 2.6.5 => okay

I'm wondering now... do you keep the compatibility with all 2.6 versions or only the last one?

Owner

pfmoore commented Apr 9, 2014

While in theory we support 2.6 in general, reality is that we focus on the latest micro release simply because we don't have the resources to cover the rest. (Personally, I don't even have 2.6.x installed).

If someone were to supply a PR fixing this we'd probably apply it (although @dstufft informs me that the issue is actually in html5lib not in virtualenv/pip itself) but my honest advice would be to use 2.6.5.

I'll leave the issue open in case anyone wants to take it further, though.

Owner

dstufft commented Apr 9, 2014

To be explicit, it appears from a first glance to be in html5lib, I haven't done any great investigation in it, I just looked at the traceback and i'm familar with how we're calling it.

cecton commented Apr 9, 2014

Suits me ^_^ Thanks

This still seems to not work for Python 2.6=>, and it doesn't look like anyone wants to take it further. The only reason this would be nice is for compatibility testing.

cecton commented Jan 4, 2016

Well, in the meantime I dropped the compatibility with Python<2.7 in my libs, so I don't really care anymore. If it's not for me you can keep the issue opened, otherwise you can close it.

Member

Ivoz commented Jan 9, 2016

Ok, seems mainly an issue that is with running a non-current 2.6 - The latest is 2.6.9. I'd hope distros would be at least updating to latest patch/security fixes for their distributions of software.

@Ivoz Ivoz closed this Jan 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment