[Python-3000] Need help fixing failing Py3k Unittests in py3k-struni (original) (raw)

Walter Dörwald walter at livinglogic.de
Wed Jul 11 17:28:09 CEST 2007


Guido van Rossum wrote:

Fixed in subversion. Please do review r56252 to see that I did the right thing.

I haven't looked at test_descr.py but the rest looks good to me.

I guess for the final version of Py3000 type_set_name() in typeobject.c will not downgrade unicode strings to str8, but instead upgrade str8 objects to unicode.

Also now that PyObject_Unicode() tries unicode first and then tp_str should we rename all unicode methods to str, or will unicode stay?

Servus, Walter

On 7/11/07, Guido van Rossum <guido at python.org> wrote:

Yeah, I'm looking in to this right now. What a mess! But I'm close to a fix.

There's more that causes testdescr to fail however. Bleh, what a terrible unit test -- it doesn't use the unittest module, and a single failure aborts the rest of the test. --Guido On 7/11/07, Walter Dörwald <walter at livinglogic.de> wrote: > Christian Heimes wrote: > > > I found a bug in the str type that may affect a lot of tests. > > > > In the py3k-struni branch the str() constructor doesn't use str when > > the argument is an instance of a subclass of str. A user defined string > > can't change str(). The repr method isn't affected. > > This hasn't been rewired yet. Behind the covers str still behaves like > unicode, i.e. it uses unicode for conversion. > > Servus, > Walter _> ________________________ > Python-3000 mailing list > Python-3000 at python.org > http://mail.python.org/mailman/listinfo/python-3000 > Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org >

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-3000 mailing list