[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problems running testsuite on Windows with Python 3

From: Branko Čibej <brane_at_apache.org>
Date: Mon, 20 Apr 2020 02:13:06 +0200

On 19.04.2020 23:58, Yasuhito FUTATSUKI wrote:
> I've commited the patch for blame_tests.py in 1876734. Thank you.
>
> On 2020/04/19 22:53, Branko Čibej wrote:
>> On 19.04.2020 14:47, Johan Corveleyn wrote:
>>> Would you also have an idea on how to fix the PYTHONLEGACYWINDOWSSTDIO issue?
>>> I mean: would it ever be possible to run the testsuite without
>>> defining that envvar? Or will that remain necessary?
>>
>> Depending on how the testsuite is implemented, which I forget in detail,
>> it might be. The os.dup2() method allows child processes to inherit the
>> redirected standard handles. Reassigning os.stdout will not do that.
>> There might be a way to maintain the inheritance behaviour by creating
>> child processes differently.
> Actually I tried the patch below (in FreeBSD), but it is not enogh.
> Duplication of file descriptor is still needed. Output during test is
> redirected to the log file, however the results of the tests written
> in Python are not redirected.

Yes, that is exactly what I suspected would happen.

> [[[
> Index: build/run_tests.py
...
> ]]]
>
> If reconstruction of _io._WindowsConsoleIO from stored old descripor is
> allowed (i.e. documented in the specification), it seems to be possible
> to write work around.

Given that these are private symbols, at least according to their names,
they could change in any minor Python version. :(

-- Brane
Received on 2020-04-20 02:13:09 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.