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 <1337018401.63.0.516647361801.issue14807@psf.upfronthosting.co.za>
In-reply-to
Content
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 test_stat.py 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.
History
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: <1337018401.63.0.516647361801.issue14807@psf.upfronthosting.co.za>
2012-05-14 18:00:01terry.reedylinkissue14807 messages
2012-05-14 18:00:00terry.reedycreate