[issue10354] tempfile.template is broken

2015-05-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: backwards compatibility with what? i'd like to just remove tempfile.template in 3.5 as part of addressing issue24230. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org

[issue10354] tempfile.template is broken

2015-05-18 Thread R. David Murray
R. David Murray added the comment: Backward compatibility in that someone might be using the constant in their code. You could just leave the existing value there with a comment that it is unused and use a leading _ for the new constants. (Or you could delete it...it's not likely anyone is

[issue10354] tempfile.template is broken

2011-06-22 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset eafe8c7f7049 by R David Murray in branch 'default': #10354: remove last public mentions of 'template' and comment as private. http://hg.python.org/cpython/rev/eafe8c7f7049 -- nosy: +python-dev

[issue10354] tempfile.template is broken

2011-06-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I have removed the last mentions of template from the docs and docstrings, and added a comment that it is a private variable despite its name. I do not see a reason to break backward compatibility just to have a leading underscore in

[issue10354] tempfile.template is broken

2010-11-08 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: import tempfile tempfile.template = 'XXX' tempfile.mkdtemp() '/tmp/tmpPf5lML' Functions that use template use it as an argument default, so changing it afterwards has no effect. -- components: Library (Lib) messages: 120729

[issue10354] tempfile.template is broken

2010-11-08 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Patch in attachment. -- keywords: +patch Added file: http://bugs.python.org/file19541/tempfile.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10354

[issue10354] tempfile.template is broken

2010-11-08 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: The patch looks good to me, but it needs a test. -- nosy: +eric.smith stage: - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10354

[issue10354] tempfile.template is broken

2010-11-08 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Patch including tests is in attachment. I think I've just found two further bugs though: tempfile.TemporaryFile().name 'fdopen' tempfile.TemporaryFile(prefix='xxx').name 'fdopen' tempfile.SpooledTemporaryFile().name Traceback (most

[issue10354] tempfile.template is broken

2010-11-08 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Adding georg.brandl to nosy list as per misc/maintainers.rst. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10354

[issue10354] tempfile.template is broken

2010-11-08 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Created issue 10355 for SpooledTemporaryFile bug while TemporaryFile having no name seems to be rightful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10354

[issue10354] tempfile.template is broken

2010-11-08 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Shouldn't the global template variable just be deleted in python3? It is no longer documented except for what is probably an overlooked mention in the introduction. -- nosy: +r.david.murray

[issue10354] tempfile.template is broken

2010-11-08 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10354 ___ ___ Python-bugs-list

[issue10354] tempfile.template is broken

2010-11-08 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I sort of agree with David. The global template is a bad name and a bad design. And since it doesn't work I don't think anything would be lost by modifying the code to ignore it; document that it's unused and deprecated; and remove it in a

[issue10354] tempfile.template is broken

2010-11-08 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It has been documented as deprecated since 2.0. I'm sure the intent was for all mention of it to have been deleted from the 3.x docs already, but that first paragraph was overlooked. -- ___

[issue10354] tempfile.template is broken

2010-11-08 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: +1 for just deleting it. nothing is lost by deleting code that never worked in the first place ;-) -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org