<p dir="auto">...as a parameter which gets inherited globally by <code class="notranslate">get()</code> and other HTTP methods.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="session = requests.Session(timeout=30)
session.get(...)
session.get(...)"><pre class="notranslate"><code class="notranslate">session = requests.Session(timeout=30)
session.get(...)
session.get(...)
</code></pre></div>
<p dir="auto">Would be equivalent to:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="session = requests.Session()
session.get(..., timeout=30)
session.get(..., timeout=30)"><pre class="notranslate"><code class="notranslate">session = requests.Session()
session.get(..., timeout=30)
session.get(..., timeout=30)
</code></pre></div>
<p dir="auto">Thoughts?</p>
<p dir="auto">I was using an old version of requests (I don't know the exact version). When settings the <code class="notranslate">session.timeout</code> it was affecting the timeout value during a call to <code class="notranslate">session.get()</code>. With recent version of requests, this feature doesn't seams to work.</p>
<p dir="auto">I'm currently using version 2.10.0</p>
<p dir="auto">Basically, I'm expecting this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="session = requests.session()
session.timeout = 0.0001
session.get('http://localhost/')"><pre class="notranslate"><code class="notranslate">session = requests.session()
session.timeout = 0.0001
session.get('http://localhost/')
</code></pre></div>
<p dir="auto">To have the same behavior as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="requests.get('http://localhost/', timeout=0.0001)"><pre class="notranslate"><code class="notranslate">requests.get('http://localhost/', timeout=0.0001)
</code></pre></div>