This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients giampaolo.rodola, lars.gustaebel, pitrou, terry.reedy
Date 2012-05-14.18:00:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
1. After careful check, I am convince that converted _filemode_table (now private) is correct. Ditto for copied filemode function with adjusted docstring.

2. New is nice. I believe there is a new style of actually running the tests that somehow collects the list of TestCase subclasses without having to hand edit the run_unittest() call when new ones are added. I think it was briefly discussed on pydev list, but remenber nothing else. 

I mention this because I wonder if you think stat should have more tests (and TestCase classes). If so, a new issue could be opened after this is applied and mentioned on mentor list as an entry level issue for newer contributors.

3. I think the back compatibility alias should be wrapped with a deprecation warning. I believe the standard method would be something like the following

import warnings
def filemode(mode):
    "Deprecated in this location; use stat.filemode."
    warnings.warn("The undocumented tarfile.filemode function\n"
                  "has been moved to stat and documented there.",
                   DeprecationWarning, 2)
    return stat.filemode(mode)

Removal could be scheduled for 3.5 if not 3.4. There apparently is a way (unknown to me) to add a test that will fail in the future as a reminder.

4. Misc/NEWS entry suggestion:

- Issue 14807: Move undocumented tarfile.filemode() to stat.filemode() and add doc entry. Add tarfile.filemode alias with deprecation warning. Schedule alias for removal in 3.5.

5. stat module doc entry.
Date User Action Args
2012-05-14 18:00:01terry.reedysetrecipients: + terry.reedy, lars.gustaebel, pitrou, giampaolo.rodola
2012-05-14 18:00:01terry.reedysetmessageid: <>
2012-05-14 18:00:01terry.reedylinkissue14807 messages
2012-05-14 18:00:00terry.reedycreate