From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PgcFH-0002GD-0o for garchives@archives.gentoo.org; Sat, 22 Jan 2011 12:07:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1CF85E0C0C for ; Sat, 22 Jan 2011 12:07:05 +0000 (UTC) Received: from mta-1.ms.rz.rwth-aachen.de (mta-1.ms.rz.RWTH-Aachen.DE [134.130.7.72]) by pigeon.gentoo.org (Postfix) with ESMTP id 5C890E0B36 for ; Sat, 22 Jan 2011 11:56:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-version: 1.0 Content-disposition: inline Content-type: text/plain; charset=UTF-8 Received: from ironport-out-1.rz.rwth-aachen.de ([134.130.5.40]) by mta-1.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <0LFF005VIAI4PMA0@mta-1.ms.rz.RWTH-Aachen.de> for gentoo-user@lists.gentoo.org; Sat, 22 Jan 2011 12:56:28 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.60,362,1291590000"; d="scan'208";a="89735121" Received: from relay-2.ms.rz.rwth-aachen.de (HELO relay.rwth-aachen.de) ([134.130.7.75]) by ironport-in-1.rz.rwth-aachen.de with ESMTP; Sat, 22 Jan 2011 12:56:29 +0100 Received: from numa-i.igpm.rwth-aachen.de (numa-i.igpm.RWTH-Aachen.DE [134.130.161.252]) by relay.rwth-aachen.de (8.14.4+Sun/8.13.8/1) with ESMTP id p0MBuSh7023965 for ; Sat, 22 Jan 2011 12:56:28 +0100 (CET) Received: from numa-i (localhost [127.0.0.1]) by numa-i.igpm.rwth-aachen.de (Postfix) with ESMTP id 156F43309 for ; Sat, 22 Jan 2011 12:56:35 +0100 (CET) Date: Sat, 22 Jan 2011 12:56:35 +0100 From: Helmut Jarausch Subject: Re: [gentoo-user] Re: python wide-unicode problem To: gentoo-user@lists.gentoo.org In-reply-to: X-Mailer: Balsa 2.4.9 Message-id: <1295697395.3501.0@numa-i> Content-transfer-encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 2b3295ff0156b6d757998d6f590b58ff On 01/21/2011 10:14:33 PM, walt wrote: > On 01/21/2011 07:48 AM, Helmut Jarausch wrote: > > On 01/21/2011 04:26:09 PM, walt wrote: > >> On 01/21/2011 12:13 AM, Helmut Jarausch wrote: > >>> Hi, > >>> > >>> using Python3.1, if I say > >>> import site > >>> > >>> I get > >>> > >>> File "/usr/lib64/python3.1/site.py", line 472, in setencoding > >>> sys.setdefaultencoding(encoding) # Needs Python Unicode > >> build ! > >>> ValueError: Can only set default encoding to utf-8 > >>> > >>> But > >>> > >>> emerge -vp dev-lang/python-3.1.3 shows > >>> USE=3D"doc gdbm ipv6 ncurses readline sqlite ssl threads tk (wide- > >>> unicode) xml -build -examples -wininst" > >>> > >>> Why is 'wide-unicode' in parentheses? > >> > >> Hm. Try using a different tool, like equery u python. Note the > >> warning > >> about changing that useflag. > > > > Thanks, unfortunately I don't understand the output > > I've got > > [ Legend : U - final flag setting for installation] > > [ : I - package is installed with flag ] > > [ Colors : set, unset ] > > * Found these USE flags for dev-lang/python-3.1.3: > > ..... > > - + wide-unicode : Enable wide Unicode implementation which uses > 4- > > byte > > Unicode characters. Switching of this USE flag > > changes ABI > > of Python and requires reinstallation of many > > Python > > modules. (DON'T DISABLE THIS UNLESS YOU KNOW > WHAT > > YOU'RE > > DOING) > > > > So, I have U- but I+ on wide-unicode > > What does that mean? >=20 > I just re-emerged python:3.1 as a test, and I see exactly the same=20 > but > I don't get that error. >=20 > For some reason site.py certainly thinks your python3 is built=20 > without > wide-unicode. Have you tried re-installing python3 just for fun? >=20 > You could try deleting site.pyc and site.pyo as an easy test. >=20 Thanks Walt, I've noticed that my root account did use an ASCII locale. Now I've=20 changed that to the same locale en_US.iso88591 that is used in non-root=20 accounts on my machine. With that I rebuild Python3.1. And now, the error is gone. A bit strange. I came along this problem when I tried to emerge the new=20 package app-portage/smart-live-rebuild This fails because the author's name contain non-ascii (even non=20 latin1) characters. The author (Micha=C5=82 G=C3=B3rny) sent me a patch to=20 distutils.eclass and after generating an utf-8 locale LANG=3Den_US.utf-8 emerge -v app-portage/smart-live-rebuild finally succeeded. He says, it's a Python problem. Have a nice weekend, Helmut. =