[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 15:14:53 +0200

On 20.04.2020 14:13, Yasuhito FUTATSUKI wrote:
> On 2020/04/20 9:13, Branko Čibej wrote:
>> On 19.04.2020 23:58, Yasuhito FUTATSUKI wrote:
> <snip>
>
>>> 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?
> <snip>
>
>>> 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. :(
> Yes, indeed.
>
> However, at least on Python 3.6.6, if given file descptor 1 is pointing
> to tty, the result of
>
> open(1, 'w', encoding='utf-8', closefd=False).buffer.raw
>
> is _io._WindowsConsoleIO object, and it seems to be able to used for
> console output.

Ah, very nice, I didn't know you could open() an existing file
descriptor in Python3.

-- Brane
Received on 2020-04-20 15:14:56 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.