Issue1293

classification
Title: Provide a default readline console using JLine
Type: Severity: normal
Components: Versions: 2.5b1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pjenvey Nosy List: fwierzbicki, otmarhumbel, pjenvey, zyasoft
Priority: normal Keywords: patch

Created on 2009-03-29.00:01:44 by zyasoft, last changed 2010-08-15.15:04:25 by zyasoft.

Files
File name Uploaded Description Edit Remove
jline-osx-hacks(old).diff pjenvey, 2009-04-22.22:14:26
jline_out_of_the_box_patch.txt otmarhumbel, 2009-04-23.06:53:08 would enable jline out of the box
jline-osx.diff pjenvey, 2009-05-10.06:51:22
Messages
msg4376 (view) Author: Jim Baker (zyasoft) Date: 2009-03-29.00:01:43
Need to fix this behavior when using arrow keys on the console:

Jython 2.5b3+ (trunk:6102:6107M, Mar 22 2009, 14:42:05) 
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_07
Type "help", "copyright", "credits" or "license" for more information.
>>> ^[[A^[[A^[[A^[[A^[[A

We need to fix in the RC phase since we now have a decent JLine
available instead of forcing our users to configure their registry.
msg4398 (view) Author: Jim Baker (zyasoft) Date: 2009-03-31.03:48:34
Changed the registry to default to using JLine. As usual, our
documentation (http://wiki.python.org/jython/ReadlineSetup) is obsolete
here, there's no need to use jline.ConsoleRunner.

We need to track updates to the JLine project, we currently have 0.9.94,
but JRuby is working on an updated version.

In addition, the JRuby startup script has some specific workarounds for
cygwin that we need to apply to our startup script.
msg4399 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-03-31.05:51:35
so far i had no luck using jython on cygwin (i fear my cygwin setup is not  
correct). nevertheless i'll give it a try.
msg4436 (view) Author: Jim Baker (zyasoft) Date: 2009-04-04.04:56:57
I should have noted this earlier: pending on the application of similar
logic in bin/jython as used in JRuby for cygwin support:
http://pylonshq.com/pasties/4dd0310c0cc59c336f773a90a3b55024

Should otherwise work on all other platforms.
msg4570 (view) Author: Philip Jenvey (pjenvey) Date: 2009-04-22.22:12:03
I'd like to default to jline but I've noticed a few annoying problems 
with it that I'd like to see fixed before we do that:

o disables tab for its completion feature that we don't even use
o doesn't recognize backspace (delete) on my platform (OS X)
o breaks non ascii input

It has a way to disable tab via supplying custom keybindings when you 
initialize it, so we could solve that (it's also supposed to let 
customize bindings in a ~/.jline.keybindings but this is broken)

It actually has code to recognize my delete/backspace key via running 
stty, but this is also broken

I have beginnings of fixes for these issues in the jline code base 
(headius has commit access there), so eventually we'll get this all 
taken care of, but possibly not before 2.5. This shouldn't block the 
release
msg4571 (view) Author: Philip Jenvey (pjenvey) Date: 2009-04-22.22:14:26
Attached my hacky workarounds for said issues in the jline codebase
msg4572 (view) Author: Philip Jenvey (pjenvey) Date: 2009-04-22.22:24:51
It also breaks the regression test in a few spots:

http://bob.underboss.org:8080/job/jython/743/
msg4579 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-04-23.06:53:04
This patch does a jarjar of jline, so the end user does not have to deal 
with his classpath
msg4658 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-08.00:11:34
I'm going to work on fixing the stty detection of backspace. Then we'll 
roll out a custom Jython build of jline as Jim suggested
msg4665 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-10.06:51:01
r6326 enables it with my custom build of jline. Attached is the final 
patch against it

I've disabled custom consoles entirely when stdin isn't interactive to 
avoid test failures. This shouldn't be a problem, even if the isatty() 
implementation on your platform is pure java it returns true when stdin 
is System.in

I'll leave this open because the docs on wiki could really use a quick 
update
msg4668 (view) Author: Jim Baker (zyasoft) Date: 2009-05-10.20:03:34
Changing to normal since docs don't block RC
msg4671 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-11.01:29:56
I guess cygwin could also use some attention
msg5965 (view) Author: Jim Baker (zyasoft) Date: 2010-08-15.15:04:25
Closing this out, obviously it's been working for a while.
History
Date User Action Args
2010-08-15 15:04:25zyasoftsetstatus: pending -> closed
assignee: pjenvey
resolution: accepted -> fixed
messages: + msg5965
2009-05-11 01:29:57pjenveysetmessages: + msg4671
2009-05-10 20:05:15zyasoftsetpriority: high -> normal
2009-05-10 20:03:34zyasoftsetmessages: + msg4668
2009-05-10 06:51:26pjenveysetfiles: + jline-osx.diff
assignee: pjenvey -> (no value)
messages: + msg4665
2009-05-08 00:11:35pjenveysetassignee: otmarhumbel -> pjenvey
messages: + msg4658
2009-04-23 06:53:11otmarhumbelsetfiles: + jline_out_of_the_box_patch.txt
messages: + msg4579
2009-04-22 22:24:51pjenveysetmessages: + msg4572
2009-04-22 22:14:27pjenveysetfiles: + jline-osx-hacks(old).diff
keywords: + patch
messages: + msg4571
2009-04-22 22:12:03pjenveysetnosy: + pjenvey
messages: + msg4570
2009-04-20 11:50:07otmarhumbelsetassignee: otmarhumbel
2009-04-04 04:57:07zyasoftsetstatus: open -> pending
messages: + msg4436
2009-03-31 05:51:38otmarhumbelsetmessages: + msg4399
2009-03-31 03:48:34zyasoftsetnosy: + otmarhumbel
resolution: accepted
messages: + msg4398
title: Arrow keys results in "weirdness" ;) on default install of Jython 2.5 -> Provide a default readline console using JLine
2009-03-29 00:02:03zyasoftsetversions: + 2.5b1
2009-03-29 00:01:44zyasoftcreate