cy99 / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Exception subclasses are incorrectly reported as not exported #131

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
>> test.py
class NotExported(Exception):
    pass

class Exported(object):
    pass

if __name__=='__main__':
    Exported()
    NotExported()

>> running "shedskin -e test.py"
*** SHED SKIN Python-to-C++ Compiler 0.7.1 ***
Copyright 2005-2010 Mark Dufour; License GNU GPL version 3 (See LICENSE)

[analyzing types..]
********************************100%
[generating c++ code..]
*WARNING* class not exported: NotExported
>> open test.cpp/hpp or run make and a python session:
NotExported is in the new module and fully functional, but it's a subclass of 
object, not any Exception class.

So shedskin should probably not incorrectly claim classes aren't exported.

Original issue reported on code.google.com by fahhem%r...@gtempaccount.com on 2 Mar 2011 at 4:39

GoogleCodeExporter commented 8 years ago
thanks for another report. much appreciated! :)

the class is functional inside the module, but there will probably be problems 
when trying to use it from the 'outside', like catching it, or generating an 
instance of it (e.g. test.NotExported()). so I think there has to be some kind 
of warning about this class indicating that it's not fully functional to the 
outside..

Original comment by mark.duf...@gmail.com on 2 Mar 2011 at 9:47

GoogleCodeExporter commented 8 years ago
so I guess this can be marked 'wontfix'. I'm still hoping to look at the other 
exception-related issue sometime this week.. my free day evaporated 
unfortunately, but perhaps in the weekend.

Original comment by mark.duf...@gmail.com on 9 Mar 2011 at 10:57

GoogleCodeExporter commented 8 years ago
oh wait, I should probably have a better look at what you say above. sorry for 
the noise.

Original comment by mark.duf...@gmail.com on 9 Mar 2011 at 10:58

GoogleCodeExporter commented 8 years ago

Original comment by mark.duf...@gmail.com on 23 Mar 2011 at 7:41

GoogleCodeExporter commented 8 years ago
okay, I read what you said the first time correctly now, and fixed the problem 
in git. thanks again! ;)

http://gitorious.org/shedskin/mainline/commit/432487b83ff79ef0a0b489e2ce3796a311
31e69c

Original comment by mark.duf...@gmail.com on 23 Mar 2011 at 8:04