Remove deprecated manual configuration for remotes
This commit is contained in:
parent
5fe0fccced
commit
95c704f127
1
CHANGES
1
CHANGES
|
@ -3,6 +3,7 @@ Version 5.3.0
|
|||
|
||||
* The UDP transport has been removed.
|
||||
* The integrated Sentry+Django client has been removed. This is now part of Sentry core.
|
||||
* Server configuration *must* now be specified with a DSN.
|
||||
|
||||
Version 5.2.0
|
||||
-------------
|
||||
|
|
|
@ -197,12 +197,10 @@ class Client(object):
|
|||
secret_key = dsn_config['SENTRY_SECRET_KEY']
|
||||
transport_options = dsn_config.get('SENTRY_TRANSPORT_OPTIONS', {})
|
||||
else:
|
||||
if o.get('servers'):
|
||||
warnings.warn('Manually configured connections are deprecated. Switch to a DSN.', DeprecationWarning)
|
||||
servers = o.get('servers')
|
||||
project = o.get('project')
|
||||
public_key = o.get('public_key')
|
||||
secret_key = o.get('secret_key')
|
||||
servers = ()
|
||||
project = None
|
||||
public_key = None
|
||||
secret_key = None
|
||||
transport_options = {}
|
||||
self.dsns[dsn] = servers, public_key, secret_key, project, transport_options
|
||||
|
||||
|
|
|
@ -170,16 +170,13 @@ class ClientTest(TestCase):
|
|||
def test_send(self, time, send_remote):
|
||||
time.return_value = 1328055286.51
|
||||
client = Client(
|
||||
servers=['http://example.com'],
|
||||
public_key='public',
|
||||
secret_key='secret',
|
||||
project=1,
|
||||
dsn='http://public:secret@example.com/1',
|
||||
)
|
||||
client.send(**{
|
||||
'foo': 'bar',
|
||||
})
|
||||
send_remote.assert_called_once_with(
|
||||
url='http://example.com',
|
||||
url='http://example.com/api/1/store/',
|
||||
data=six.b('eJyrVkrLz1eyUlBKSixSqgUAIJgEVA=='),
|
||||
headers={
|
||||
'User-Agent': 'raven-python/%s' % (raven.VERSION,),
|
||||
|
@ -197,16 +194,13 @@ class ClientTest(TestCase):
|
|||
def test_send_with_auth_header(self, time, send_remote):
|
||||
time.return_value = 1328055286.51
|
||||
client = Client(
|
||||
servers=['http://example.com'],
|
||||
public_key='public',
|
||||
secret_key='secret',
|
||||
project=1,
|
||||
dsn='http://public:secret@example.com/1',
|
||||
)
|
||||
client.send(auth_header='foo', **{
|
||||
'foo': 'bar',
|
||||
})
|
||||
send_remote.assert_called_once_with(
|
||||
url='http://example.com',
|
||||
url='http://example.com/api/1/store/',
|
||||
data=six.b('eJyrVkrLz1eyUlBKSixSqgUAIJgEVA=='),
|
||||
headers={
|
||||
'User-Agent': 'raven-python/%s' % (raven.VERSION,),
|
||||
|
@ -220,10 +214,7 @@ class ClientTest(TestCase):
|
|||
def test_raise_exception_on_send_error(self, should_try, _send_remote):
|
||||
should_try.return_value = True
|
||||
client = Client(
|
||||
servers=['sync+http://example.com'],
|
||||
public_key='public',
|
||||
secret_key='secret',
|
||||
project=1,
|
||||
dsn='sync+http://public:secret@example.com/1',
|
||||
)
|
||||
|
||||
# Test for the default behaviour in which a send error is handled by the client
|
||||
|
@ -234,10 +225,7 @@ class ClientTest(TestCase):
|
|||
|
||||
# Test for the case in which a send error is raised to the calling frame.
|
||||
client = Client(
|
||||
servers=['sync+http://example.com'],
|
||||
public_key='public',
|
||||
secret_key='secret',
|
||||
project=1,
|
||||
dsn='sync+http://public:secret@example.com/1',
|
||||
raise_send_errors=True,
|
||||
)
|
||||
with self.assertRaises(Exception):
|
||||
|
|
|
@ -579,9 +579,7 @@ class DjangoLoggingTest(TestCase):
|
|||
class CeleryIsolatedClientTest(TestCase):
|
||||
def setUp(self):
|
||||
self.client = CeleryClient(
|
||||
servers=['http://example.com'],
|
||||
public_key='public',
|
||||
secret_key='secret',
|
||||
dsn='sync+http://public:secret@example.com/1'
|
||||
)
|
||||
|
||||
@mock.patch('raven.contrib.django.celery.send_raw')
|
||||
|
|
|
@ -69,10 +69,7 @@ class LoggingIntegrationTest(TestCase):
|
|||
should_try.return_value = True
|
||||
# Test for the default behaviour in which an exception is handled by the client or handler
|
||||
client = Client(
|
||||
servers=['sync+http://example.com'],
|
||||
public_key='public',
|
||||
secret_key='secret',
|
||||
project=1,
|
||||
dsn='sync+http://public:secret@example.com/1',
|
||||
)
|
||||
handler = SentryHandler(client)
|
||||
_send_remote.side_effect = Exception()
|
||||
|
@ -82,10 +79,7 @@ class LoggingIntegrationTest(TestCase):
|
|||
|
||||
# Test for the case in which a send error is raised to the calling frame.
|
||||
client = Client(
|
||||
servers=['sync+http://example.com'],
|
||||
public_key='public',
|
||||
secret_key='secret',
|
||||
project=1,
|
||||
dsn='sync+http://public:secret@example.com/1',
|
||||
raise_send_errors=True,
|
||||
)
|
||||
handler = SentryHandler(client)
|
||||
|
|
Loading…
Reference in New Issue