Author vstinner
Recipients Arfrever, benjamin.peterson, ezio.melotti, pkt, python-dev, serhiy.storchaka, vstinner
Date 2015-04-03.08:53:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>     self.assertRaises(OverflowError, ("�"*(2**32//12 + 1)).upper)
> MemoryError

Hum, even with the PEP 393, this string is still large: 682 MB.

$ python3
Python 3.4.1 (default, Nov  3 2014, 14:38:10) 
>>> sys.getsizeof("�"*(2**32//12 + 1)) / 1024.**2

I guess that Serhiy suggests to put a @bigmemtest decorator on test_case_operation_overflow().

The test expects that large_string.upper() raises immediatly an OverflowError, so I understand that a new string is not created.

Hum, it's strange to have an OverflowError here. Integer overflow on memory allocation usually raises MemoryError, not OverflowError. It looks like unicodeobject.c is not consistent here.
Date User Action Args
2015-04-03 08:53:55vstinnersetrecipients: + vstinner, benjamin.peterson, ezio.melotti, Arfrever, python-dev, serhiy.storchaka, pkt
2015-04-03 08:53:54vstinnersetmessageid: <>
2015-04-03 08:53:54vstinnerlinkissue22643 messages
2015-04-03 08:53:54vstinnercreate