Proper deprecation for client.HTTPClient

client.HTTPClient wasn't properly deprecated since all it had was
a comment in the code. Proper deprecation requires use of warnings
and documentation.

bp deprecations

Change-Id: I1c50c1441b23a79831e6e1df749084130e4b9af7
This commit is contained in:
Brant Knudson 2015-07-24 14:21:37 -05:00
parent c5b03191b6
commit ce58b07eea

@ -10,13 +10,23 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from debtcollector import removals
from keystoneclient import discover from keystoneclient import discover
from keystoneclient import httpclient from keystoneclient import httpclient
from keystoneclient import session as client_session from keystoneclient import session as client_session
# Using client.HTTPClient is deprecated. Use httpclient.HTTPClient instead. @removals.remove(message='Use keystoneclient.httpclient.HTTPClient instead',
HTTPClient = httpclient.HTTPClient version='1.7.0', removal_version='2.0.0')
class HTTPClient(httpclient.HTTPClient):
"""Deprecated alias for httpclient.HTTPClient.
This class is deprecated as of the 1.7.0 release in favor of
:class:`keystoneclient.httpclient.HTTPClient` and may be removed in the
2.0.0 release.
"""
def Client(version=None, unstable=False, session=None, **kwargs): def Client(version=None, unstable=False, session=None, **kwargs):