Timeout setting is not being Accepted #183

jcua opened this Issue Sep 25, 2012 · 3 comments


None yet
4 participants

jcua commented Sep 25, 2012

In the Raven 2.0.3 docs, there is a parameter called 'timeout'. But when I tried to set this value, the raven client is not accepting it.

I am setting the timeout like this.

client = Client(


And if I look at raven/base.py, I see this which seems to suggest that the timeout parameter cannot be set in the above config.

if kwargs.get('timeout') is not None:
        warnings.warn('The ``timeout`` option no longer does anything. Pass the option to your transport instead.')

And I tried to pass this config in the transport (I did something like this on the dsn) and it does not work as well...


But if I change raven/conf/defaults.py (TIMEOUT), raven accepts this change.

my understanding of the code is that if you add ?timeout=10 on the server url in the example above it will work.

the problem is when using raven with Django. RAVEN_CONFIG['timeout'] is ignored and if you add the timeout to the dsn as above, that gets stripped out by the time it ends up in the servers list and thus the url given to TransportRegistry:get_transport().

vls commented Mar 14, 2013

class HTTPTransport(Transport):

    scheme = ['http', 'https']

    def __init__(self, parsed_url, timeout=defaults.TIMEOUT):

In raven/transport/base.py, transport object take defaults.TIMEOUT as default function parameter. Change defaults.TIMEOUT will not effect HTTPTransport().timeout. There is no way in user's code to change the timeout.

Consider the following code:



def bar(v=TIMEOUT):
    print TIMEOUT
    print v

#!/usr/bin/env python
import foo
foo.TIMEOUT = 2


result will be


xordoquy commented Jul 23, 2013

This issue will be followed in #253 as the timeout parameter seems broken at the moment.

@xordoquy xordoquy closed this Jul 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment