diff options
author | David Cramer <dcramer@gmail.com> | 2012-02-01 00:51:24 -0800 |
---|---|---|
committer | David Cramer <dcramer@gmail.com> | 2012-02-01 00:51:24 -0800 |
commit | 3aa7b74dacf3a8a5e4a742f5dc7200433df2e4c9 (patch) | |
tree | 38164b4ac3d8cfc9c14d7d1f97000535e4d6663d | |
parent | 5783499a66a1ec761c4262e9a363b3fdb3030a47 (diff) | |
download | raven-3aa7b74dacf3a8a5e4a742f5dc7200433df2e4c9.tar.gz |
Added client.exception and client.message1.3.1
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | raven/base.py | 22 | ||||
-rwxr-xr-x | setup.py | 2 |
3 files changed, 17 insertions, 11 deletions
@@ -1,3 +1,7 @@ +1.3.1 + +* Added client.exception and client.message shortcuts. + 1.3.0 * Refactored client send API to be more easily extensible. diff --git a/raven/base.py b/raven/base.py index 0619bf0..fe0f0a6 100644 --- a/raven/base.py +++ b/raven/base.py @@ -360,26 +360,29 @@ class Client(object): """ return json.loads(base64.b64decode(data).decode('zlib')) - def create_from_text(self, message, **kwargs): - """ - Deprecated. + def create_from_text(self, *args, **kwargs): + warnings.warn("create_from_text is deprecated. Use message() instead.", DeprecationWarning) + return self.message(*args, **kwargs) + + def create_from_exception(self, *args, **kwargs): + warnings.warn("create_from_exception is deprecated. Use exception() instead.", DeprecationWarning) + return self.exception(*args, **kwargs) + def message(self, message, **kwargs): + """ Creates an event for from ``message``. - >>> client.create_from_text('My event just happened!') + >>> client.message('My event just happened!') """ - warnings.warn("create_from_text is deprecated. Use capture('Message') instead.", DeprecationWarning) return self.capture('Message', message=message, **kwargs) - def create_from_exception(self, exc_info=None, **kwargs): + def exception(self, exc_info=None, **kwargs): """ - Deprecated. - Creates an event from an exception. >>> try: >>> exc_info = sys.exc_info() - >>> client.create_from_exception(exc_info) + >>> client.exception(exc_info) >>> finally: >>> del exc_info @@ -387,7 +390,6 @@ class Client(object): perform the ``exc_info = sys.exc_info()`` and the requisite clean-up for you. """ - warnings.warn("create_from_exception is deprecated. Use capture('Exception') instead.", DeprecationWarning) return self.capture('Exception', exc_info=exc_info, **kwargs) @@ -32,7 +32,7 @@ install_requires = [ setup( name='raven', - version='1.3.0', + version='1.3.1', author='David Cramer', author_email='dcramer@gmail.com', url='http://github.com/dcramer/raven', |