This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients sbt
Date 2012-06-30.20:09:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341086982.43.0.276121851076.issue15229@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-06-30 20:09:42sbtsetrecipients: + sbt
2012-06-30 20:09:42sbtsetmessageid: <1341086982.43.0.276121851076.issue15229@psf.upfronthosting.co.za>
2012-06-30 20:09:41sbtlinkissue15229 messages
2012-06-30 20:09:41sbtcreate