diff options
| author | David Cramer <dcramer@gmail.com> | 2016-10-05 22:48:24 -0700 |
|---|---|---|
| committer | David Cramer <dcramer@gmail.com> | 2016-10-05 22:48:24 -0700 |
| commit | fa69f567460d389b5ba3f0a39026b585a9ee327f (patch) | |
| tree | a988cb63ed12480e6297ddbe4d748faed499cc81 | |
| parent | edfb9102f01e7125548d2819a3a3c1a7be2bacec (diff) | |
| download | raven-feature/remove-message.tar.gz | |
remove deprecated behaviorsfeature/remove-message
| -rw-r--r-- | raven/base.py | 21 | ||||
| -rw-r--r-- | raven/contrib/async.py | 29 | ||||
| -rw-r--r-- | raven/contrib/django/logging.py | 17 | ||||
| -rw-r--r-- | raven/contrib/django/middleware/__init__.py | 2 | ||||
| -rw-r--r-- | raven/contrib/flask.py | 4 | ||||
| -rw-r--r-- | raven/utils/encoding.py | 10 |
6 files changed, 4 insertions, 79 deletions
diff --git a/raven/base.py b/raven/base.py index 72ceb3d..ab3a31b 100644 --- a/raven/base.py +++ b/raven/base.py @@ -14,7 +14,6 @@ import os import sys import time import uuid -import warnings from datetime import datetime from types import FunctionType @@ -134,7 +133,7 @@ class Client(object): >>> try: >>> 1/0 >>> except ZeroDivisionError: - >>> ident = client.get_ident(client.captureException()) + >>> event_id = client.captureException() >>> print "Exception caught; reference is %s" % ident """ logger = logging.getLogger('raven') @@ -282,18 +281,6 @@ class Client(object): return modules - def get_ident(self, result): - """ - Returns a searchable string representing a message. - - >>> result = client.capture(**kwargs) - >>> ident = client.get_ident(result) - """ - warnings.warn('Client.get_ident is deprecated. The event ID is now ' - 'returned as the result of capture.', - DeprecationWarning) - return result - def get_public_dsn(self, scheme=None): """ Returns a public DSN which is consumable by raven-js @@ -840,12 +827,6 @@ class Client(object): query=query, params=params, engine=engine, **kwargs) - def captureExceptions(self, **kwargs): - warnings.warn( - 'captureExceptions is deprecated, used context() instead.', - DeprecationWarning) - return self.context(**kwargs) - def captureBreadcrumb(self, *args, **kwargs): """Records a breadcrumb with the current context. They will be sent with the next event. diff --git a/raven/contrib/async.py b/raven/contrib/async.py deleted file mode 100644 index 4f94abb..0000000 --- a/raven/contrib/async.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -raven.contrib.async -~~~~~~~~~~~~~~~~~~~ - -:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. -:license: BSD, see LICENSE for more details. -""" -from __future__ import absolute_import - -import warnings - -from raven.base import Client -from raven.transport.threaded import AsyncWorker - - -class AsyncClient(Client): - """ - This client uses a single background thread to dispatch errors. - """ - def __init__(self, worker=None, *args, **kwargs): - warnings.warn('AsyncClient is deprecated. Use the threaded+http transport instead.', DeprecationWarning) - self.worker = worker or AsyncWorker() - super(AsyncClient, self).__init__(*args, **kwargs) - - def send_sync(self, **kwargs): - super(AsyncClient, self).send(**kwargs) - - def send(self, **kwargs): - self.worker.queue(self.send_sync, **kwargs) diff --git a/raven/contrib/django/logging.py b/raven/contrib/django/logging.py deleted file mode 100644 index 7a0ea52..0000000 --- a/raven/contrib/django/logging.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -raven.contrib.django.logging -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. -:license: BSD, see LICENSE for more details. -""" - -from __future__ import absolute_import - -import warnings - -warnings.warn('raven.contrib.django.logging is deprecated. Use raven.contrib.django.handlers instead.', DeprecationWarning) - -from raven.contrib.django.handlers import SentryHandler # NOQA - -__all__ = ('SentryHandler',) diff --git a/raven/contrib/django/middleware/__init__.py b/raven/contrib/django/middleware/__init__.py index 9ce8777..31a4cf1 100644 --- a/raven/contrib/django/middleware/__init__.py +++ b/raven/contrib/django/middleware/__init__.py @@ -51,7 +51,7 @@ class Sentry404CatchMiddleware(object): request.sentry = { 'project_id': data.get('project', client.remote.project), - 'id': client.get_ident(result), + 'id': result, } return response diff --git a/raven/contrib/flask.py b/raven/contrib/flask.py index 59ebe2b..bac0712 100644 --- a/raven/contrib/flask.py +++ b/raven/contrib/flask.py @@ -292,7 +292,7 @@ class Sentry(object): assert self.client, 'captureException called before application configured' result = self.client.captureException(*args, **kwargs) if result: - self.last_event_id = self.client.get_ident(result) + self.last_event_id = result else: self.last_event_id = None return result @@ -301,7 +301,7 @@ class Sentry(object): assert self.client, 'captureMessage called before application configured' result = self.client.captureMessage(*args, **kwargs) if result: - self.last_event_id = self.client.get_ident(result) + self.last_event_id = result else: self.last_event_id = None return result diff --git a/raven/utils/encoding.py b/raven/utils/encoding.py index cf8bca5..0550582 100644 --- a/raven/utils/encoding.py +++ b/raven/utils/encoding.py @@ -7,8 +7,6 @@ raven.utils.encoding """ from __future__ import absolute_import, unicode_literals -import warnings - from raven._compat import integer_types, text_type, binary_type, \ string_types, PY2 @@ -69,14 +67,6 @@ def force_text(s, encoding='utf-8', strings_only=False, errors='strict'): return s -def transform(value): - from raven.utils.serializer import transform - warnings.warn('You should switch to raven.utils.serializer.' - 'transform', DeprecationWarning) - - return transform(value) - - def to_unicode(value): try: value = text_type(force_text(value)) |
