[Pypy] Multiple Inheritance Bug: TypeError: __init__() takes exactly 1 argument (2 given)

Issue #2501 resolved
KSHMK
created an issue

I found an error while installing and running to use pwntools.

Pwntools inherits threading.local and stack implemented classes to implement a stack for each thread.

However, when inheriting and executing init "init() takes exactly 1 argument (2 given)". This error did not occur in Cpython.

import threading
class B(object):
    def __init__(self, K):
        self._current = K
        self.__stack = []

    def push(self):
        print "push"

class A(threading.local, B):
    pass

K = A({"asdf":"asdf"})
K.push()
print K._current

I have simplified the source of the error.

If you change the order of inheritance

import threading
class B(object):
    def __init__(self, K):
        self._current = K
        self.__stack = []

    def push(self):
        print "push"

class A(B,threading.local):
    pass

K = A({"asdf":"asdf"})
K.push()
print K._current

No Error. Why?