Repository: getmoto/moto

Issue:
Deprecation Warning with moto 1.0.0
Since the release of moto 1.0.0 Buildbot Ci is impacted.
Buildbot Ci is configured to forbid any warning raise by the code
https://nine.buildbot.net/#/builders/11/builds/231/steps/5/logs/stdio

but moto 1.0.0 raise a new warning:
```
 File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/__init__.py", line 9, in <module>
    from .autoscaling import mock_autoscaling, mock_autoscaling_deprecated  # flake8: noqa
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/autoscaling/__init__.py", line 2, in <module>
    from .models import autoscaling_backends
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/autoscaling/models.py", line 5, in <module>
    from moto.ec2 import ec2_backends
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/ec2/__init__.py", line 2, in <module>
    from .models import ec2_backends
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/ec2/models.py", line 3703, in <module>
    ec2_backends[region.name] = EC2Backend(region.name)
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/ec2/models.py", line 3614, in __init__
    super(EC2Backend, self).__init__()
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/ec2/models.py", line 627, in __init__
    super(InstanceBackend, self).__init__()
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/ec2/models.py", line 860, in __init__
    super(TagBackend, self).__init__()
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/ec2/models.py", line 1042, in __init__
    super(AmiBackend, self).__init__()
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/ec2/models.py", line 1362, in __init__
    self.create_security_group("default", "default group")
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/ec2/models.py", line 1375, in create_security_group
    group = SecurityGroup(self, group_id, name, description, vpc_id=vpc_id)
  File "/buildbot/buildbot-job/build/sandbox/local/lib/python2.7/site-packages/moto/core/models.py", line 233, in __new__
    instance = super(BaseModel, cls).__new__(cls, *args, **kwargs)
exceptions.DeprecationWarning: object() takes no parameters
```
We will add this warning as a exception, but we would be glad if moto could fix this warning and release a new version.



Discussion:

Resolving patch:
diff --git a/moto/core/models.py b/moto/core/models.py
--- a/moto/core/models.py
+++ b/moto/core/models.py
@@ -229,10 +229,7 @@ def __new__(meta, name, bases, dct):
 @six.add_metaclass(InstanceTrackerMeta)
 class BaseModel(object):
     def __new__(cls, *args, **kwargs):
-        if six.PY2:
-            instance = super(BaseModel, cls).__new__(cls, *args, **kwargs)
-        else:
-            instance = super(BaseModel, cls).__new__(cls)
+        instance = super(BaseModel, cls).__new__(cls)
         cls.instances.append(instance)
         return instance
 


Test patch: