[issue15154] remove "rmdir" argument from os.unlink, add "dir_fd" to os.rmdir

2012-06-23 Thread Larry Hastings
Changes by Larry Hastings : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15118] uname and other os functions should return a struct sequence instead of a tuple

2012-06-23 Thread Larry Hastings
Larry Hastings added the comment: Okay, this patch is definitely ready. Changes from the last patch: * The two return types are now exposed in the os module (os.uname_result and os.times_result) and are permanently on even if os.uname() or os.times() are not available. * I updated the

[issue15159] Add failover for follow_symlinks and effective_ids where possible

2012-06-23 Thread Larry Hastings
New submission from Larry Hastings : Serhiy Storchaka suggested (in private email, not on tracker or python-dev): why not make follow_symlinks and effective_ids failover where possible? Let's take the example of effective_ids first, that's simpler. Let's say the user calls

[issue15118] uname and other os functions should return a struct sequence instead of a tuple

2012-06-23 Thread Larry Hastings
Larry Hastings added the comment: Attached is patch #3. Ned Deily advised me not to touch distutils, and packaging is in the process of being removed. So I backed out of my changes to those two packages. Apart from that the patch is the same as #2. Georg: mind if this goes in before

[issue15118] uname and other os functions should return a struct sequence instead of a tuple

2012-06-23 Thread Larry Hastings
Larry Hastings added the comment: Whoops, here's the patch. -- Added file: http://bugs.python.org/file26123/larry.uname.and.times.structseq.3.diff ___ Python tracker <http://bugs.python.org/is

[issue14917] Make os.symlink on Win32 detect if target is directory

2012-06-23 Thread Larry Hastings
Larry Hastings added the comment: Patch attached. Implementation now uses GetFileAttributes (A or W) to determine whether or not src is a directory. Fixed docstring, docs, and updated Misc/NEWS. -- assignee: -> larry keywords: +patch nosy: +mhammond stage: needs patch ->

[issue14917] Make os.symlink on Win32 detect if target is directory

2012-06-23 Thread Larry Hastings
Larry Hastings added the comment: Note: I can't test this, as I only run Windows XP. But it compiles cleanly on Windows, and on Linux it compiles and passes the test suite fine. -- ___ Python tracker <http://bugs.python.org/is

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-23 Thread Larry Hastings
Larry Hastings added the comment: I got bored so I made you a patch. -- keywords: +patch Added file: http://bugs.python.org/file26125/larry.random_seed.ssize_t.1.diff ___ Python tracker <http://bugs.python.org/issue14

[issue15118] uname and other os functions should return a struct sequence instead of a tuple

2012-06-23 Thread Larry Hastings
Changes by Larry Hastings : -- assignee: -> larry stage: -> patch review type: -> behavior ___ Python tracker <http://bugs.python.org/issue15118> ___

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-23 Thread Larry Hastings
Larry Hastings added the comment: Bikeshedding: (os.unlink in os.supports_dir_fd and os.open in os.supports_dir_fd) could be rewritten as { os.open, os.unlink } <= os.supports_dir_fd As you were! -- ___ Python tracker <http://bugs.pyth

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-23 Thread Larry Hastings
Larry Hastings added the comment: > I guess it’s too late to propose “os.open.supports_dir_fd and > os.unlink.supports_dir_fd” (and I don’t know if that is feasible > with C functions) :) Where were you when "is_implemented" was being savagely t

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-24 Thread Larry Hastings
Changes by Larry Hastings : -- resolution: -> fixed stage: -> commit review status: open -> closed type: -> enhancement ___ Python tracker <http://bugs.python

[issue15159] Add failover for follow_symlinks and effective_ids where possible

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: I think you're right. As Antoine pointed out in irc, for POSIX platforms, modules in os are almost exclusively atomic. This is a useful (if undocumented) feature from a security viewpoint, and we should not break it lightly. Closing as wontfix

[issue15118] uname and other os functions should return a struct sequence instead of a tuple

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Yummy! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14917] Make os.symlink on Win32 detect if target is directory

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Martin: does this sound good or bad? -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue14917> ___ ___ Python-bug

[issue14917] Make os.symlink on Win32 detect if target is directory

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Well then! Let's close this before the adults notice. -- resolution: -> wont fix stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue15164] add platform.uname() namedtuple interface?

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Patch isn't ready, no doc changes. But code review can happen. -- keywords: +patch Added file: http://bugs.python.org/file26136/larry.platform.unamedtuple.1.diff ___ Python tracker <http://bugs.py

[issue15164] add platform.uname() namedtuple interface?

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Docs fixed, new unit tests for namedtuple interface added. -- Added file: http://bugs.python.org/file26137/larry.platform.unamedtuple.2.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15164] add platform.uname() namedtuple interface?

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Third diff, incorporating all of Georg's suggestions. -- Added file: http://bugs.python.org/file26138/larry.platform.unamedtuple.3.diff ___ Python tracker <http://bugs.python.org/is

[issue15164] add platform.uname() namedtuple interface?

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Done! And just in time for... something! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement ___ Python tracker <http://bugs.python

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: > The fix for this issue broke support for bytes in shutil.rmtree: What platform? Windows, or non-Windows? It'll probably be obvious regardless, but that might help. -- ___ Python tracke

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Your deduction is correct. listdir can't tell what the original argument type was based on the output--path_converter abstracts away those details. So it separately tests the type of the first argument. Staring at it again it's about as clear a

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-24 Thread Larry Hastings
New submission from Larry Hastings : When you pass in a file descriptor as the first argument to listdir, its output is a list of strings, not a list of bytes. This should be mentioned in the documentation. It's also worth making a pass over the other functions accepting an fd.

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-24 Thread Larry Hastings
New submission from Larry Hastings : Consider: should os.fwalk() support dir_fd? I think so. In fact, in retrospect it seems like a bug that os.fwalk *doesn't* already support this. Georg: is this a feature or a bugfix? (Wish I'd thought of this Saturday!) I actually di

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Maybe the correct fix for this is to change the interface? os.listdir(path, *, dir_fd=None) Then we'll pick up the return type (str/bytes) from the path variable. It would make #15177 even easier too, should we go down that

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Nick, how do you feel specifically about listdir(path, *, dir_fd)? I'm mentally exhausted from the past couple of days and have temporarily lost the ability to infer. -- ___ Python tracker

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-24 Thread Larry Hastings
Larry Hastings added the comment: Nevermind, I'm an idiot. fdopendir doesn't support dir_fd as a separate path, so listdir can't support it either. There's an unwritten property of the os module on a POSIX system: all the functions are essentially-atomic. This is usef

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: My first cut at a patch. Made the logic in posix_listdir easy to follow, fixed up the docstring and docs. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file26139/larry.listdir.clarification.1.d

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Whoops, wrong issue, ignore that. (Meant for #15176, going there now.) -- ___ Python tracker <http://bugs.python.org/issue15

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Changes by Larry Hastings : -- stage: patch review -> needs patch ___ Python tracker <http://bugs.python.org/issue15177> ___ ___ Python-bugs-list mai

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: My first cut at a patch. Made the logic in posix_listdir easy to follow, fixed up the docstring and docs. Posted in the correct issue this time. (And Nick: I thought of that independently :D ) -- keywords: +patch Added file: http://bugs.python.org

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: What I did: * Added dir_fd=None as a keyword only parameter. * Gave top a default of ".". * Passed through dir_fd in two spots--that was all it took! * Made fwalk contingent on os.stat and os.open both being in support_dir_fd, and os.listdi

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Second revision of patch. * Removed os.fwalk from os.supports_dir_fd. As Georg points out, you can't test it. (Well, you can, but only if the test would have succeeded.) * Changed fstat(fd) calls to stat(fd) calls. -- Added file:

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Here's a variant of the patch adding os.walk(dir_fd=) support. I'm not pushing for this. I'm not sure it's a must-have; it seems like a nice-to-have, but we're past the time for nice-to-haves. -- Added file: http://

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Removed "do we have os.listdir" checks from the unit tests. Yes, Virginia, we always have os.listdir in Python 3.3. -- Added file: http://bugs.python.org/file26145/larry.listdir.clarification.2.diff

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Regenerated fwalk(dir_fd=) patch to make Rietveld happy. -- Added file: http://bugs.python.org/file26147/larry.fwalk.dir_fd.3.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Regenerated walk(dir_fd=) patch to make Rietveld happy. -- Added file: http://bugs.python.org/file26148/larry.fwalk.and.walk.dir_fd.2.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Regenerated patch to make Reitveld happy. -- Added file: http://bugs.python.org/file26149/larry.listdir.clarification.3.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: GRAHH HULK SMASH Regenerating again, because I wasn't actually fresh enough last time. -- Added file: http://bugs.python.org/file26150/larry.listdir.clarification.4.diff ___ Python tracker <http://bugs.py

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Fourth time's the charm. -- Added file: http://bugs.python.org/file26151/larry.fwalk.dir_fd.4.diff ___ Python tracker <http://bugs.python.org/is

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: What's better than regenerating a bunch of diffs on the off chance that it'll make Rietveld happy? Nothing, that's what. -- Added file: http://bugs.python.org/file26152/larry.fwalk.and.wal

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Changes by Larry Hastings : Removed file: http://bugs.python.org/file26143/larry.fwalk.dir_fd.2.diff ___ Python tracker <http://bugs.python.org/issue15177> ___ ___ Pytho

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Changes by Larry Hastings : Removed file: http://bugs.python.org/file26144/larry.fwalk.and.walk.dir_fd.1.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Changes by Larry Hastings : Removed file: http://bugs.python.org/file26147/larry.fwalk.dir_fd.3.diff ___ Python tracker <http://bugs.python.org/issue15177> ___ ___ Pytho

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-25 Thread Larry Hastings
Changes by Larry Hastings : Removed file: http://bugs.python.org/file26145/larry.listdir.clarification.2.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Changes by Larry Hastings : Removed file: http://bugs.python.org/file26148/larry.fwalk.and.walk.dir_fd.2.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-25 Thread Larry Hastings
Changes by Larry Hastings : Removed file: http://bugs.python.org/file26149/larry.listdir.clarification.3.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15177] Support os.walk(dir_fd=) and os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Sure, for 3.3 anyway. I think walk(dir_fd=) should be okay for 3.4. There's a better implementation anyway, where walk() just calls fwalk() and strips the last element off the yielded stuff. But movi

[issue15177] Support os.fwalk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: While I was at it, I changed the subject to accurately reflect the changeset's final disposition. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed title: Support os.walk(dir_fd=) and os.fwalk(dir_f

[issue15176] Clarify the behavior of listdir(fd) in both code and documentation

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Good news, everyone! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15186] Support os.walk(dir_fd=)

2012-06-25 Thread Larry Hastings
New submission from Larry Hastings : Adds dir_fd support to os.walk(). Just re-yields from os.fwalk(), removing the last element. Note: Python 3.4. -- assignee: larry files: larry.os.walk.dir_fd.1.diff keywords: patch messages: 164023 nosy: larry priority: normal severity: normal

[issue15187] test_shutil does not clean up after itself

2012-06-25 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +larry ___ Python tracker <http://bugs.python.org/issue15187> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15187] test_shutil does not clean up after itself

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Patch attached. On my machine it used to leave six directories, now it leaves none. -- keywords: +patch Added file: http://bugs.python.org/file26161/larry.fix.shutil.test.tmp.dirs.1.diff ___ Python tracker <h

[issue15187] test_shutil does not clean up after itself

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Georg, you want this fixed for beta 1? -- nosy: +georg.brandl ___ Python tracker <http://bugs.python.org/issue15187> ___ ___

[issue15186] Support os.walk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Actually I think Raymond makes a good point. Re: symmetry: tbh that's nonsense. The reason for symmetry among functions in the os module is because they do similar things--but this is because "form follows function". We didn't decide t

[issue15186] Support os.walk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: p.s. Raymond: fwiw, I think "makes it easy / hard for beginners" is only of secondary importance. Certainly I think it's reasonable to point out in a discussion, and if the beginners are easy to accommodate then okay. But if there was somet

[issue15186] Support os.walk(dir_fd=)

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: Whoops, you wrote "for most users" rather than talking about beginners. Sorry if I was responding to a point you weren't making ;-) I guess I assumed you were coming at this at least partially while wearing your "

[issue15187] test_shutil does not clean up after itself

2012-06-25 Thread Larry Hastings
Changes by Larry Hastings : -- assignee: -> larry priority: normal -> release blocker resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyt

[issue15187] test_shutil does not clean up after itself

2012-06-25 Thread Larry Hastings
Larry Hastings added the comment: This was fixed in 1fa50bbcc21f1458c1dc00ea733b76e6405b8cbb . (I think the tracker had an aneurysm when the notification showed up.) -- ___ Python tracker <http://bugs.python.org/issue15

[issue15187] test_shutil does not clean up after itself

2012-06-26 Thread Larry Hastings
Larry Hastings added the comment: (No wonder it had an aneurysm!) -- ___ Python tracker <http://bugs.python.org/issue15187> ___ ___ Python-bugs-list mailin

[issue12971] os.isdir() should contain skiplinks=False in arguments

2012-06-26 Thread Larry Hastings
Larry Hastings added the comment: If this happens, in keeping with the new os module aesthetic, I suggest the prototype should be os.isdir(path, *, follow_symlinks=True) -- nosy: +larry ___ Python tracker <http://bugs.python.org/issue12

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-06-27 Thread Larry Hastings
Larry Hastings added the comment: I assert that "followlinks" and "symlinks" are both bad names. I dislike "followlinks" because "links" is ambiguous; both hard links and soft links are "links", but it's only modifying behavior regardi

[issue15200] Faster os.walk

2012-06-27 Thread Larry Hastings
Larry Hastings added the comment: It's amusing that using fwalk and throwing away the last argument is faster than a handwritten implementation. On the other hand, fwalk also uses a lot of file descriptors. Users with processes which were already borderline on max file descriptors

[issue15203] Accepting of os functions of (path, dir_fd) pair as argument

2012-06-27 Thread Larry Hastings
Larry Hastings added the comment: I dislike this and always have. I think it would look ugly and be obnoxious to use. If you really think you can get this in for 3.3, you will have to bring it up with Georg. I think your chances are about zero

[issue12971] os.isdir() should contain skiplinks=False in arguments

2012-06-27 Thread Larry Hastings
Larry Hastings added the comment: First: there's no chance this will go into 3.1, 3.2, or 3.3 at this point. Second: I can assure you that switching to the l... version of a function and not following the last symlink is exactly what "follow_symlinks" is for. Ple

[issue15200] Faster os.walk

