diff --git a/flake8_docstrings.py b/flake8_docstrings.py
index <HASH>..<HASH> 100644
--- a/flake8_docstrings.py
+++ b/flake8_docstrings.py
@@ -6,6 +6,7 @@ included as module into flake8
 """
 import sys
 
+from flake8_polyfill import stdin
 import pycodestyle
 try:
     import pydocstyle as pep257
@@ -15,7 +16,9 @@ except ImportError:
     module_name = 'pep257'
 
 __version__ = '1.0.2'
-__all__ = ['pep257Checker']
+__all__ = ('pep257Checker',)
+
+stdin.monkey_patch('pycodestyle')
 
 
 class EnvironError(pep257.Error):
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ setup(
             'D = flake8_docstrings:pep257Checker',
         ],
     },
-    install_requires=['flake8', 'pydocstyle'],
+    install_requires=['flake8', 'pydocstyle', 'flake8-polyfill'],
     provides=['flake8_docstrings'],
     py_modules=['flake8_docstrings'],
 )
Use flake8-polyfill to monkey-patch stdin

In order to support flake8 2.x and 3.x, we need to rely on
flake8-polyfill to provide a compatibility shim here. Once we release
flake8-docstrings that only relies on Flake8 3.x we can drop this shim.