Message256775
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. |
|
Date |
User |
Action |
Args |
2015-12-20 17:10:50 | r.david.murray | set | recipients:
+ r.david.murray, georg.brandl, ncoghlan, pitrou, vstinner, socketpair, berker.peksag, serhiy.storchaka, Eduardo.Seabra |
2015-12-20 17:10:50 | r.david.murray | set | messageid: <1450631450.36.0.193820895728.issue21579@psf.upfronthosting.co.za> |
2015-12-20 17:10:50 | r.david.murray | link | issue21579 messages |
2015-12-20 17:10:50 | r.david.murray | create | |
|