2012-06-27 Thread Larry Hastings
Larry Hastings added the comment: > It doesn't have to. > Right now, it uses O(depth of the directory tree) FDs. > It can be changed to only require O(1) FDs But closing and reopening those file descriptors seems like it might slow it down; would it still be a performance win?

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-06-27 Thread Larry Hastings
Larry Hastings added the comment: > I don't see how this is contrary to PEP 8. PEP 8 says nothing about > the names of function arguments. Certainly it says *something*: http://www.python.org/dev/peps/pep-0008/#function-and-method-arguments But I grant you, it only specificall

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-06-27 Thread Larry Hastings
Larry Hastings added the comment: > > after all, they *are* instance variables. > Technically, they are local variables. Yeah, tbh I was thinking "instance of an invocation" here. But PEP 8 probably means "instance of a class" here. Still, there are three class

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: I'm not a security guy, but: shouldn't the os.unlink call when it isn't a directory specify follow_symlinks=False? And wouldn't it be safer if the os.rmdir() call also used dir_fd=? Additionally, I think you missed some stuff for shut

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: I'm pretty busy right now, please open a ticket for listdir. _rmtree_safe_fd could remove the directory just after the recursive step using the parent's dirfd. Of course you'd also have to add a rmdir for the very-tippy-top after the o

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: I want to mark this as wontfix. >>> os.listdir in os.supports_fd True The concept we're struggling with here: is the "fd" you pass in to os.listdir a "dir_fd"? I claim that it isn't. I'm trying to enforce the

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: Like I said: use os.supports_fd. -- ___ Python tracker <http://bugs.python.org/issue15217> ___ ___ Python-bugs-list mailin

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: I'm closing this. os.listdir should not be listed in supports_dir_fd, because it has no dir_fd parameter. For reference, we discussed all this previously in issue #15176. -- resolution: -> invalid stage: needs patch -> committed/reje

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-28 Thread Larry Hastings
Larry Hastings added the comment: Storchaka: please take it up with Antoine, he's the defender of the realm for POSIX-functions-are-atomic iirc. I'd be happy with dir_fd for os.listdir, though it may be too late for 3.3 anyway. -- nos

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-29 Thread Larry Hastings
Larry Hastings added the comment: WFM. That is, unless people want to bring up additional only-tangentially-related topics to annoy Hynek ;-) How about those ? They're really having a year of it, aren't they! -- ___ Python trac

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-01 Thread Larry Hastings
Larry Hastings added the comment: storchaka: I can (finally!) spend some time reviewing patches today. Which ones do I look at? I'm guessing just the last two, "followlinks-to-follow_symlinks-2.patch" and "symlinks-to-follow_symlinks-2.patch". But I wanted to c

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-01 Thread Larry Hastings
Larry Hastings added the comment: Bad news: Fearless Leader (Georg) just told me on #python-dev that he's had a change of heart and doesn't want this in 3.3. I've marked the bug 3.4, and there's no rush on doing this work--we can't check it in until the 3.4 branc

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-01 Thread Larry Hastings
Larry Hastings added the comment: Georg just clarified: we can just change the parameter names for new APIs. It's the deprecation / new parameter stuff we can't do for 3.3. So cut a (much) simpler patch and let's get it in right quick. -- versions: +Python

[issue15237] Add capsule API to _decimal

2012-07-01 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +larry ___ Python tracker <http://bugs.python.org/issue15237> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-01 Thread Larry Hastings
Larry Hastings added the comment: +1 to guaranteeing the order. -- nosy: +larry ___ Python tracker <http://bugs.python.org/issue15233> ___ ___ Python-bugs-list m

