title: "TypeError: object() takes no parameters" With python2 metaclass converted to python3
body: <p>I'm converting some code from python2 to python3 and I'm hitting an error with a metaclass.</p>
  
  <p>This is the working python2 code (simplified):</p>
  
  <pre><code>#!/usr/bin/env python2
  # test2.py
  
  class Meta(type):
      def __new__(mcs, name, bases, clsdict):
          new_class = type.__new__(mcs, name, bases, clsdict)
          return new_class
  
  class Root(object):
      __metaclass__ = Meta
  
      def __init__(self, value=None):
          self.value = value
          super(Root, self).__init__()
  
  class Sub(Root):
      def __init__(self, value=None):
          super(Sub, self).__init__(value=value)
  
      def __new__(cls, value=None):
          super(Sub, cls).__new__(cls, value)
  
  if __name__ == '__main__':
      sub = Sub(1)
  </code></pre>
  
  <p>And here's the converted python3 code:</p>
  
  <pre><code>#!/usr/bin/env python3
  # test3.py
  
  class Meta(type):
      def __new__(mcs, name, bases, clsdict):
          new_class = type.__new__(mcs, name, bases, clsdict)
          return new_class
  
  class Root(object, metaclass=Meta):
      def __init__(self, value=None):
          self.value = value
          super(Root, self).__init__()
  
  class Sub(Root):
      def __init__(self, value=None):
          super(Sub, self).__init__(value=value)
  
      def __new__(cls, value=None):
          super(Sub, cls).__new__(cls, value)
  
  if __name__ == '__main__':
      sub = Sub(1)
  </code></pre>
  
  <p>If I run <code>python2 test2.py</code>, it runs. If I do <code>python3 test3.py</code>, I get </p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 21, in &lt;module&gt;
      sub = Sub(1)
    File "test.py", line 18, in __new__
      super(Sub, cls).__new__(cls, value)
  TypeError: object() takes no parameters
  </code></pre>
  
  <p>This isn't a duplicate of the linked question because in that one the asker wasn't invoking a simple class correctly. In this one I have code which worked in python 2 and doesn't work with 2to3 run on it</p>