astropy/astropy — pull request #2601 by mdboom (2014-06-05 17:43:24+00:00)
Title: Constants can't be deepcopied

```python
In [1]: copy.deepcopy(astropy.constants.c)
ERROR:astropy:TypeError: __new__() takes at least 7 arguments (2 given)
ERROR: TypeError: __new__() takes at least 7 arguments (2 given) [astropy.units.quantity]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in ()
----> 1 copy.deepcopy(astropy.constants.c)

/usr/lib/python2.7/copy.pyc in deepcopy(x, memo, _nil)
172 copier = getattr(x, "__deepcopy__", None)
173 if copier:
--> 174 y = copier(memo)
175 else:
176 reductor = dispatch_table.get(cls)

/usr/lib/python2.7/site-packages/astropy/constants/constant.pyc in wrapper(self, *args, **kwargs)
56 systems[0]))
57
---> 58 return meth(self, *args, **kwargs)
59
60 return wrapper

/usr/lib/python2.7/site-packages/astropy/units/quantity.pyc in __deepcopy__(self, memo)
409 # If we don't define this, ``copy.deepcopy(quantity)`` will
410 # return a bare Numpy array.
--> 411 return self.copy()
412
413 def __quantity_view__(self, obj, unit):

/usr/lib/python2.7/site-packages/astropy/units/quantity.pyc in copy(self)
554 def copy(self):
555 """ Return a copy of this `Quantity` instance """
--> 556 return self.__class__(self)
557
558 # This flag controls whether convenience conversion members, such

TypeError: __new__() takes at least 7 arguments (2 given)
```

Thanks to @transientlunatic for spotting this.