New issue 2971: pyrepl: package for / update on PyPI https://bitbucket.org/pypy/pypy/issues/2971/pyrepl-package-for-update-on-pypi
Daniel Hahler: I've forked pypy/pyrepl at https://github.com/blueyed/pyrepl, and fixed issues for py3 there - before noticing that it appears to have been integrated into PyPy by now? I would like to have a fixed package for it on PyPI - what is the recommended way for this? py2/py3 compatibility is in different PyPy branches, correct? Is "py3.6" the branch to use for py3 compatibility, i.e. the most recent one? Currently I am seeing test failures with it though, and wondered if this passes on PyPy's CI after all?! (where can this be seen?) This is basically using `pypy/lib_pypy/pyrepl` and `pypy/extra_tests/test_pyrepl` with the tox.ini from https://github.com/blueyed/pyrepl. ``` % tox -e pypy3 GLOB sdist-make: …/Vcs/pyrepl-git/setup.py pypy3 inst-nodeps: /tmp/tox…/Vcs/pyrepl-git/.tmp/package/1/pyrepl-0.8.4.zip pypy3 installed: atomicwrites==1.3.0,attrs==19.1.0,cffi==1.12.0,greenlet==0.4.13,more-itertools==6.0.0,pexpect==4.6.0,pluggy==0.9.0,ptyprocess==0.6.0,py==1.8.0,pyrepl==0.8.4,pytest==4.3.0,readline==6.2.4.1,six==1.12.0 pypy3 run-test-pre: PYTHONHASHSEED='3582607578' pypy3 runtests: commands[0] | pytest ==================================================================================== test session starts ===================================================================================== platform linux -- Python 3.6.1[pypy-7.0.0-alpha], pytest-4.3.0, py-1.8.0, pluggy-0.9.0 cachedir: /tmp/tox…/Vcs/pyrepl-git/pypy3/.pytest_cache rootdir: …/Vcs/pyrepl-git, inifile: tox.ini collected 21 items testing/test_basic.py ............. [ 61%] testing/test_bugs.py x.. [ 76%] testing/test_functional.py . [ 80%] testing/test_keymap.py . [ 85%] testing/test_reader.py . [ 90%] testing/test_readline.py F [ 95%] testing/test_wishes.py F [100%] ========================================================================================== FAILURES ========================================================================================== _______________________________________________________________________________________ test_raw_input _______________________________________________________________________________________ @pytest.mark.skipif("os.name != 'posix' or 'darwin' in sys.platform or " "'freebsd' in sys.platform") def test_raw_input(): import os import pty from pyrepl.readline import _ReadlineWrapper master, slave = pty.openpty() readline_wrapper = _ReadlineWrapper(slave, slave) os.write(master, b'input\n') with sane_term(): result = readline_wrapper.get_reader().readline() #result = readline_wrapper.raw_input('prompt:') > assert result == 'input' E AssertionError: assert b'input' == 'input' testing/test_readline.py:20: AssertionError _________________________________________________________________________________ test_quoted_insert_repeat __________________________________________________________________________________ def test_quoted_insert_repeat(): read_spec([ (('digit-arg', '3'), ['']), (('quoted-insert', None), ['']), (('self-insert', '\033'), ['^[^[^[']), > (('accept', None), None)]) testing/test_wishes.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ testing/infrastructure.py:76: in read_spec reader.readline() pyrepl/reader.py:621: in readline self.handle1() pyrepl/reader.py:604: in handle1 self.do_cmd(cmd) pyrepl/reader.py:556: in do_cmd self.refresh() testing/infrastructure.py:68: in refresh Reader.refresh(self) pyrepl/reader.py:538: in refresh self.console.refresh(screen, self.cxy) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <testing.infrastructure.TestConsole object at 0x00007fe7368dbe18>, screen = ['\\u001b\\u001b\\u001b'], xy = (18, 0) def refresh(self, screen, xy): if self.next_screen is not None: assert screen == self.next_screen, "[ %s != %s after %r ]" % ( > screen, self.next_screen, self.last_event_name) E AssertionError: [ ['\\u001b\\u001b\\u001b'] != ['^[^[^['] after 'self-insert' ] testing/infrastructure.py:49: AssertionError ------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------ event ('digit-arg', '3') event ('quoted-insert', None) event ('self-insert', '\x1b') ======================================================================= 2 failed, 18 passed, 1 xfailed in 1.53 seconds ======================================================================= ERROR: InvocationError for command '/tmp/tox…/Vcs/pyrepl-git/pypy3/bin/pytest' (exited with code 1) __________________________________________________________________________________________ summary ___________________________________________________________________________________________ ERROR: pypy3: commands failed ``` _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue