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

2012-06-24 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- assignee: - larry stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15118 ___

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

2012-06-24 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15118 ___ ___ Python-bugs-list mailing list

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

2012-06-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 460407f35aa9 by Larry Hastings in branch 'default': Issue #15118: Change return value of os.uname() and os.times() from http://hg.python.org/cpython/rev/460407f35aa9 -- nosy: +python-dev

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

2012-06-24 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Yummy! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15118

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

2012-06-23 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: (OT, but since you brought it up: In my opinion, deprecating the iterability of any builtin class is a horrible idea. It is a Python feature, especially in 3.x, that all *are* iterable. However, I would agree that named tuples should be

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

2012-06-23 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: OT, but since you brought it up: In my opinion, deprecating the iterability of any builtin class is a horrible idea. It is a Python feature, especially in 3.x, that all *are* iterable. As you say, OT. But I don't see how it's a feature.

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

2012-06-23 Thread Larry Hastings
Larry Hastings la...@hastings.org 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. *

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

2012-06-23 Thread Larry Hastings
Larry Hastings la...@hastings.org 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

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

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

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

2012-06-21 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Patch implementing struct sequences for os.uname() and os.times(). Those two are a slam dunk, so let's try and get 'em into 3.3. Patch includes docs! Maybe it's ready! Who knows! -- keywords: +patch Added file:

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

2012-06-20 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: os._getdiskusage is an internal helper for shutil.getdiskusage on Windows, which does return a named tuple. The private C function can continue returning a tuple IMO. +1 on changing uname for 3.3! No opinion on times; I don’t use it and don’t

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

2012-06-20 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Agree for changing times() and uname(). But functions that return a 2- or 3-element tuple, which immediately will be unpacked, no need to change. Keep it simple. -- nosy: +storchaka ___ Python