Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

bpython compatibility #101

Closed
myint opened this Issue · 3 comments

2 participants

Steven Myint Florent Xicluna
Steven Myint

Importing pep8 results in an exception when done in bpython.

$ bpython
>>> import pep8
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "pep8.py", line 1054, in <module>
    stdin_get_value = TextIOWrapper(sys.stdin.buffer, errors='ignore').read
AttributeError: readable

Same thing happens if bpython runs pep8.py directly.

$ bpython pep8.py 
Traceback (most recent call last):
  File "pep8.py", line 1054, in <module>
    stdin_get_value = TextIOWrapper(sys.stdin.buffer, errors='ignore').read
AttributeError: readable
Steven Myint

It looks like this is probably a bpython bug (related to monkey patching of sys.stdin). Though it might be nice if pep8 only accessed sys.stdin if needed (when options.diff is used).

Florent Xicluna
Collaborator

I guess it happens with bpython for Python 3 ?

Florent Xicluna florentx closed this in 5d66a82
Steven Myint

Thanks.

Andrey Smirnov smira referenced this issue from a commit in smira/pep8
Andrey Smirnov smira Merge remote-tracking branch 'upstream/master'
* upstream/master: (169 commits)
  Fix false positive E401; issue #104.
  Add tests for issue #100.
  Fix false positive for continuation line indentation when line contains comments. Closes #100
  Fix issue with bpython. Closes #101
  Back to development.
  Fix crash, and release 1.3.3; issue #98.
  Release version 1.3.2.
  Add E902 errors for IOErrors; issue #87.
  Update README.
  A little bit of rewording.
  Revert to the pre-1.2 behavior: --show-pep8 does not imply --first; issue #89.
  Fix errors on E121 and E124; issue #92.
  Add changelog entries for issue #86 and issue #91.
  Fix the default configuration path on Windows. Issue #95.
  Back to development.
  Allow 'verbose' to be specified in the config file
  Clarify .pep can be located in any parent folder
  Show maximum length in "E501 line too long" error message
  Release version 1.3.1.
  Do not read the configuration when used as a module.
  ...

Conflicts:
	pep8.py
e8b0ecf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.