Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] pyrepl from PyPy #2

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f620a2f
Copy pyrepl from PyPy
blueyed Mar 10, 2019
cd77c02
tests: test_raw_input: test raw_input (again)
blueyed Mar 10, 2019
d7e72e6
raw_input: pass returns_unicode properly
blueyed Mar 10, 2019
2c0e489
Fix/re-enable quoted_insert: use self.evt.data
blueyed Mar 10, 2019
73a5249
Fix/improve qIHelp (for quoted-insert)
blueyed Mar 10, 2019
967eb91
Keep py2 fixes from master
blueyed Mar 10, 2019
9c666bb
test_readline: keep tests from master
blueyed Mar 10, 2019
fdcdd74
fixup! Keep py2 fixes from master
blueyed Mar 10, 2019
ae41c26
fixup! test_readline: keep tests from master
blueyed Mar 11, 2019
159e3a1
fixup! fixup! Keep py2 fixes from master
blueyed Mar 11, 2019
a25b7b7
Fix read_history_file/write_history_file for py2
blueyed Mar 11, 2019
998e379
fixup! fixup! fixup! Keep py2 fixes from master
blueyed Mar 11, 2019
ae4b8a2
testing/test_unix_reader.py from master
blueyed Mar 11, 2019
9308882
keep things from master for test_unix_reader
blueyed Mar 11, 2019
53d0a75
fixup! keep things from master for test_unix_reader
blueyed Mar 11, 2019
c91fcd2
keep ncursesw fix
blueyed Mar 11, 2019
d8636d1
fixup! Fix/improve qIHelp (for quoted-insert)
blueyed Mar 11, 2019
07a784d
remove testing/conftest.py: pytest_ignore_collect should not be needed
blueyed Mar 11, 2019
93d6868
testing/__init__.py: no trailing newline
blueyed Mar 11, 2019
87b1951
keep pyrepl/unix_eventqueue.py mostly from master
blueyed Mar 11, 2019
e10e082
tests: add test_write_history_file (failing on master)
blueyed Mar 11, 2019
ff54181
write_history_file: do not nuke history on errors
blueyed Mar 11, 2019
f5c935f
keep 33aac3f from master
blueyed Mar 11, 2019
4d3648c
Keep code cleanup from master
blueyed Mar 11, 2019
7f1a049
fixup! write_history_file: do not nuke history on errors
blueyed Mar 11, 2019
2d61f10
fixup! raw_input: pass returns_unicode properly
blueyed Mar 11, 2019
19d6636
fixup! Keep code cleanup from master
blueyed Mar 11, 2019
40cb460
pyrepl/completing_reader.py: keep most of master, flake8 clean
blueyed Mar 16, 2019
655cc50
Remove pyrepl/_minimal_curses.py
blueyed Mar 16, 2019
9a0ff78
keep pyrepl/cmdrepl.py from master
blueyed Mar 16, 2019
63ce133
remove pyrepl/unicodedata_.py
blueyed Mar 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Keep py2 fixes from master
blueyed committed Mar 10, 2019
commit 967eb9149c61518111a210525ec46e807a14d964
2 changes: 1 addition & 1 deletion pyrepl/reader.py
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ def _my_unctrl(c, u=_make_unctrl_map()):
return u[c]
else:
if unicodedata.category(c).startswith('C'):
return r'\u%04x' % ord(c)
return b'\u%04x' % ord(c)
else:
return c

11 changes: 10 additions & 1 deletion testing/test_readline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import sys

import pytest

from .infrastructure import sane_term

if sys.version_info < (3, ):
bytes_type = str
unicode_type = unicode # noqa: F821
else:
bytes_type = bytes
unicode_type = str


@pytest.mark.skipif("os.name != 'posix' or 'darwin' in sys.platform or "
"'freebsd' in sys.platform")
@@ -18,4 +27,4 @@ def test_raw_input():
result = readline_wrapper.raw_input('prompt:')
assert result == 'input'
# A bytes string on python2, a unicode string on python3.
assert isinstance(result, str)
assert isinstance(result, unicode_type)