GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-29854: test_readline logs versions in verbose mode by vstinner · Pull Request #2619 · python/cpython

bpo-29854: test_readline logs versions in verbose mode #2619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
vstinner merged 1 commit into python:master from vstinner:test_readline_version
Jul 7, 2017

Uh oh!

There was an error while loading. Please reload this page.

Merged

bpo-29854: test_readline logs versions in verbose mode #2619

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1 commit
Select commit
670c4c2
bpo-29854: test_readline logs versions
vstinner Jul 7, 2017
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

20 changes: 18 additions & 2 deletions 20 Lib/test/test_readline.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,29 @@
import sys
import tempfile
import unittest
from test.support import import_module, unlink, temp_dir, TESTFN
from test.support import import_module, unlink, temp_dir, TESTFN, verbose
from test.support.script_helper import assert_python_ok

# Skip tests if there is no readline module
readline = import_module('readline')

is_editline = readline.__doc__ and "libedit" in readline.__doc__
if hasattr(readline, "_READLINE_LIBRARY_VERSION"):
is_editline = ("EditLine wrapper" in readline._READLINE_LIBRARY_VERSION)
else:
is_editline = (readline.__doc__ and "libedit" in readline.__doc__)
Comment thread

@nirs nirs Jul 7, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like duplicating the horrible doc check, and adding a new incompatible check for the same thing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner Jul 7, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like duplicating the horrible doc check, and adding a new incompatible check for the same thing.

IMHO such enhancement would deserves its own PR ;-)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions


def setUpModule():
if verbose:
# Python implementations other than CPython may not have
# these private attributes
if hasattr(readline, "_READLINE_VERSION"):
print(f"readline version: {readline._READLINE_VERSION:#x}")
print(f"readline runtime version: {readline._READLINE_RUNTIME_VERSION:#x}")
if hasattr(readline, "_READLINE_LIBRARY_VERSION"):
print(f"readline library version: {readline._READLINE_LIBRARY_VERSION!r}")
print(f"use libedit emulation? {is_editline}")


@unittest.skipUnless(hasattr(readline, "clear_history"),
"The history update test cannot be run because the "
Expand Down
1 change: 1 addition & 0 deletions 1 Modules/readline.c
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,7 @@ PyInit_readline(void)

PyModule_AddIntConstant(m, "_READLINE_VERSION", RL_READLINE_VERSION);
PyModule_AddIntConstant(m, "_READLINE_RUNTIME_VERSION", rl_readline_version);
PyModule_AddStringConstant(m, "_READLINE_LIBRARY_VERSION", rl_library_version);

return m;
}
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.