[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-01 Thread Larry Hastings
New submission from Larry Hastings : 3.3 adds the *xattr() extended attribute functions on Linux. shutil implements a new internal function(_copyxattr) which copies these extended attributes. However, it's only used in shutil.copy2(). I assert that shutil.copystat() should also pre

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-01 Thread Larry Hastings
Larry Hastings added the comment: Serihy: for the "followlinks" patch, how about we plan ahead: I give you feedback for just the code (if there is any), and then I take over the patch and do the doc rewrite that I will find ir

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Larry Hastings
Larry Hastings added the comment: Storchaka: change of plan. Since doc changes are much lower risk than code changes, how about we go with your existing patch and I'll fix up the docs separately. So, please make the relevant code changes I proposed on Rietveld (adding "*,"

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Larry Hastings
Larry Hastings added the comment: Here's a patch. I read the implementation to find out what it does, then documented it. Happily it does the sane thing. -- keywords: +patch Added file: http://bugs.python.org/file26230/larry.atexit.1

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-02 Thread Larry Hastings
Larry Hastings added the comment: > What's the urge to make parameters keyword-only? I suggest that boolean parameters are best made keyword-only. Otherwise you have mystery meat like shutil.copyfile("src", "dst", True) Also, all the extant uses of "follow

[issue4011] Create DAG for PEP 101

2012-07-02 Thread Larry Hastings
Larry Hastings added the comment: Note: I don't have Macs, so I can't run OmniGiraffe. And a quick gander at the Graphviz website suggests its output lacks the sublime elegance Python documentation has become known for. -- ___ Pyth

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Larry Hastings
Larry Hastings added the comment: > Is it tested for? Amusingly enough, yes. test_order() in Lib/test/test_atexit.py already ensures reverse order. -- ___ Python tracker <http://bugs.python.org/issu

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-02 Thread Larry Hastings
Larry Hastings added the comment: > I would avoid the "note" markup. It is visually distracting > and there isn't a reason to pull this out of the main text. I think it's an improvement; it helps draw the eye to an important warning. Does anyone else have an

[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-03 Thread Larry Hastings
Larry Hastings added the comment: First patch. -- keywords: +patch Added file: http://bugs.python.org/file26238/larry.copystat.xattrs.1.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15252] Delivery reports about your e-mail

2012-07-05 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: -larry ___ Python tracker <http://bugs.python.org/issue15252> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15252] Delivery reports about your e-mail

2012-07-05 Thread Larry Hastings
Larry Hastings added the comment: What fresh hell is this? Bob, do you have a virus or something? -- nosy: +larry ___ Python tracker <http://bugs.python.org/issue15

[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-05 Thread Larry Hastings
Larry Hastings added the comment: Sorry for the pedantry, but: I read the title of this bug as wanting these two values to be the exact same pointer. If you're talking about putting a constant string in a header file, you'll get an (identical) copy of that string in every .o that

[issue15263] Guard against invalid file handles in os functions

2012-07-06 Thread Larry Hastings
New submission from Larry Hastings : #15261 shows us that Windows can crash if you pass in an invalid file handle to Windows POSIX-y functions. We should ensure that functions which accept path-as-an-int-fd guard against this where necessary. I propose a macro, something like #ifdef

[issue15261] os.stat(fd) crashes on Windows if fd does not exist

2012-07-06 Thread Larry Hastings
Larry Hastings added the comment: The 62b9bfbc3356 changeset does more than add the guard against invalid file handles; it also adds documentation to os.path.exists documenting that it now accepts path-as-int-fd. While this modification is fine in principle I would have preferred it was

[issue15263] Guard against invalid file handles in os functions

2012-07-06 Thread Larry Hastings
Larry Hastings added the comment: Antoine: all the functions enumerated in os.supports_fd. Note that the set of such functions may in fact just be os.stat which is already fixed. Amaury: If you read the checkin that fixes this problem ( 62b9bfbc3356 ) it actually deliberately passes in

[issue14241] io.UnsupportedOperation.__new__(io.UnsupportedOperation) fails

2012-07-07 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +larry ___ Python tracker <http://bugs.python.org/issue14241> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15273] Remove unnecessarily random behavior from test_unparse.py

2012-07-07 Thread Larry Hastings
New submission from Larry Hastings : Tools/parser/test_unparse.py is the regression test suite for Tools/unparse. To save time, if the "cpu" resource is not enabled it only test unparsing ten files. However it picks these files at random. It would be nice if the test was 100%

[issue13405] Add DTrace probes

2012-07-07 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: -larry ___ Python tracker <http://bugs.python.org/issue13405> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15228] os.utime() docs not clear on behavior on nonexistant files

2012-07-07 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +larry ___ Python tracker <http://bugs.python.org/issue15228> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-12 Thread Larry Hastings
Larry Hastings added the comment: Georg: done. Hynek: You must forgive me, I'm a recovering Windows programmer. I thought extended attributes were a Linux-only thing. Can you tell me what other platforms they are available on? And/or suggest some alternate lan

<    3   4   5   6   7   8   9   10   11   12   >