Issue 18281: tarfile defines stat constants (original) (raw)

Issue18281

Created on 2013-06-22 14:41 by christian.heimes, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue18281.stoneleaf.01.patch ethan.furman,2013-09-10 03:29 review
Messages (11)
msg191641 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) 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) * (Python committer) 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) * (Python committer) 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) * (Python committer) 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) * (Python committer) Date: 2013-09-10 13:30
lgtm. kill 'em
msg199129 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2013-10-07 03:36
Christian, do you mind if I get this patchd committed?
msg199427 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-10 22:57
.stoneleaf.01.patch looks good to me, please commit it!
msg199621 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) 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) * (Python committer) 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) * (Python committer) Date: 2013-10-12 22:17
Cool, thanks! I didn't want to step on any toes. :)
msg199648 - (view) Author: Roundup Robot (python-dev) (Python triager) 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
History
Date User Action Args
2022-04-11 14:57:47 admin set github: 62481
2013-10-13 01:13:07 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: patch review -> resolved
2013-10-12 22:17:33 ethan.furman set messages: +
2013-10-12 21:47:43 christian.heimes set messages: +
2013-10-12 20:38:08 ethan.furman set messages: +
2013-10-10 22:57:33 vstinner set messages: +
2013-10-07 03:36:27 ethan.furman set messages: +
2013-09-10 13:30:43 eli.bendersky set nosy: + eli.benderskymessages: +
2013-09-10 03:29:01 ethan.furman set files: + issue18281.stoneleaf.01.patchkeywords: + patchstage: needs patch -> patch review
2013-09-10 03:28:30 ethan.furman set messages: +
2013-07-05 23:30:25 christian.heimes set assignee: christian.heimesmessages: +
2013-06-22 23🔞08 vstinner set nosy: + vstinnermessages: +
2013-06-22 16:48:03 ethan.furman set nosy: + ethan.furman
2013-06-22 14:41:18 christian.heimes create