[x] The PR title is formatted as: <Module or Topic>: <Action> <Summary> (see contributing guidelines)
Replaces the use of __dealloc__ in SpecFile with __del__ since the former should not call methods and the later is now supported (it was not with Python 2):
You need to be careful what you do in a __dealloc__() method. By the time your __dealloc__() method is called, the object may already have been partially destroyed and may not be in a valid state as far as Python is concerned, so you should avoid invoking any Python operations which might touch the object. In particular, don’t call any other methods of the object or do anything which might cause the object to be resurrected. It’s best if you stick to just deallocating C data.
Checklist:
<Module or Topic>: <Action> <Summary>
(see contributing guidelines)Replaces the use of
__dealloc__
inSpecFile
with__del__
since the former should not call methods and the later is now supported (it was not with Python 2):https://cython.readthedocs.io/en/latest/src/userguide/special_methods.html#finalization-methods-dealloc-and-del
closes #4128