#24761: Cannot `pip install` the zip of master
--------------------------------------+--------------------
Reporter: kezabelle | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Packaging | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
I'm pretty certain I used to be able to do this, though I'm not sure how
long ago it was:
{{{
pip install https://github.com/django/django/archive/master.zip
}}}
which is ostensibly the quickest way to get a copy of `master` (currently
targetting `1.9.x`) without doing a `git clone`, which takes a bunch of
time. It's also the easiest way of setting up continuous integration
against `master` (eg: I think one of the ways in which I previously used
this was to have travis-ci build using it to check for upcoming failues)
This no longer works, giving the following traceback:
{{{
Exception:
Traceback (most recent call last):
File "lib/python2.7/site-packages/pip/basecommand.py", line 246, in
main
status = self.run(options, args)
File "lib/python2.7/site-packages/pip/commands/install.py", line 342,
in run
requirement_set.prepare_files(finder)
File "lib/python2.7/site-packages/pip/req/req_set.py", line 345, in
prepare_files
functools.partial(self._prepare_file, finder))
File "lib/python2.7/site-packages/pip/req/req_set.py", line 290, in
_walk_req_to_install
more_reqs = handler(req_to_install)
File "lib/python2.7/site-packages/pip/req/req_set.py", line 487, in
_prepare_file
download_dir, do_download, session=self.session,
File "lib/python2.7/site-packages/pip/download.py", line 827, in
unpack_url
session,
File "lib/python2.7/site-packages/pip/download.py", line 677, in
unpack_http_url
unpack_file(from_path, location, content_type, link)
File "lib/python2.7/site-packages/pip/utils/__init__.py", line 630, in
unpack_file
flatten=not filename.endswith('.whl')
File "lib/python2.7/site-packages/pip/utils/__init__.py", line 510, in
unzip_file
leading = has_leading_dir(zip.namelist()) and flatten
File "lib/python2.7/site-packages/pip/utils/__init__.py", line 224, in
has_leading_dir
prefix, rest = split_leading_dir(path)
File "lib/python2.7/site-packages/pip/utils/__init__.py", line 208, 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 `path` at the point of error is:
{{{
path = u'django-
master/tests/staticfiles_tests/apps/test/static/test/\u2297.txt'
}}}
I raised a bug against [https://github.com/pypa/pip/issues/2729 pip
itself] assuming that the lack of unicode handling was a problem in pip,
but a response suggests that there is no safe fix for their end (because
of how zip works?) and that Django ought to create & destroy such test
files as part of the test case, rather than statically embedded on a known
path, which seems sensible enough, if it's feasible in the test cases
which touch such files.
--
Ticket URL: <https://code.djangoproject.com/ticket/24761>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.502f5dacbd5fcb9daa8b1ff709c7159b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.