diff options
author | Daniel Hahler | 2016-09-16 00:46:11 +0200 |
---|---|---|
committer | Daniel Hahler | 2016-09-16 00:46:11 +0200 |
commit | cec9c0f4e48196807bbd502b21d3221a6f883e31 (patch) | |
tree | 21dceb898c24bdb08e8ee06cec6267d7bedd48dc | |
parent | a0a5b35c78fe2f9e4a9cc6792d49827ed0d5cd1e (diff) | |
download | aur-cec9c0f4e48196807bbd502b21d3221a6f883e31.tar.gz |
Fix TypeError after readline input
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | py3fixes.patch | 27 |
3 files changed, 31 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = python-pyrepl-hg pkgdesc = A Python library for building flexible command line interfaces pkgver = r263+.9401662c4e6c+ - pkgrel = 1 + pkgrel = 2 url = http://pypi.python.org/pypi/pyrepl arch = any license = MIT @@ -15,7 +15,7 @@ pkgbase = python-pyrepl-hg source = py3fixes.patch md5sums = SKIP md5sums = 14f1a9fd02693f9d05d25fd9d1214070 - md5sums = 3c2b239e29f8cbd617cb2de5cc93626e + md5sums = 7c5479c079bf68e91d8117a5b9bd2bd8 pkgname = python-pyrepl-hg @@ -4,7 +4,7 @@ pkgname=python-pyrepl-hg _realpkg=pyrepl pkgver=r263+.9401662c4e6c+ -pkgrel=1 +pkgrel=2 pkgdesc="A Python library for building flexible command line interfaces" url="http://pypi.python.org/pypi/pyrepl" arch=("any") @@ -17,7 +17,7 @@ source=("hg+https://bitbucket.org/pypy/pyrepl" "py3fixes.patch") md5sums=('SKIP' '14f1a9fd02693f9d05d25fd9d1214070' - '3c2b239e29f8cbd617cb2de5cc93626e') + '7c5479c079bf68e91d8117a5b9bd2bd8') makedepends=('mercurial' 'python') pkgver() { diff --git a/py3fixes.patch b/py3fixes.patch index 22baad744214..20556c1e0e0c 100644 --- a/py3fixes.patch +++ b/py3fixes.patch @@ -171,3 +171,30 @@ diff -r 9401662c4e6c pyrepl/readline.py chars.sort() return ''.join(chars) + +Fix crash after readline input. + + File "/usr/lib/python3.5/pdb.py", line 259, in user_line + self.interaction(frame, None) + File "/usr/lib/python3.5/site-packages/pdb.py", line 250, in interaction + self.cmdloop() + File "/usr/lib/python3.5/cmd.py", line 137, in cmdloop + line = self.precmd(line) + File "/usr/lib/python3.5/pdb.py", line 396, in precmd + marker = line.find(';;') +TypeError: a bytes-like object is required, not 'str' + +diff -r 9401662c4e6c pyrepl/readline.py +--- a/pyrepl/readline.py Fri Dec 04 13:10:13 2015 +0000 ++++ b/pyrepl/readline.py Fri Sep 16 00:41:57 2016 +0200 +@@ -199,7 +205,9 @@ + except _error: + return _old_raw_input(prompt) + reader.ps1 = prompt +- return reader.readline(startup_hook=self.startup_hook) ++ # Unicode/str is required for Python 3 (3.5.2). ++ return unicode(reader.readline(startup_hook=self.startup_hook), ++ ENCODING) + + def multiline_input(self, more_lines, ps1, ps2, returns_unicode=False): + """Read an input on possibly multiple lines, asking for more |