Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-22 Thread Dieter Maurer
Jim Fulton wrote at 2005-10-21 15:42 -0400: > ... [Tim] >>>I'm sure sys.setdefaultencoding will vanish in a future Python >>>release, since it wasn't intended to persist beyond initial >>>development to begin with. [DM] >> Hopefully only after Python cleaned up the separation >> between text and b

Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-22 Thread Dieter Maurer
Tim Peters wrote at 2005-10-21 15:27 -0400: > ... >[Dieter Maurer] >> Nowadays, life is hell without a sensible "setdefaultencoding": >> >> Many isolated modules intersperse unicode in an otherwise >> "string" dominated world causing wide spread >> UnicodeDecodingErrors. [Tim] >And setdefaulten

Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-21 Thread Jim Fulton
Dieter Maurer wrote: Tim Peters wrote at 2005-10-19 15:15 -0400: ... Nowadays, life is hell without a sensible "setdefaultencoding": True, but to many things would break if we set the default encoding to disabled. :) Many isolated modules intersperse unicode in an otherwise "string" d

Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-21 Thread Tim Peters
[not Tim Peters; this part was written by Fredrik Lundh, and got misattributed in the reply] >> ... >>When the Unicode type was added, people disagreed on what the >>[default] encoding should be (ASCII, ISO-8859-1, or UTF-8), so the >>setdefaultencoding hook was added so we could play

Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-20 Thread Dieter Maurer
Tim Peters wrote at 2005-10-19 15:15 -0400: > ... >When the Unicode type was added, people disagreed on what the >[default] encoding should be (ASCII, ISO-8859-1, or UTF-8), so the >setdefaultencoding hook was added so we could play with it. >Unfortunately, nobody got around to remo

Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-20 Thread Tim Peters
[Stefan Rank] > Thanks for the clarification, sounds very reasonable. > I'm now trying to think of my incentive for changing it in the first > place, and my notes say that it was necessary to get some file > operations to behave. > Unfortunately I did not note which ones they were, but I think it w

Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-19 Thread Stefan Rank
on 19.10.2005 21:15 Tim Peters said the following: [Stephan Richter] I am pretty sure that it is strongly discouraged to change the default encoding in site.py. Can anyone confirm this? I think based on this discouragement we always assume that noone changes their site.pp. If you're running a

Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-19 Thread Tim Peters
[Stephan Richter] > I am pretty sure that it is strongly discouraged to change the default > encoding in site.py. Can anyone confirm this? I think based on this > discouragement we always assume that noone changes their site.pp. If you're running a personal Python, and are willing to deal with all

Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-19 Thread Stephan Richter
On Wednesday 19 October 2005 03:25, Stefan Rank wrote: > - would it make sense to put:: > >      reload(sys) >      sys.setdefaultencoding('ascii') > >    there instead? >    To allow the tests to run also on non-default systems. Using reload is a big no-no. > - does a non-ascii defaultencoding p

Re: [Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-19 Thread Stephan Richter
On Wednesday 19 October 2005 03:25, Stefan Rank wrote: > I recently ran the zope3 test suite on a fresh checkout. > and I have a non-ascii default encoding set up in my python's > site.py file. To be exact, on Windows it is:: I am pretty sure that it is strongly discouraged to change the default

[Zope3-dev] test errors due to ascii defaultencoding assumption

2005-10-19 Thread Stefan Rank
Hi list I recently ran the zope3 test suite on a fresh checkout. and I have a non-ascii default encoding set up in my python's site.py file. To be exact, on Windows it is:: In [1]: import sys In [2]: sys.getdefaultencoding() Out[2]: 'cp1252' (on the Linux box it's 'utf-8') I get several