Strip out redundant __new__ to enable object pickling
I'd like to remove the redundant '__ new __' from the wfs classes in order to fix two problems:
- 'pickle' does not work (you cannot pickle the WFS classes)
- '__ init __' gets called twice each time the class is initialised. This creates a substantial performance lag on slower network connections.
See https://github.com/geopython/OWSLib/issues/520 for more information.
Thanks.
Reopening to check if this is still the case.
The __new__ overrides date back to at least 15 years - https://github.com/geopython/OWSLib/commit/e1d37a1df7b4afa5b558c87c5a84c270310c47e5
Since then OWSLib has moved from Python2 to Python3, I'm sure there was a reason at the time, but I can't see a need for the override now. Removing simplifies the code, removes duplicate calls to servers and resolves associated performance issues. Will be merging in the next 7 days - will leave open for comment until then.
Thanks @vjf for the fix.
coverage: 58.814% (-1.3%) from 60.156% when pulling 4b9b7cf1fa00216bd6e0738b6ccf8f5999d26c2e on vjf:strip_redundant_new into ae98c2039819724b306b575d2ea850795955e22b on geopython:master.
@geographika @landryb Thanks.