msg191641 - (view) |
Author: Christian Heimes (christian.heimes) *  |
Date: 2013-06-22 14:41 |
The tarfile module defines a bunch of stat constants: http://hg.python.org/cpython/file/4465f273a8a4/Lib/tarfile.py#l142 These constants aren't documented but they look like public API constants. I would like to replace them with values from the stat module: TUREAD = stat.S_IRUSR |
|
|
msg191678 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2013-06-22 23:18 |
Interesting commit: changeset: 76949:492e6c6a01bb user: Giampaolo Rodola' <g.rodola@gmail.com> date: Tue May 15 15:30:25 2012 +0200 files: Doc/library/stat.rst Doc/whatsnew/3.3.rst Lib/stat.py Lib/tarfile.py Lib/test/test_stat.py Misc/NEWS description: #14807: move undocumented tarfile.filemode() to stat.filemode(). Add tarfile.filemode alias with deprecation warning. > I would like to replace them with values from the stat module I would prefer to simply drop all these constants. None is used by the tarfile module. *If* an application uses tarfile to get stat constants, this application must be fixed to use the stat module which contain thse constants since the creation of the stat module, something like 23 years ago... changeset: 20:118545312f3b branch: legacy-trunk user: Guido van Rossum <guido@python.org> date: Sun Oct 21 16:17:08 1990 +0000 files: Lib/stat.py description: Initial revision |
|
|
msg192376 - (view) |
Author: Christian Heimes (christian.heimes) *  |
Date: 2013-07-05 23:30 |
OK, your proposal is more appealing. Any last words before the constants are gone for good? |
|
|
msg197420 - (view) |
Author: Ethan Furman (ethan.furman) *  |
Date: 2013-09-10 03:28 |
Interestingly enough, the two constants that are used are prefixed with `stat`. Patch attached. Adios! |
|
|
msg197437 - (view) |
Author: Eli Bendersky (eli.bendersky) *  |
Date: 2013-09-10 13:30 |
lgtm. kill 'em |
|
|
msg199129 - (view) |
Author: Ethan Furman (ethan.furman) *  |
Date: 2013-10-07 03:36 |
Christian, do you mind if I get this patchd committed? |
|
|
msg199427 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2013-10-10 22:57 |
.stoneleaf.01.patch looks good to me, please commit it! |
|
|
msg199621 - (view) |
Author: Ethan Furman (ethan.furman) *  |
Date: 2013-10-12 20:38 |
Sounds like we have a consensus. If no objections I'll commit in four or five days (in time for the last alpha). |
|
|
msg199627 - (view) |
Author: Christian Heimes (christian.heimes) *  |
Date: 2013-10-12 21:47 |
Yes, please commit your patch. I totally wanted to reply to your mail but I was distracted by other things. Sorry! |
|
|
msg199632 - (view) |
Author: Ethan Furman (ethan.furman) *  |
Date: 2013-10-12 22:17 |
Cool, thanks! I didn't want to step on any toes. :) |
|
|
msg199648 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-10-13 01:13 |
New changeset 3d557da59c22 by Ethan Furman in branch 'default': Close #18281: superfluous stat constants removed from tarfile http://hg.python.org/cpython/rev/3d557da59c22 |
|
|