title: Python version dependent type annotations
body: <h2>Problem:</h2>
  <p>I want to use type annotation for <code>collections.deque</code>, but since we have to support older python version (3.4 and 3.5, which to be exact - and doesn't matter that they are not <em>officially</em> supported), I want my code to be valid in all python version we have to support.</p>
  <p>My original code:</p>
  <pre><code>from collections import deque
  from typing import Deque
  a = deque() # type: Deque[int]
  </code></pre>
  <p>it works just fine in 3.7, but in 3.5, I get <code>ImportError: cannot import name 'Deque'</code>.</p>
  <h2>What I tried:</h2>
  <p>so I was thinking of modifying it like this:</p>
  <pre><code>from typing import Sequence
  try:
      from typing import Deque
  except ImportError:
      Deque = Sequence
  
  from collections import deque
  a = deque() # type: Deque[int]
  </code></pre>
  <p>But then I get errors:</p>
  <pre><code>$ mypy . --pretty
  a.py:5: error: Cannot assign multiple types to name &quot;Deque&quot; without an explicit &quot;Type[...]&quot; annotation
      Deque = Sequence
      ^
  a.py:5: error: Incompatible types in assignment (expression has type &quot;Type[Sequence[Any]]&quot;, variable has
  type &quot;Type[deque[Any]]&quot;)
      Deque = Sequence
          ^
  Found 2 errors in 1 file (checked 1 source file)
  </code></pre>
  <h2>Question:</h2>
  <p>Is there a way of having the same code which would be valid even in python3.4 and python3.5 while having type annotation for deque?</p>
  <h2>Note:</h2>
  <p>Yes, I know 3.4 and 3.5 are not officially suported. But that fact does not help me at all. Please don't tell me to upgrade.</p>