Python 3.7 no sys.stdout.reconfigure is defined

Viewed 625

I'm trying to use the sys.stdout.reconfigure function on a Windows machine. It is not surprising that this function doesn't work on Python 3.6: this should be the feature of Python 3.7. Ok, I've tried this on another windows machine with Python 3.7.2 installed: doesn't work as well and throws the same error:

AttributeError: '_io.BufferedWriter' object has no attribute 'reconfigure'

As I found, this function works on Linux machine with Python 3.7.5 installed. So my theory was that this is the feature of one of the intermediate versions, but I found an online interpreter that claims that it is 3.7.0 version... but the function works on this older version.

Now my question is: what is the minimum version of Python that supports this feature, and why doesn't it work on Python 3.7.5 if it does on 3.7.0?

1 Answers

The feature is supposed to work starting with version 3.7.0 (see issue30526 timeline - it was integrated just before the release of Python 3.7.0). So, assuming you had access to any of the pre-release versions (e.g. compiled manually or packages from the source code available just prior to the release) it is possible that they do not include this PR.

Related