﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24408	"""pip install .../master.zip"" fails with UnicodeEncodeError in pip"	Daniel Hahler	nobody	"After
https://github.com/django/django/commit/bd059e3f8c6311dcaf8afe5e29ef373f7f84cf26
installing master from a Github zip fails on Python 2 (2.7.9), using pip 6.0.8:

{{{
% pip install https://github.com/django/django/archive/master.zip
DEPRECATION: --download-cache has been deprecated and will be removed in the future. Pip now automatically uses and configures its cache.
Collecting https://github.com/django/django/archive/master.zip
  Downloading https://github.com/django/django/archive/master.zip (11.4MB)
    100% |################################| 11.4MB 42kB/s 
  Exception:
  Traceback (most recent call last):
    File ""…/venv/lib/python2.7/site-packages/pip/basecommand.py"", line 232, in main
      status = self.run(options, args)
    File ""…/venv/lib/python2.7/site-packages/pip/commands/install.py"", line 339, in run
      requirement_set.prepare_files(finder)
    File ""…/venv/lib/python2.7/site-packages/pip/req/req_set.py"", line 355, in prepare_files
      do_download, session=self.session,
    File ""…/venv/lib/python2.7/site-packages/pip/download.py"", line 782, in unpack_url
      session,
    File ""…/venv/lib/python2.7/site-packages/pip/download.py"", line 671, in unpack_http_url
      unpack_file(from_path, location, content_type, link)
    File ""…/venv/lib/python2.7/site-packages/pip/utils/__init__.py"", line 648, in unpack_file
      flatten=not filename.endswith('.whl')
    File ""…/venv/lib/python2.7/site-packages/pip/utils/__init__.py"", line 528, in unzip_file
      leading = has_leading_dir(zip.namelist()) and flatten
    File ""…/venv/lib/python2.7/site-packages/pip/utils/__init__.py"", line 253, in has_leading_dir
      prefix, rest = split_leading_dir(path)
    File ""…/venv/lib/python2.7/site-packages/pip/utils/__init__.py"", line 237, in split_leading_dir
      path = str(path)
  UnicodeEncodeError: 'ascii' codec can't encode character u'\u2297' in position 60: ordinal not in range(128)
}}}

The affected file isn't included in the normal package/wheel (because it's in tests/), but the above procedure is commonly used to test packages against Django master / unreleased branches.
"	Bug	closed	Packaging	dev	Normal	invalid			Unreviewed	0	0	0	0	0	0
