New submission from Richard Oudkerk <shibt...@gmail.com>: If you subclass OSError without calling OSError.__init__() then you can get a crash. For example
Python 3.3.0b1 (default:cfbe51e66749, Jun 30 2012, 20:50:54) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> class MyError(OSError): ... def __init__(self): ... pass ... [61116 refs] >>> repr(MyError()) Assertion failed: obj, file ..\Objects\unicodeobject.c, line 2646 Note that str(MyError()) results in a crash without hitting a failed assertion. The problem does not occur in Python 3.2, and it does not affect subclasses of Exception. ---------- components: Interpreter Core messages: 164423 nosy: sbt priority: normal severity: normal stage: needs patch status: open title: stringification of subclasses of OSError can cause crash type: crash versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15229> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com