-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix auth in wps #611
fix auth in wps #611
Conversation
@eric-spitler @Tiranno Please give a comment. |
The WPS* classes already had the There is a comment in the class docs about deprecation, but deprecated functionality needs to remain functional and produce warnings to the developer so they can make the necessary updates prior to removing the functionality altogether. @cehbrecht - Does |
owslib/wps.py
Outdated
@@ -505,21 +489,17 @@ def __init__(self, version=WPS_DEFAULT_VERSION, verbose=False, timeout=None, aut | |||
super(WPSCapabilitiesReader, self).__init__( | |||
version=version, verbose=verbose, timeout=timeout, auth=auth) | |||
|
|||
def readFromUrl(self, url, username=None, password=None, | |||
headers=None, verify=True, cert=None): | |||
def readFromUrl(self, url, headers=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should really issue a DeprecationWarning
here for some time before removing existing functionality to avoid breaking code.
Note that this means a two-phase change - one to add the DeprecationWarning
, another later to remove the kwargs.
def readFromUrl(self, url, username=None, password=None, headers=None, verify=True, cert=None):
import warnings
message = 'The use of "username", "password", "verify", and "cert" is deprecated. ' + \
'Please use the "auth" keyword during class instantiation. ' + \
'These keywords will be removed in a future release.'
warnings.warn(message, DeprecationWarning)
# rest of the method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add the deprecation warning in this PR.
I would have considered the WPSReader
class as part of the internal interface. Though this is not obvious from the code.
@tomkralidis Do you have recommendations on how to handle interface deprecations? |
@cehbrecht we have had such warnings in other parts of OWSLib (example: d4e26ea) for quite some time. Technically OWSLib is a pre 1.0 project so we have not gone the route of stable branch support (everything happens straight and away in master). All to say I would leave deprecation handling (how long, etc.) up to the maintainer of the given code. We don't have an overall policy for OWSLib (yet) but perhaps this is a good time to make one). |
@eric-spitler @Tiranno @tomkralidis I have added the method |
@tomkralidis Can I merge? It fixes at least the WPS for HTTPS ... |
@cehbrecht +1 |
This PR fixes #609 in the wps module. It keeps the old interface with
verify
only for theWebProcessingService
class. Internally only theself.auth
parameter should be used.I have made a quick test with birdy.