msg230340 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2014-10-31 14:01 |
The patch for Issue19884 to set enable-meta-key to "off" does not work when readline-devel package is libreadline5, which includes SLES 11. |
|
|
msg230341 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2014-10-31 14:02 |
Patch attached to export version and skip test if version less than 0x600. |
|
|
msg230342 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2014-10-31 14:13 |
Revised patch with leading underscores to make version objects private. |
|
|
msg230344 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2014-10-31 14:27 |
I would prefer to see the bug fixed instead of being skipped :-/ Is there a way to fix the issue, but differently on readline < 6.0? |
|
|
msg230346 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2014-10-31 14:46 |
The portion of the patch to skip the test is necessary because, as mentioned in Issue19884, setting enable-meta-key does not work in older releases of libreadline. The particular combination of default TERM and libreadline is rare in old OS versions and can be worked around by setting TERM=dummy. |
|
|
msg230347 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2014-10-31 14:54 |
+1 for the patch. |
|
|
msg230366 - (view) |
Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) *  |
Date: 2014-10-31 18:30 |
Naming it _READLINE_BUILDTIME_VERSION instead of _READLINE_VERSION would avoid ambiguity. |
|
|
msg230368 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2014-10-31 18:37 |
I am trying to follow the precedent of zlibmodule with the naming so that users of Python modules have as consistent an experience and user interface as possible. |
|
|
msg230371 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2014-10-31 18:39 |
Indeed, I think there's no ambiguity here. Victor, are you ok with the patch? |
|
|
msg230382 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2014-10-31 20:22 |
The patch doesn't take into account that the readline module may be linked with BSD libedit (as is the default on OS X and is preferred by some third-party distributors) rather than GNU readline. The patch causes the test to be incorrectly skipped on those platforms. >>> readline._READLINE_VERSION 1026 The documented way of differentiating the two cases is by checking the __doc__ string for "readline" or "libedit": >>> readline.__doc__ 'Importing this module enables command line editing using libedit readline.' vs. >>> readline.__doc__ 'Importing this module enables command line editing using GNU readline.' |
|
|
msg230383 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2014-10-31 20:25 |
Make that: The documented way of differentiating the two cases is by checking the __doc__ string for "libedit". |
|
|
msg230384 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2014-10-31 20:34 |
In the past, I added sys.thread_info to be able to skip tests on some old platforms. Maybe we need something similar: an object with runtime version, build version, implementation name, etc. |
|
|
msg230386 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2014-10-31 20:42 |
@ned.deily Can you offer a suggestion of how you you like the skipIf test modified to check __doc__ for "libedit"? |
|
|
msg230387 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2014-10-31 20:58 |
Something like: @unittest.skipIf(("libedit" not in readline.__doc__) and (readline._READLINE_VERSION < 0x6000), "not supported in this library version") should work. |
|
|
msg230388 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2014-10-31 21:09 |
Okay, grouping was wrong in my initial attempt. New patch attached. |
|
|
msg230392 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2014-10-31 21:35 |
The test works OK with libedit now, thanks. But are you sure about the readline version test? Testing with a GNU readline 6.3: >>> print('%x' % readline._READLINE_RUNTIME_VERSION) 603 so the test_readline check: readline._READLINE_VERSION < 0x6000 causes the test to be incorrectly skipped. What does _READLINE_RUNTIME_VERSION look like for an older version of readline? |
|
|
msg230404 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2014-10-31 22:26 |
The test should be 0x0600. |
|
|
msg230621 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2014-11-04 13:53 |
New changeset c4b5a5d44254 by Antoine Pitrou in branch '3.4': Issue #22773: fix failing test with old readline versions due to issue #19884. https://hg.python.org/cpython/rev/c4b5a5d44254 New changeset be374b8c40c8 by Antoine Pitrou in branch 'default': Issue #22773: fix failing test with old readline versions due to issue #19884. https://hg.python.org/cpython/rev/be374b8c40c8 |
|
|
msg230623 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2014-11-04 13:56 |
New changeset eba6e68e818c by Antoine Pitrou in branch '2.7': Issue #22773: fix failing test with old readline versions due to issue #19884. https://hg.python.org/cpython/rev/eba6e68e818c |
|
|