This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Eduardo.Seabra, berker.peksag, georg.brandl, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, socketpair, vstinner
Date 2015-12-20.17:10:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450631450.36.0.193820895728.issue21579@psf.upfronthosting.co.za>
In-reply-to
Content
I think it is a reasonable backward-compatibility fix to make it work as badly as it previously did ;).  I would not document it, and I do not consider it a high priority (as Serhiy said, this usage reached into object internals and thus was dangerous from the start).

Unless I'm missing something, there is no need to add any new features to support your use case, Марк, or for us to apply a backward compatibility fix for you to get your code working agian.  Your use case is already supported:

    fd, name = tempfile.mkstemp(...)
    with io.open(fd, ...) as f:
        ...

This has the added advantage that it will work on all python versions.  You can easy wrap it into a function for use in your application if you don't like needing two lines.

To extend support for this to Windows, we can add a feature to mkstmp to not use O_TEMPORARY.  Also, it would probably be worth adding the above as an example to the docs.
History
Date User Action Args
2015-12-20 17:10:50r.david.murraysetrecipients: + r.david.murray, georg.brandl, ncoghlan, pitrou, vstinner, socketpair, berker.peksag, serhiy.storchaka, Eduardo.Seabra
2015-12-20 17:10:50r.david.murraysetmessageid: <1450631450.36.0.193820895728.issue21579@psf.upfronthosting.co.za>
2015-12-20 17:10:50r.david.murraylinkissue21579 messages
2015-12-20 17:10:50r.david.murraycreate