Skip to content

Commit 5bba042

Browse files
committed
Do not select.select on stdin, it is not supported on Windows. Fixes #170
1 parent 69bc3c0 commit 5bba042

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

CHANGES.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ Changelog
55
1.x (unreleased)
66
----------------
77

8-
* Do not require ``setuptools`` to work around an issue with ``pip`` and
9-
Python 3. (Issue #172)
8+
* When no path is specified, do not try to read from stdin. The feature
9+
was added in 1.4.3, but it is not supported on Windows. Use ``-``
10+
filename argument to read from stdin. This usage is supported
11+
since 1.3.4. (Issue #170)
12+
13+
* Do not require ``setuptools`` in setup.py. It works around an issue
14+
with ``pip`` and Python 3. (Issue #172)
1015

1116
* Add ``__pycache__`` to the ignore list.
1217

pep8.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,18 +1810,11 @@ def process_options(arglist=None, parse_argv=False, config_file=None,
18101810
args.append(options.testsuite)
18111811
elif not options.ensure_value('doctest', False):
18121812
if parse_argv and not args:
1813-
if options.diff:
1813+
if options.diff or any(os.path.exists(name)
1814+
for name in PROJECT_CONFIG):
18141815
args = ['.']
18151816
else:
1816-
import select
1817-
# wait for 1 second on the stdin fd
1818-
reads, __, __ = select.select([sys.stdin], [], [], 1.)
1819-
if reads:
1820-
args = ['-']
1821-
elif any(os.path.exists(name) for name in PROJECT_CONFIG):
1822-
args = ['.']
1823-
else:
1824-
parser.error('input not specified')
1817+
parser.error('input not specified')
18251818
options = read_config(options, args, arglist, parser)
18261819
options.reporter = parse_argv and options.quiet == 1 and FileReport
18271820

0 commit comments

Comments
 (0)