[issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters

2018-12-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> third party
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters

2018-12-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Even if you encode the Unicode default for output, the user can not specify the 
same value, unless you use custom converter. For example, if you encode u"早上好" 
as string "\xe6\x97\xa9\xe4\xb8\x8a\xe5\xa5\xbd" (in UTF-8), the user can only 
specify the argument as a 8-bit string "\xe6\x97\xa9\xe4\xb8\x8a\xe5\xa5\xbd" 
which differs from a Unicode string u"早上好".

Even if you use a custom converter which decodes 8-bit strings to Unicode, it 
makes sense to specify the default value as encoded string, because it will be 
pass to the converter.

Non-ascii unicode values never supported as default values. This issue is 
rather a feature request than a bug report. It is too late to add new features 
in 2.7. The right solution is to upgrade to Python 3. Eventually, solving 
similar issues was one of purposes of creating Python 3.

--

___
Python tracker 

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



[issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters

2018-10-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

@Victor I think this is an issue with optparse where it can't handle non-ASCII 
strings for %default that is exposed by pip. I can see similar places where 
non-ASCII strings can cause issue in argparse for unicode choices (issue35009). 
I think this is a general issue where str() is used where non-ASCII strings 
throw this error. I am quite new to unicode so I don't know if this issue needs 
to be fixed in Python 2.7 or it's an error from the user end where their script 
needs to be fixed?

--

___
Python tracker 

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



[issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters

2018-10-17 Thread STINNER Victor


STINNER Victor  added the comment:

pip is not part of Python 2, so I suggest to close this issue as "third party".

I dislike changing optparse just for pip. For me, the bug should be fixed in 
pip, not in optparse. I see a high risk of breaking applications which 
currently work as expected. If the default value is a non-ASCII string, 
unicode() will raise a UnicodeDecodeError.

--
nosy: +vstinner

___
Python tracker 

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



[issue24307] [Python 2] pip error on windows whose current user name contains non-ascii characters

2018-10-17 Thread STINNER Victor


Change by STINNER Victor :


--
title: pip error on windows whose current user name contains non-ascii 
characters -> [Python 2] pip error on windows whose current user name contains 
non-ascii characters

___
Python tracker 

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