Roundup Robot added the comment:
New changeset 51d00482d403 by Robert Collins in branch '3.5':
Issue #23725: Overhaul tempfile docs.
https://hg.python.org/cpython/rev/51d00482d403
New changeset 256d2f01e975 by Robert Collins in branch 'default':
Issue #23725: Overhaul tempfile docs.
Robert Collins added the comment:
Sorry, I didn't realise that Zbigniew was an alternative spelling of your first
name.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
___
Robert Collins added the comment:
Thanks for the patch. I've committed the current status as an unambiguous
improvement; we can add tempdir as deprecated later if there is consensus on
that, the current patch did improve its docs per R. David Murray's request
anyhow.
--
resolution:
Robert Collins added the comment:
I can't find any reference to a discussion to deprecate tempdir outside of this
issue. Nothing on python-dev/python-ideas/peps.
I can see that there's an argument that it should be deprecated, but AFAICT the
idea to do so originated here. I'd like to see
R. David Murray added the comment:
Well, something is wrong, because if we are deprecating :data:`tmpdir` we
shouldn't be cross referencing it from the non-deprecated docs. The
explanation of how the default value is calculated should be moved up to
gettmpdir.
My understanding is that now
Robert Collins added the comment:
mktemp is clearly insecure. I'd just move the tmpdir up above the Deprecation
section start
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
___
R. David Murray added the comment:
Heh. This was really bugging me. I remembered it clearly, but I couldn't find
an issue. Thought maybe it was a comment in the code, but nope. Google led me
to this line in the docs: It is no longer necessary to use the global tempdir
variable. Checking
Zbyszek Jędrzejewski-Szmek added the comment:
Updated version (based on issue-23725.patch from rbcollins):
- move tempdir description at the end of the main section, before Examples
- do not add my name second time in ACKS
--
Added file:
Zbyszek Jędrzejewski-Szmek added the comment:
I don't think tempdir should be removed. I just think it should not be used. So
what about moving the description of tempdir to the end, as it was in the last
patch, but calling the section Other functions and variables.
--
Changes by Robert Collins robe...@robertcollins.net:
--
versions: +Python 3.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
___
___
Robert Collins added the comment:
I'm not 100% sure that tempfile.tempdir should be deprecated. Its much less
convenient to control global behaviour with that. I agree that mktemp should be.
I've updated the patch though.
--
nosy: +rbcollins
Added file:
Changes by R. David Murray rdmur...@bitdance.com:
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
___
Changes by Zbyszek Jędrzejewski-Szmek zbys...@in.waw.pl:
Added file: http://bugs.python.org/file39104/tempfile_docs.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
___
Zbyszek Jędrzejewski-Szmek added the comment:
Replying to review here... I get 500 server error in the patch review reply
dialogue :(
On 2015/04/15 02:40:14, r.david.murray wrote:
http://bugs.python.org/review/23725/diff/14592/Doc/library/tempfile.rst
File Doc/library/tempfile.rst (left):
R. David Murray added the comment:
Made one minor suggestion in review comments (related to that deleted line).
Otherwise this looks good to me, thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
R. David Murray added the comment:
Oh, because of the O_TMPDIR bits, this patch is only applicable to 3.5, so I'm
removing 3.4 from versions. I don't think it is worth it to make a version
that would apply to 3.4, since it is not the case that the 3.4 docs are *wrong*.
--
versions:
Zbyszek Jędrzejewski-Szmek added the comment:
v6:
- add newline
--
Added file: http://bugs.python.org/file39112/tempfile_docs.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
___
R. David Murray added the comment:
Thanks for reformatting the patch. I made some review comments.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
___
Zbyszek Jędrzejewski-Szmek added the comment:
Ping?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
___
___
Python-bugs-list mailing list
R. David Murray added the comment:
I'm re-uploading the patch as an hg diff so that it gets a review link.
--
Added file: http://bugs.python.org/file39026/tempfile_docs.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
Martin Panter added the comment:
[Padding]
Please start sentences with capital letters, specifically “mkstemp() and
mkdtemp() are lower-level functions . . .”.
The new sentence at the top about context managers seems out-of-place. Perhaps
something like “They can also be used as context
Zbyszek Jędrzejewski-Szmek added the comment:
v2:
- remove reflows
- update TemporaryDirectory description too
- do not call things which are not functions functions
- with O_TMPFILE the file is not unlinked, also update TemporaryFile
description for that
- link to Examples
--
Added
R. David Murray added the comment:
If the first word is a function name that does not start with a capital, the
sentence can't start with a capital. Sometimes it is worthwhile to reword the
sentence so you can start it with a capitalizable word, but sometimes it isn't.
(I haven't reviewed
Zbyszek Jędrzejewski-Szmek added the comment:
Please start sentences with capital letters, specifically “mkstemp() and
mkdtemp() are lower-level functions . . .”.
This would make the sentence more convoluted... I think that with markup it is
pretty clear that this is a function name and the
Martin Panter added the comment:
The current proposed text would be rendered something like this:
'''
TemporaryFile, NamedTemporaryFile, TemporaryDirectory, SpooledTemporaryFile are
high-level interfaces which provide automatic cleanup and can be used as
context managers. mkstemp() and
Zbyszek Jędrzejewski-Szmek added the comment:
Actually they are not classes, so the proposed wording cannot be used. But
indeed it sounds better with the and.
v4:
- one more and
--
Added file:
Berker Peksag added the comment:
Thanks for the patch, Zbyszek. For future reference, please send patches from
the Mercurial repository. It will make the patch review process easier. See
also devguide.
+:func:`TemporaryDirectory`, :func:`SpooledTemporaryFile`, which can be
Both
R. David Murray added the comment:
It would also be helpful to have a patch with minimum changes (that is, do not
reflow the lines).
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23725
28 matches
Mail list logo