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

how to shoot yourself in the foot on python3.2 #3390

Closed
wm75 opened this issue Jan 20, 2016 · 6 comments
Closed

how to shoot yourself in the foot on python3.2 #3390

wm75 opened this issue Jan 20, 2016 · 6 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@wm75
Copy link

wm75 commented Jan 20, 2016

Perhaps unavoidably pip on python3.2 asks you to upgrade to pip version 8.0.0:

You are using pip version 7.1.2, however version 8.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

What's really stupid is what happens if you follow that advice:

python3.2 -m pip install pip --upgrade
Collecting pip
Downloading pip-8.0.0-py2.py3-none-any.whl (1.2MB)
100% |████████████████████████████████| 1.2MB 663kB/s
Installing collected packages: pip
Found existing installation: pip 7.1.2
Uninstalling pip-7.1.2:
Successfully uninstalled pip-7.1.2
Successfully installed pip-8.0.0

So, ok, nobody cared to check the python version in setup.py and do something to inform the user of the foreseeable problems, but even worse, your way back is barred:

python3.2 -m pip install pip==7.1.2 --upgrade
/usr/local/lib/python3.2/site-packages/pip/_vendor/pkg_resources/init.py:87: UserWarning: Support for Python 3.0-3.2 has been dropped. Future versions will fail here.
warnings.warn(msg)
Traceback (most recent call last):
File "/usr/local/lib/python3.2/runpy.py", line 141, in _run_module_as_main
mod_name, loader, code, fname = _get_module_details(mod_name)
File "/usr/local/lib/python3.2/runpy.py", line 111, in _get_module_details
return _get_module_details(pkg_main_name)
File "/usr/local/lib/python3.2/runpy.py", line 103, in _get_module_details
loader = get_loader(mod_name)
File "/usr/local/lib/python3.2/pkgutil.py", line 461, in get_loader
return find_loader(fullname)
File "/usr/local/lib/python3.2/pkgutil.py", line 471, in find_loader
for importer in iter_importers(fullname):
File "/usr/local/lib/python3.2/pkgutil.py", line 427, in iter_importers
import(pkg)
File "/usr/local/lib/python3.2/site-packages/pip/init.py", line 15, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/local/lib/python3.2/site-packages/pip/vcs/mercurial.py", line 9, in
from pip.download import path_to_url
File "/usr/local/lib/python3.2/site-packages/pip/download.py", line 35, in
from pip.utils.ui import DownloadProgressBar, DownloadProgressSpinner
File "/usr/local/lib/python3.2/site-packages/pip/utils/ui.py", line 15, in
from pip._vendor.progress.bar import Bar, IncrementalBar
File "/usr/local/lib/python3.2/site-packages/pip/_vendor/progress/bar.py", line 48
empty_fill = u'∙'
^
SyntaxError: invalid syntax

So what good is this user warning if the tool fails anyway?
Dropping support for Python3.2 is one thing, but doing so in such an ill-planned way another.

@dstufft dstufft added this to the 8.0.1 milestone Jan 20, 2016
@wm75
Copy link
Author

wm75 commented Jan 20, 2016

Not sure about this, but would it help to offer the 8.0.0 wheel only as pip-8.0.0-py2.py33-none-any.whl to avoid its use when installing from Python3.2, then add a version check to the source distribution that prevents installation with an appropriate error message?

@simon-clematide
Copy link

This one catched me too on Debian with Python3.2 and it's absolutely annoying that the pip package manager recommends to install a version which turns the package manager into an unusable state on the system.

@wm75
Copy link
Author

wm75 commented Jan 21, 2016

since yesterday, you can at least restore things by running:

curl https://bootstrap.pypa.io/3.2/get-pip.py | python3.2 - --upgrade

(see the new get-pip.py repo at https://github.com/pypa/get-pip)

@simon-clematide
Copy link

That's very helpful information. Thanks.

@rodrigob
Copy link

rodrigob commented Mar 4, 2016

Simply avoiding the upgrade recommendation would already help a lot.
Avoiding the upgrade itself would be even better !

@dstufft
Copy link
Member

dstufft commented Mar 24, 2017

Closing this. Python 3.2 is no longer supported and the data-requires-python support in newer versions of pip won't download a version that doesn't support your current running Python.

@dstufft dstufft closed this as completed Mar 24, 2017
mineo added a commit to mineo/enumerate_skip that referenced this issue Apr 6, 2018
It's not supported by pip anymore (see pypa/pip#3390)
and not by the PSF either (see https://www.python.org/dev/peps/pep-0392/).
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 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

4 participants