[issue11638] python setup.py sdist crashes if version is unicode

2011-11-11 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

First, the term 'gztar' doesn't appear in this ticket, and since the issue only 
applies when sdist --format gztar, I mention that here.

Also, issue8396 suggests encoding using sys.getfilesystemencoding().

--
nosy: +jason.coombs

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11638] python setup.py sdist crashes if version is unicode

2011-10-31 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Here's a test for the bug.
Thanks!  Some comments are strange, but the patch is a good start.

 One way to fix the symptom (maybe not the correct way) would be to edit
 tarfile._Stream._init_write_gz
I’d rather change distutils, not tarfile.  I think the best place to encode it 
may be in the cmd module (see the make_archive method).

 I'm not positive UTF-8 is right
It is.

 and maybe it should only convert if isinstance(self.name, unicode).
Indeed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11638] python setup.py sdist crashes if version is unicode

2011-10-29 Thread David Barnett

David Barnett davidbarne...@gmail.com added the comment:

Here's a test for the bug.

--
keywords: +patch
Added file: http://bugs.python.org/file23548/test_unicode_sdist.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11638] python setup.py sdist crashes if version is unicode

2011-10-29 Thread David Barnett

David Barnett davidbarne...@gmail.com added the comment:

One way to fix the symptom (maybe not the correct way) would be to edit 
tarfile._Stream._init_write_gz and change the line that reads
  self.__write(self.name + NUL)
to something like
  self.__write(self.name.encode('utf-8') + NUL)

tarfile is building up an encoded stream of bytes, and whatever self.name is it 
needs to be encoded before being inserted into the stream. I'm not positive 
UTF-8 is right, and maybe it should only convert if isinstance(self.name, 
unicode).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11638] python setup.py sdist crashes if version is unicode

2011-10-18 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

David:
I don’t think packaging and pysetup generate-setup have anything to do with 
this bug.  You can create a setup.py file manually and see the error with 
distutils in 2.7.

As I said before, I agree this is a bug.  I’m working on many things right now, 
so if someone volunteers to write a test and possibly a fix for this, it would 
help.  We have examples of creating tarball sdists in 
Lib/distutils/tests/test_sdist.py, one would just need to copy an example and 
pass version=u'1.0'.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11638] python setup.py sdist crashes if version is unicode

2011-10-17 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I can’t reproduce with pysetup or distutils 3.x.

--
components:  -Distutils2
title: pysetup un sdist crashes with weird trace if version is unicode by 
accident - python setup.py sdist crashes if version is unicode
versions:  -3rd party, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11638] python setup.py sdist crashes if version is unicode

2011-10-17 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Jens:
 Don't know it this is related to the usage of: from __future__ import
 unicode_literals ?
Yes.  This semi-magic import will turn your string literals into unicode 
literals, hence your name, version, etc. will be unicode objects.  It’s the 
same thing as writing version=u'1.0'.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11638] python setup.py sdist crashes if version is unicode

2011-10-17 Thread David Barnett

David Barnett davidbarne...@gmail.com added the comment:

I'm getting this exact error when I run python setup.py sdist, no matter what 
I do. Even if I just create a new project, type 1.0.0 for version, type a 
in all the other fields, and say no to every question; then run pysetup 
generate-setup and python setup.py sdist.

--
nosy: +mu_mind

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com