[issue27924] ensurepip raises TypeError after pip uninstall

2016-08-31 Thread Nick Coghlan

Nick Coghlan added the comment:

Yeah, this is a known problem with pip where if you run it with sudo, it will 
happily uninstall system managed files from the system Python.

To fix your system (if you haven't already):

$ sudo dnf reinstall python2-pip

(Anyone that accidentally uninstalls one of DNF's dependencies is in for a 
world of pain, but fortunately for this case pip doesn't fall into that 
category)

For the actual "pip currently happily uninstalls distro packages when run with 
sudo" problem, 
https://mail.python.org/pipermail/distutils-sig/2016-January/028080.html is the 
most recent discussion of that situation.

So we have a basic concept in place for how to make "sudo pip uninstall" less 
dangerous, it just requires coordination between PyPA updates to pip and 
downstream distro packaging policies to get us there.

--
nosy: +encukou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27924] ensurepip raises TypeError after pip uninstall

2016-08-31 Thread Donald Stufft

Donald Stufft added the comment:

rewheel is definitely some Fedora patches.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27924] ensurepip raises TypeError after pip uninstall

2016-08-31 Thread John Mark Vandenberg

John Mark Vandenberg added the comment:

Well, it wasnt my intention to remove the vendor package.  There were two 
versions, and I assume it would remove the older package which wasnt supplied 
by the vendor, but it removed both.

Anyways, I see that most of the code path is in 
https://github.com/fedora-python/rewheel/blob/master/python2-ensurepip-rewheel.patch#L36

I guess there isnt much the cpython module can do here.

--
resolution:  -> third party
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27924] ensurepip raises TypeError after pip uninstall

2016-08-31 Thread Ned Deily

Ned Deily added the comment:

Sorry, 2.7.12 built from source.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27924] ensurepip raises TypeError after pip uninstall

2016-08-31 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +dstufft, ncoghlan

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27924] ensurepip raises TypeError after pip uninstall

2016-08-31 Thread Ned Deily

Ned Deily added the comment:

You used "pip uninstall" to uninstall the Fedora-supplied pip (/usr/bin/pip)?  
That would be a really *bad* thing to do.  And does Fedora supply a modified 
ensurepip / pip?  What happens if you try this with a vanilla Python 3.5.x 
built from source?  My initial reaction is that there is nothing Python can do 
about this and probably not pip either.

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27924] ensurepip raises TypeError after pip uninstall

2016-08-31 Thread John Mark Vandenberg

New submission from John Mark Vandenberg:

After uninstalling pip on Fedora 24, ensurepip get_records_to_pack returns 
None, causing rewheel.rewheel_from_record to raise TypeError: 'NoneType' object 
is not iterable.

While this is probably not a scenario that CPython supports directly, it would 
be nice if it handled it a bit better.

Presumably this is using the system python-pip 8.1.0, while there is another 
pip present, and it is uninstalling both pip 7.1.2 and 8.1.0 at the same time.

$ sudo pip uninstall pip
Uninstalling pip-7.1.2:
  /usr/bin/pip
  /usr/bin/pip2
  /usr/bin/pip2.7
  /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/DESCRIPTION.rst
  /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/METADATA
  /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/RECORD
  /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/WHEEL
  /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/entry_points.txt
  /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/metadata.json
  /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/pbr.json
  /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/top_level.txt
  /usr/lib/python2.7/site-packages/pip/__init__.py
  /usr/lib/python2.7/site-packages/pip/__init__.pyc
  /usr/lib/python2.7/site-packages/pip/__main__.py
  /usr/lib/python2.7/site-packages/pip/__main__.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/__init__.py
  /usr/lib/python2.7/site-packages/pip/_vendor/__init__.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/_markerlib/__init__.py
  /usr/lib/python2.7/site-packages/pip/_vendor/_markerlib/__init__.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/_markerlib/markers.py
  /usr/lib/python2.7/site-packages/pip/_vendor/_markerlib/markers.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/__init__.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/__init__.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/cache.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/cache.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/__init__.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/__init__.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py
  
/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyc
  
/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py
  
/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/compat.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/compat.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/wrapper.py
  /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/wrapper.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/__init__.py
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/__init__.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/ansi.py
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/ansi.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/ansitowin32.py
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/ansitowin32.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/initialise.py
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/initialise.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/win32.py
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/win32.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/winterm.py
  /usr/lib/python2.7/site-packages/pip/_vendor/colorama/winterm.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/distlib/__init__.py
  /usr/lib/python2.7/site-packages/pip/_vendor/distlib/__init__.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/__init__.py
  /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/__init__.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/misc.py
  /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/misc.pyc
  /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.py
  /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyc