diff --git a/.travis.yml b/.travis.yml
index 29f1d44..2113aec 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,18 +1,21 @@
 language: python
 cache: pip
-python:
-  - 2.7
-  - 3.4
-  - 3.5
-  - 3.6
-  - nightly
-  - pypy
-  - pypy-5.3
-  - pypy3
+matrix:
+  include:
+    - python: 2.7
+    - python: 3.4
+    - python: 3.5
+    - python: 3.6
+    - python: pypy
+    - python: pypy-5.3
+    - python: pypy3
+    - python: 3.7
+      dist: xenial
+    - python: nightly
+      dist: xenial
 install:
   - pip install --upgrade .
   - pip list
 script:
   - python setup.py test -q
   - if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then pip install flake8==2.1.0 pep8==1.5.6 && flake8 --version && flake8 pyflakes setup.py; fi
-sudo: false
diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index 5c12820..e05bdf4 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -476,6 +476,7 @@ class GeneratorScope(Scope):
 class ModuleScope(Scope):
     """Scope for a module."""
     _futures_allowed = True
+    _annotations_future_enabled = False
 
 
 class DoctestScope(ModuleScope):
@@ -628,6 +629,19 @@ class Checker(object):
         if isinstance(self.scope, ModuleScope):
             self.scope._futures_allowed = False
 
+    @property
+    def annotationsFutureEnabled(self):
+        scope = self.scopeStack[0]
+        if not isinstance(scope, ModuleScope):
+            return False
+        return scope._annotations_future_enabled
+
+    @annotationsFutureEnabled.setter
+    def annotationsFutureEnabled(self, value):
+        assert value is True
+        assert isinstance(self.scope, ModuleScope)
+        self.scope._annotations_future_enabled = True
+
     @property
     def scope(self):
         return self.scopeStack[-1]
@@ -1068,6 +1082,8 @@ class Checker(object):
                 self.handleNode(parsed_annotation, node)
 
             self.deferFunction(handleForwardAnnotation)
+        elif self.annotationsFutureEnabled:
+            self.deferFunction(lambda: self.handleNode(annotation, node))
         else:
             self.handleNode(annotation, node)
 
@@ -1448,6 +1464,8 @@ class Checker(object):
                 if alias.name not in __future__.all_feature_names:
                     self.report(messages.FutureFeatureNotDefined,
                                 node, alias.name)
+                if alias.name == 'annotations':
+                    self.annotationsFutureEnabled = True
             elif alias.name == '*':
                 # Only Python 2, local import * is a SyntaxWarning
                 if not PY2 and not isinstance(self.scope, ModuleScope):
diff --git a/tox.ini b/tox.ini
index fabad9d..f3db2bb 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,7 @@
 [tox]
 skip_missing_interpreters = True
 envlist =
-    py27,py34,py35,py36,pypy,pypy3
+    py27,py34,py35,py36,py37,pypy,pypy3
 
 [testenv]
 deps =

diff --git a/pyflakes/test/test_other.py b/pyflakes/test/test_other.py
index b8301ea..d0fff0a 100644
--- a/pyflakes/test/test_other.py
+++ b/pyflakes/test/test_other.py
@@ -2055,6 +2055,24 @@ class TestAsyncStatements(TestCase):
         a: 'a: "A"'
         ''', m.ForwardAnnotationSyntaxError)
 
+    @skipIf(version_info < (3, 7), 'new in Python 3.7')
+    def test_postponed_annotations(self):
+        self.flakes('''
+        from __future__ import annotations
+        def f(a: A) -> A: pass
+        class A:
+            b: B
+        class B: pass
+        ''')
+
+        self.flakes('''
+        from __future__ import annotations
+        def f(a: A) -> A: pass
+        class A:
+            b: Undefined
+        class B: pass
+        ''', m.UndefinedName)
+
     def test_raise_notimplemented(self):
         self.flakes('''
         raise NotImplementedError("This is fine")

F821 Error with Forward Reference and `from __future__ import annotations`
With this example file:

```python
# test.py
from __future__ import annotations
from dataclasses import dataclass

@dataclass
class MyData:
    member: MyMember

@dataclass
class MyMember:
    value: int
```

I get an F821 error:
```shell
$ flake8 --select=F test.py
test.py:8:13: F821 undefined name 'MyMember'
```

I suppose the error is correct, but forward references in this form are explicitly supported with the `annotations` future and I think this should be changed in some manner.
pyflakes/test/test_other.py::TestAsyncStatements::test_postponed_annotations
pyflakes/test/test_other.py::Test::test_attrAugmentedAssignment pyflakes/test/test_other.py::Test::test_breakInsideLoop pyflakes/test/test_other.py::Test::test_breakOutsideLoop pyflakes/test/test_other.py::Test::test_classFunctionDecorator pyflakes/test/test_other.py::Test::test_classNameDefinedPreviously pyflakes/test/test_other.py::Test::test_classNameUndefinedInClassBody pyflakes/test/test_other.py::Test::test_classRedefinedAsFunction pyflakes/test/test_other.py::Test::test_classRedefinition pyflakes/test/test_other.py::Test::test_classWithReturn pyflakes/test/test_other.py::Test::test_classWithYield pyflakes/test/test_other.py::Test::test_classWithYieldFrom pyflakes/test/test_other.py::Test::test_comparison pyflakes/test/test_other.py::Test::test_containment pyflakes/test/test_other.py::Test::test_continueInFinally pyflakes/test/test_other.py::Test::test_continueInsideLoop pyflakes/test/test_other.py::Test::test_continueOutsideLoop pyflakes/test/test_other.py::Test::test_defaultExceptLast pyflakes/test/test_other.py::Test::test_defaultExceptNotLast pyflakes/test/test_other.py::Test::test_doubleAssignmentConditionally pyflakes/test/test_other.py::Test::test_doubleAssignmentWithUse pyflakes/test/test_other.py::Test::test_duplicateArgs pyflakes/test/test_other.py::Test::test_ellipsis pyflakes/test/test_other.py::Test::test_extendedSlice pyflakes/test/test_other.py::Test::test_functionDecorator pyflakes/test/test_other.py::Test::test_functionRedefinedAsClass pyflakes/test/test_other.py::Test::test_function_arguments pyflakes/test/test_other.py::Test::test_function_arguments_python3 pyflakes/test/test_other.py::Test::test_globalDeclaredInDifferentScope pyflakes/test/test_other.py::Test::test_identity pyflakes/test/test_other.py::Test::test_localReferencedBeforeAssignment pyflakes/test/test_other.py::Test::test_loopControl pyflakes/test/test_other.py::Test::test_modernProperty pyflakes/test/test_other.py::Test::test_moduleWithReturn pyflakes/test/test_other.py::Test::test_moduleWithYield pyflakes/test/test_other.py::Test::test_moduleWithYieldFrom pyflakes/test/test_other.py::Test::test_redefinedClassFunction pyflakes/test/test_other.py::Test::test_redefinedFunction pyflakes/test/test_other.py::Test::test_redefinedIfElseFunction pyflakes/test/test_other.py::Test::test_redefinedIfElseInListComp pyflakes/test/test_other.py::Test::test_redefinedIfFunction pyflakes/test/test_other.py::Test::test_redefinedInDictComprehension pyflakes/test/test_other.py::Test::test_redefinedInGenerator pyflakes/test/test_other.py::Test::test_redefinedInSetComprehension pyflakes/test/test_other.py::Test::test_redefinedTryExceptFunction pyflakes/test/test_other.py::Test::test_redefinedTryFunction pyflakes/test/test_other.py::Test::test_redefinedUnderscoreFunction pyflakes/test/test_other.py::Test::test_redefinedUnderscoreImportation pyflakes/test/test_other.py::Test::test_starredAssignmentErrors pyflakes/test/test_other.py::Test::test_starredAssignmentNoError pyflakes/test/test_other.py::Test::test_typingOverload pyflakes/test/test_other.py::Test::test_unaryPlus pyflakes/test/test_other.py::Test::test_undefinedBaseClass pyflakes/test/test_other.py::Test::test_varAugmentedAssignment pyflakes/test/test_other.py::TestUnusedAssignment::test_assert_static pyflakes/test/test_other.py::TestUnusedAssignment::test_assert_tuple pyflakes/test/test_other.py::TestUnusedAssignment::test_assert_tuple_empty pyflakes/test/test_other.py::TestUnusedAssignment::test_assert_with_message pyflakes/test/test_other.py::TestUnusedAssignment::test_assert_without_message pyflakes/test/test_other.py::TestUnusedAssignment::test_assignInForLoop pyflakes/test/test_other.py::TestUnusedAssignment::test_assignInListComprehension pyflakes/test/test_other.py::TestUnusedAssignment::test_assignToGlobal pyflakes/test/test_other.py::TestUnusedAssignment::test_assignToMember pyflakes/test/test_other.py::TestUnusedAssignment::test_assignToNonlocal pyflakes/test/test_other.py::TestUnusedAssignment::test_assignmentInsideLoop pyflakes/test/test_other.py::TestUnusedAssignment::test_augmentedAssignmentImportedFunctionCall pyflakes/test/test_other.py::TestUnusedAssignment::test_closedOver pyflakes/test/test_other.py::TestUnusedAssignment::test_dictComprehension pyflakes/test/test_other.py::TestUnusedAssignment::test_doubleClosedOver pyflakes/test/test_other.py::TestUnusedAssignment::test_exceptWithoutNameInFunction pyflakes/test/test_other.py::TestUnusedAssignment::test_exceptWithoutNameInFunctionTuple pyflakes/test/test_other.py::TestUnusedAssignment::test_exceptionUnusedInExcept pyflakes/test/test_other.py::TestUnusedAssignment::test_exceptionUnusedInExceptInFunction pyflakes/test/test_other.py::TestUnusedAssignment::test_exceptionUsedInExcept pyflakes/test/test_other.py::TestUnusedAssignment::test_f_string pyflakes/test/test_other.py::TestUnusedAssignment::test_generatorExpression pyflakes/test/test_other.py::TestUnusedAssignment::test_ifexp pyflakes/test/test_other.py::TestUnusedAssignment::test_listUnpacking pyflakes/test/test_other.py::TestUnusedAssignment::test_setComprehensionAndLiteral pyflakes/test/test_other.py::TestUnusedAssignment::test_tracebackhideSpecialVariable pyflakes/test/test_other.py::TestUnusedAssignment::test_tupleUnpacking pyflakes/test/test_other.py::TestUnusedAssignment::test_unusedUnderscoreVariable pyflakes/test/test_other.py::TestUnusedAssignment::test_unusedVariable pyflakes/test/test_other.py::TestUnusedAssignment::test_unusedVariableAsLocals pyflakes/test/test_other.py::TestUnusedAssignment::test_unusedVariableNoLocals pyflakes/test/test_other.py::TestUnusedAssignment::test_variableUsedInLoop pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementAttributeName pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementComplicatedTarget pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementListNames pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementNameDefinedInBody pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementNoNames pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementSingleName pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementSingleNameRedefined pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementSingleNameUndefined pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementSubscript pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementSubscriptUndefined pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementTupleNames pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementTupleNamesRedefined pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementTupleNamesUndefined pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementUndefinedInExpression pyflakes/test/test_other.py::TestUnusedAssignment::test_withStatementUndefinedInside pyflakes/test/test_other.py::TestUnusedAssignment::test_yieldFromUndefined pyflakes/test/test_other.py::TestAsyncStatements::test_asyncDef pyflakes/test/test_other.py::TestAsyncStatements::test_asyncDefAwait pyflakes/test/test_other.py::TestAsyncStatements::test_asyncDefUndefined pyflakes/test/test_other.py::TestAsyncStatements::test_asyncFor pyflakes/test/test_other.py::TestAsyncStatements::test_asyncForUnderscoreLoopVar pyflakes/test/test_other.py::TestAsyncStatements::test_asyncWith pyflakes/test/test_other.py::TestAsyncStatements::test_asyncWithItem pyflakes/test/test_other.py::TestAsyncStatements::test_continueInAsyncForFinally pyflakes/test/test_other.py::TestAsyncStatements::test_formatstring pyflakes/test/test_other.py::TestAsyncStatements::test_loopControlInAsyncFor pyflakes/test/test_other.py::TestAsyncStatements::test_loopControlInAsyncForElse pyflakes/test/test_other.py::TestAsyncStatements::test_matmul pyflakes/test/test_other.py::TestAsyncStatements::test_raise_notimplemented pyflakes/test/test_other.py::TestAsyncStatements::test_variable_annotations pyflakes/test/test_other.py::TestIncompatiblePrintOperator::test_invalid_print_when_imported_from_future pyflakes/test/test_other.py::TestIncompatiblePrintOperator::test_print_as_condition_test pyflakes/test/test_other.py::TestIncompatiblePrintOperator::test_print_function_assignment pyflakes/test/test_other.py::TestIncompatiblePrintOperator::test_print_in_lambda pyflakes/test/test_other.py::TestIncompatiblePrintOperator::test_print_returned_in_function pyflakes/test/test_other.py::TestIncompatiblePrintOperator::test_valid_print