[issue29758] Previously-working SWIG code fails in Python 3.6

Tristan Croll report at bugs.python.org
Thu Mar 9 12:30:00 EST 2017


Tristan Croll added the comment:

OK, this seems to narrow down the problem. The following was legal in Python 3.5.1, but in 3.5.3 and 3.6.1rc1 returns:

'TypeError: must be type, not classobj'

class Foo_Base:
    pass

class Bar_Base:
    def get_foo(self):
        f = Foo_Base()
        return f

class Foo(Foo_Base):
    pass

class Bar(Bar_Base):
    def get_foo2(self):
        return super(Bar, self).get_foo()
    
bar = Bar()
b = bar.get_foo2()

Is this a deliberate and permanent change? If so, it looks like I have a lot of work on my hands.

----------
versions: +Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29758>
_______________________________________


More information about the Python-bugs-list mailing list