Fix incorrect use of self.__class__ in super call.
Additional Information
In the actual context, it just so happens that self.__class__ is equal to ExecuteResponse and produces the same result.
When that class is derived though, to add additional functionalities, the value changes and causes endless recursion.
class DerivedExecuteResponse(ExecuteResponse):
def __init__(self, wps_request, uuid):
super(ExecuteResponse, self).__init__(wps_request, uuid)
# other setup...
class ExecuteResponse(WPSResponse):
def __init__(self, wps_request, uuid, **kwargs):
# here 'self.__class__' == 'DerivedExecuteResponse'
# 'super(self.__class__, self)' resolves to 'ExecuteResponse', so it calls itself !
super(self.__class__, self).__init__(wps_request, uuid)
[ ] I'd like to contribute [feature X|bugfix Y|docs|something else] to PyWPS. I confirm that my contributions to PyWPS will be compatible with the PyWPS license guidelines at the time of contribution.
[x] I have already previously agreed to the PyWPS Contributions and Licensing Guidelines
Coverage remained the same at 0.0% when pulling 427072489c85a770f78e1421ae0d25b0d4a34803 on fmigneault:super-class into e10c99c2c8472287f9463bab49d85f5e7597cac2 on geopython:pywps-4.4.
Overview
Fix incorrect use of
self.__class__
insuper
call.Additional Information
In the actual context, it just so happens that
self.__class__
is equal toExecuteResponse
and produces the same result. When that class is derived though, to add additional functionalities, the value changes and causes endless recursion.Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)