Guido van Rossum added the comment:
For anyone watching this still, the fix introduced in this issue caused a
security vulnerability, see http://bugs.python.org/issue21082 .
--
nosy: +gvanrossum
___
Python tracker rep...@bugs.python.org
Terry J. Reedy tjre...@udel.edu added the comment:
Georg Brandl patched the doc changes in r86931.
Ray, for future reference, you might take a look, particularly
-.. function:: makedirs(path[, mode][, exist_ok=False])
+.. function:: makedirs(path, mode=0o777, exist_ok=False)
In 3.x, (as
Georg Brandl ge...@python.org added the comment:
Well, you're not to blame since the patch merely extended the definition which
was still using obsolete syntax anyway.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
Ray.Allen ysj@gmail.com added the comment:
Oh, yes, I missed that, too. I didn't pay attention to that. Thanks for
pointing out it and fix it!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
Terry J. Reedy tjre...@udel.edu added the comment:
I removed trailing '\' and whitespace, refreshed against current repository,
removing conflicts, and committed. r86930
--
assignee: georg.brandl - terry.reedy
resolution: accepted - fixed
status: open - closed
Ray.Allen ysj@gmail.com added the comment:
Thanks for Terry's addition to the patch!
On my python3.2a3 on windows(also copied os.py and test_os.py to the
installation), I only get the tow os.link errors. And this is because the
python3.2a3 hasn't the os.link function, and the
Terry J. Reedy tjre...@udel.edu added the comment:
Afaik, those error have nothing to do with this issue. I just included them for
completeness in case they were helpful to GB.
--
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
Patch still applies without errors. Georg, since you reviewed the patch and
approved it for 3.2, I’m marking as pending and assigning to you. Tell me if I
shouldn’t have.
--
assignee: - georg.brandl
status: open - pending
Terry J. Reedy tjre...@udel.edu added the comment:
Patch is missing version-added directive and News entry. I will try to add
these and re-upload for final check.
--
status: pending - open
___
Python tracker rep...@bugs.python.org
Terry J. Reedy tjre...@udel.edu added the comment:
I applied mkdir.diff, 08-07, patch to my current working copy, added
version-added and News entry (with credit to Ray Allen) and added Ray Allen to
ACKS. Uploaded as mkdirs.tr.diff
I suspect a complete test should include a linux system, but
Éric Araujo mer...@netwok.org added the comment:
All tests pass on my Debian.
(I suggest removing the unnecessary backslash before committing.)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
Terry J. Reedy tjre...@udel.edu added the comment:
\ at end of os.py addition
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
___
___
Ray.Allen ysj@gmail.com added the comment:
Since the patch cannot be applied to py3k cleanly, I update it.
--
Added file: http://bugs.python.org/file18422/mkdir.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
Ray.Allen ysj@gmail.com added the comment:
Doc review: Small typo, Flase vs False. Also, exceptions are raised rather
than thrown in Python land (same for the docstring). Both exception
references should be :exc:`OSError`.
Here fixed these doc problems. Thanks for reviewing! Besides,
Georg Brandl ge...@python.org added the comment:
Thanks for bringing that up, I've now fixed all these instances of throw that
should be raise.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
Georg Brandl ge...@python.org added the comment:
Doc review: Small typo, Flase vs False. Also, exceptions are raised rather
than thrown in Python land (same for the docstring). Both exception
references should be :exc:`OSError`.
Otherwise, looks fine to me.
Raising priority; this should go
Ray.Allen ysj@gmail.com added the comment:
I updated the patch. Now the patch:
suppress the OSError if and only if the target directory with the same mode as
we specified already exists.
--
___
Python tracker rep...@bugs.python.org
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:
You haven't attached the new patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
___
Ray.Allen ysj@gmail.com added the comment:
Oh, sorry, here is the patch.
--
Added file: http://bugs.python.org/file18229/mkdir.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
___
Terry J. Reedy tjre...@udel.edu added the comment:
If I understand, this makes the change minimal: exist_ok means that if *name*
already exists as a directory with the specified permissions, then do not raise
an error. OK with me. Make sure doc and doc string say something like that.
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
if *name* already exists as a directory with the specified
permissions, then do not raise an error.
AFAICT, the code in the patch does not check permissions of the existing
path(s) or even whether it is a directory or
Terry J. Reedy tjre...@udel.edu added the comment:
Yes, Arfrever brought that up and the question now is whether and how to revise
it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:
'mkdir -p' prints error when target exists and is non-directory:
$ cd /tmp
$ touch file
$ mkdir -p file
mkdir: cannot create directory `file': File exists
--
___
Python
Ray.Allen ysj@gmail.com added the comment:
Oh, I'm sorry, I forgot about that case.
I agree with Arfrever, we should suppress the OSError only if the target file
exists as a directory, but not other types. That is, the exist_ok argument in
makedirs() should mean dir existing is ok, only
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:
Alternatively you could call os.chmod.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
___
Ray.Allen ysj@gmail.com added the comment:
I feel we do too much things in such a function if we change the mod the target
directory to the mod we specified. Does anybody feel such behavior maybe
dangerous? Because if the function success, we know nothing about weather we
create a new
Terry J. Reedy tjre...@udel.edu added the comment:
What does mkdir -p do, which would at least be a starting point?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
___
Ray.Allen ysj@gmail.com added the comment:
I want to explain mkdir -p as this:
We want to create a specified directory, if such a directory doesn't exist,
then create it. If such a directory already exists, then we have already
reached our goal, do nothing.
While we port this function to
Changes by Guido van Rossum gu...@python.org:
--
nosy: -gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9299
___
___
Python-bugs-list
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
title: os.mkdir() and os.makedirs() add a keyword argument to suppress File
exists exception. - os.makedirs(): Add a keyword argument to suppress File
exists exception
___
Terry J. Reedy tjre...@udel.edu added the comment:
Ray, what does mkdir -p do if the last target name exists but is a regular file
rather than a directory? A slightly separate question is 'What do we want
mkdirs to do (in this case)?'
--
stage: patch review - commit review
31 matches
Mail list logo