Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-90005: Port readline and curses to PY_STDLIB_MOD (GH-94452)#94452

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.

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

Already on GitHub?Sign in to your account

Merged
tiran merged 7 commits intopython:mainfromtiran:gh-90005-readline-curses
Jul 6, 2022

Conversation

tiran
Copy link
Member

@tirantiran commentedJun 30, 2022
edited by bedevere-bot
Loading

@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJun 30, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@tiran for commit 33d9e296124d7daeef89fca957bdab51e1e1d11b 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJun 30, 2022
@tirantiranforce-pushed thegh-90005-readline-curses branch from8a61447 todd59373CompareJune 30, 2022 19:40
@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJun 30, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@tiran for commit dd5937322e181781c03213621eddb0fb88527c48 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelJun 30, 2022
@tirantiran marked this pull request as ready for reviewJune 30, 2022 21:23
Copy link
Contributor

@erlend-aaslanderlend-aasland left a comment

Choose a reason for hiding this comment

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

Great work! I left some comments.

configure.ac Outdated
Comment on lines 5848 to 5850
AC_CHECK_LIB($LIBREADLINE, rl_pre_input_hook,
AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1,
[Define if you have readline 4.0]))
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this will create havoc for WASM/Emscripten static builds; multiple-l switches are passed to the compiler:

config.log:

29899 configure:21034: checking for rl_pre_input_hook in -lreadline29900 configure:21059: gcc -o conftest     conftest.c -lreadline  -lreadline -lintl -ldl  >&529901 configure:21059: $? = 029902 configure:21069: result: yes29903 configure:21080: checking for rl_completion_display_matches_hook in -lreadline29904 configure:21105: gcc -o conftest     conftest.c -lreadline  -lreadline -lintl -ldl  >&529905 configure:21105: $? = 029906 configure:21115: result: yes29907 configure:21126: checking for rl_resize_terminal in -lreadline29908 configure:21151: gcc -o conftest     conftest.c -lreadline  -lreadline -lintl -ldl  >&5

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good point, should I place a WITH_SAVE_ENV around each check? By the way, readline is not yet supported on Emscripten.

Copy link
Contributor

Choose a reason for hiding this comment

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

WITH_SAVE_ENV can't be nested :( But yourLIBS_SAVE workaround should work well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, it does not work. They're still there.

Copy link
Contributor

@erlend-aaslanderlend-aaslandJul 1, 2022
edited
Loading

Choose a reason for hiding this comment

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

AC_CHECK_LIB might be adding the library before running the check.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yeah, we need a different approach here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah. This reminds me I've got an open PR for the exact same issue for sqlite3 dependency detection :) I've tried various approaches, but I haven't found a neat way to solve it yet. (I haven't looked at it for a week either, though.)

@tirantiranforce-pushed thegh-90005-readline-curses branch fromdd59373 toa72b632CompareJuly 1, 2022 20:08
Copy link
Contributor

@erlend-aaslanderlend-aasland left a comment

Choose a reason for hiding this comment

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

These suggestions should work. You should be able to apply them as a batch.

@tiran
Copy link
MemberAuthor

@erlend-aasland I have refactored the code. There is a bit of repetition but IMHO it's ok for a few lookups. We could add our own variant ofAC_CHECK_LIB at a later point in time.

erlend-aasland reacted with thumbs up emoji

@tirantiran changed the titlegh-90005: Port readline and curses to PY_STDLIB_MODgh-90005: Port readline and curses to PY_STDLIB_MOD (GH-94452)Jul 6, 2022
@tirantiran merged commite925241 intopython:mainJul 6, 2022
@tirantiran deleted the gh-90005-readline-curses branchJuly 6, 2022 09:56
@tiran
Copy link
MemberAuthor

I have merged the PR. It works on all tested platforms. We can review and address the general issue withAC_CHECK_LIB in a future PR.

erlend-aasland reacted with hooray emoji

@vstinner
Copy link
Member

The change triggered a reference leak on Fedora:#94644

erlend-aasland reacted with eyes emoji

@kulikjak
Copy link
Contributor

Hi, I think I found an issue.

On Solaris, even a simple code like:

charreadline ();intmain (void) {returnreadline ();}

needs to be linked with both-lreadline and-lncurses; that means thatchecking for readline in -lreadline fails. I thought that passingLIBREADLINE_LIBS would fix that, but the content of that variable is not used until the test passes, andLIBS="-lreadline $LIBS" is always used. (AFAICT, automatic pkg-config would also do nothing, although I didn't test that).

Is there something I am missing or something I can try?

@tiran
Copy link
MemberAuthor

The problem should be fixed byGH-94802.

@kulikjak
Copy link
Contributor

Ah, it's indeed fixed. I am sorry, I thought I am looking into latestmain but it was 12 days old (when this was pushed).

Thanks for help!

tiran reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@tiran@bedevere-bot@vstinner@kulikjak@erlend-aasland

[8]ページ先頭

©2009-2025 Movatter.jp