This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年10月31日 14:01 by David.Edelsohn, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| Issue22773.txt | David.Edelsohn, 2014年10月31日 14:02 | review | ||
| Issue22773.txt | David.Edelsohn, 2014年10月31日 14:13 | v2 | review | |
| Issue22773.txt | David.Edelsohn, 2014年10月31日 21:09 | v3 | review | |
| Issue22773.txt | David.Edelsohn, 2014年10月31日 22:26 | v4 | review | |
| Messages (19) | |||
|---|---|---|---|
| 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) * (Python committer) | 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) * (Python committer) | Date: 2014年10月31日 14:54 | |
+1 for the patch. |
|||
| msg230366 - (view) | Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) | 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) * (Python committer) | 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) * (Python committer) | 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) * (Python committer) | 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) * (Python committer) | 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) * (Python committer) | 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) * (Python committer) | 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) (Python triager) | 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) (Python triager) | 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 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:09 | admin | set | github: 66962 |
| 2014年11月04日 14:14:52 | pitrou | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2014年11月04日 13:56:46 | python-dev | set | messages: + msg230623 |
| 2014年11月04日 13:53:12 | python-dev | set | nosy:
+ python-dev messages: + msg230621 |
| 2014年11月01日 21:49:50 | David.Edelsohn | set | title: Export Readline version and expect ANSI sequence for version < 0x6000 -> Export Readline version and expect ANSI sequence for version < 0x0600 |
| 2014年10月31日 22:26:20 | David.Edelsohn | set | files:
+ Issue22773.txt messages: + msg230404 |
| 2014年10月31日 21:35:31 | ned.deily | set | messages: + msg230392 |
| 2014年10月31日 21:09:37 | David.Edelsohn | set | files:
+ Issue22773.txt messages: + msg230388 |
| 2014年10月31日 20:58:58 | ned.deily | set | messages: + msg230387 |
| 2014年10月31日 20:42:51 | David.Edelsohn | set | messages: + msg230386 |
| 2014年10月31日 20:34:42 | vstinner | set | messages: + msg230384 |
| 2014年10月31日 20:25:06 | ned.deily | set | messages: + msg230383 |
| 2014年10月31日 20:22:26 | ned.deily | set | nosy:
+ ned.deily messages: + msg230382 |
| 2014年10月31日 18:39:36 | pitrou | set | messages: + msg230371 |
| 2014年10月31日 18:37:05 | David.Edelsohn | set | messages: + msg230368 |
| 2014年10月31日 18:30:40 | Arfrever | set | nosy:
+ Arfrever messages: + msg230366 |
| 2014年10月31日 14:54:29 | pitrou | set | stage: patch review messages: + msg230347 versions: + Python 2.7, Python 3.4, Python 3.5 |
| 2014年10月31日 14:46:21 | David.Edelsohn | set | messages: + msg230346 |
| 2014年10月31日 14:27:59 | vstinner | set | messages: + msg230344 |
| 2014年10月31日 14:13:52 | David.Edelsohn | set | files:
+ Issue22773.txt messages: + msg230342 |
| 2014年10月31日 14:02:49 | David.Edelsohn | set | files:
+ Issue22773.txt type: behavior messages: + msg230341 |
| 2014年10月31日 14:01:28 | David.Edelsohn | create | |