How about using INCOMPITABLE_LICENSE to determine the default PACAKGECONFIG, so 
that the default is readline? Maybe this would be part of the new meta-gplv2 
replacement work (@Khem Raj). I'm not very sure about it, though. As far as I 
can see, very few people care about this GPLv3 problem. The evidence is that 
meta-gplv2 is NOT supported for a long time and nobody ever devotes any real 
effort to develop an alternative. 

I guess when the commit was made, the underlying API incompatibility was NOT 
made clear. 

I'm OK with any choice, as long as clear statements are there to tell people 
why, though I prefer to use readline as the default, as it would provide better 
user experience.

Regards,
Qi

-----Original Message-----
From: Trevor Gamblin <[email protected]> 
Sent: Wednesday, August 14, 2024 9:04 PM
To: Chen, Qi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]
Subject: Re: [OE-core][PATCH v2] python3: skip readline limited history tests


On 2024-08-13 10:56 p.m., ChenQi wrote:
> The github issue you referenced here is not an issue that tracks this 
> test failure. It's an issue that introduced the original commit, and 
> has been closed. If a problem is 100% reproducible, at least some open 
> issue should be there for tracking to validate an explicit skip. As 
> far as I can see, tests that were skipped are rarely revisited.
>
> Also, looking at the issue you referenced, it seems that the problem 
> is that we're using editline instead of readline as the default 
> PACKAGECONFIG. It looks like that this new test case correctly reveals 
> our specific configuration problem.
> PACKAGECONFIG ??= "editline gdbm ${@bb.utils.filter('DISTRO_FEATURES',
> 'lto', d)}"
> PACKAGECONFIG[readline] = "--with-readline=readline,,readline,,,editline"
> PACKAGECONFIG[editline] = "--with-readline=editline,,libedit,,,readline"
>
> Can you try using readline as the default PACKAGECONFIG and see if 
> things work?
Yes, the test passes with readline. I didn't make this change for the test 
because I had assumed we want to use editline in the PACKAGECONFIG instead of 
readline, based on commit ce6add6f8aca0. Is this not the case? Do we want to 
switch back to using readline by default?
>
> Regards,
> Qi
>
> On 8/14/24 00:41, Trevor Gamblin wrote:
>> Python 3.12.5 is failing a newer ptest for reading/writing limited 
>> history. Skip it for now until a proper fix (if any) is determined.
>>
>> The new test was added in
>> https://github.com/python/cpython/commit/263c7e611bb24715e513d457a347
>> 7a61fff15162
>>
>>
>> The GitHub issue is here: 
>> https://github.com/python/cpython/issues/121160
>>
>> The aforementioned bug report suggests that OSErrors like that show 
>> up when using the GNU readline-based readline module if a workaround 
>> isn't also incorporated. It also mentions a new readline backend will 
>> be available in 3.13 that might help, but that won't be available for 
>> a year.
>>
>> Signed-off-by: Trevor Gamblin <[email protected]>
>> ---
>> v2 adds extra info in the commit message and carried patch about the 
>> source of the test failure.
>>
>>   ...t_readline-skip-limited-history-test.patch | 40 
>> +++++++++++++++++++
>>   .../recipes-devtools/python/python3_3.12.5.bb |  1 +
>>   2 files changed, 41 insertions(+)
>>   create mode 100644
>> meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-
>> history-test.patch
>>
>> diff --git
>> a/meta/recipes-devtools/python/python3/0001-test_readline-skip-limite
>> d-history-test.patch 
>> b/meta/recipes-devtools/python/python3/0001-test_readline-skip-limite
>> d-history-test.patch
>>
>> new file mode 100644
>> index 0000000000..851ddd571a
>> --- /dev/null
>> +++ 
>> b/meta/recipes-devtools/python/python3/0001-test_readline-skip-limite
>> d-history-test.patch
>> @@ -0,0 +1,40 @@
>> +From d9d916d5ea946c945323679d1709de1b87029b96 Mon Sep 17 00:00:00 
>> +2001
>> +From: Trevor Gamblin <[email protected]>
>> +Date: Tue, 13 Aug 2024 11:07:05 -0400
>> +Subject: [PATCH] test_readline: skip limited history test
>> +
>> +This test was added recently and is failing on the ptest image. 
>> +Disable it until the proper fix is determined.
>> +
>> +See also: https://github.com/python/cpython/issues/121160
>> +
>> +Upstream-Status: Inappropriate [OE-specific]
>> +
>> +Signed-off-by: Trevor Gamblin <[email protected]>
>> +---
>> + Lib/test/test_readline.py | 2 ++
>> + 1 file changed, 2 insertions(+)
>> +
>> +diff --git a/Lib/test/test_readline.py b/Lib/test/test_readline.py 
>> +index 91fd7dd13f9..d81f9bf8eed 100644
>> +--- a/Lib/test/test_readline.py
>> ++++ b/Lib/test/test_readline.py
>> +@@ -132,6 +132,7 @@ def test_nonascii_history(self):
>> +         self.assertEqual(readline.get_history_item(1), "entrée 1")
>> +         self.assertEqual(readline.get_history_item(2), "entrée 22")
>> +
>> ++    @unittest.skip("Skipping problematic test")
>> +     def test_write_read_limited_history(self):
>> +         previous_length = readline.get_history_length()
>> +         self.addCleanup(readline.set_history_length, 
>> +previous_length) @@ -349,6 +350,7 @@ def test_history_size(self):
>> +             self.assertEqual(len(lines), history_size)
>> +             self.assertEqual(lines[-1].strip(), b"last input")
>> +
>> ++    @unittest.skip("Skipping problematic test")
>> +     def test_write_read_limited_history(self):
>> +         previous_length = readline.get_history_length()
>> +         self.addCleanup(readline.set_history_length, 
>> +previous_length)
>> +--
>> +2.39.2
>> +
>> diff --git a/meta/recipes-devtools/python/python3_3.12.5.bb
>> b/meta/recipes-devtools/python/python3_3.12.5.bb
>> index 5665c90fa9..cc2e14baf0 100644
>> --- a/meta/recipes-devtools/python/python3_3.12.5.bb
>> +++ b/meta/recipes-devtools/python/python3_3.12.5.bb
>> @@ -33,6 +33,7 @@ SRC_URI =
>> "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ 
>> file://0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patc
>> h \
>>          file://0001-test_deadlock-skip-problematic-test.patch \ 
>> file://0001-test_active_children-skip-problematic-test.patch \
>> + file://0001-test_readline-skip-limited-history-test.patch \
>>              "
>>     SRC_URI:append:class-native = " \
>>
>> 
>>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#203324): 
https://lists.openembedded.org/g/openembedded-core/message/203324
Mute This Topic: https://lists.openembedded.org/mt/107879487/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to