You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/03/16 03:16:02 UTC
svn commit: r1082027 - /incubator/libcloud/trunk/libcloud/utils.py
Author: tomaz
Date: Wed Mar 16 02:16:01 2011
New Revision: 1082027
URL: http://svn.apache.org/viewvc?rev=1082027&view=rev
Log:
iAdd in_development_warning function.
Modified:
incubator/libcloud/trunk/libcloud/utils.py
Modified: incubator/libcloud/trunk/libcloud/utils.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/utils.py?rev=1082027&r1=1082026&r2=1082027&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/utils.py (original)
+++ incubator/libcloud/trunk/libcloud/utils.py Wed Mar 16 02:16:01 2011
@@ -19,6 +19,7 @@ import warnings
from httplib import HTTPResponse
SHOW_DEPRECATION_WARNING = True
+SHOW_IN_DEVELOPMENT_WARNING = True
OLD_API_REMOVE_VERSION = '0.6.0'
def read_in_chunks(iterator, chunk_size=None):
@@ -61,6 +62,12 @@ def deprecated_warning(module):
(module, OLD_API_REMOVE_VERSION),
category=DeprecationWarning)
+def in_development_warning(module):
+ if SHOW_IN_DEVELOPMENT_WARNING:
+ warnings.warn('The module %s is in development and your are advised '
+ 'against using it in production.' % (module),
+ category=FutureWarning)
+
def str2dicts(data):
"""
Create a list of dictionaries from a whitespace and newline delimited text.