Message160650
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. |
|
Date |
User |
Action |
Args |
2012-05-14 18:00:01 | terry.reedy | set | recipients:
+ terry.reedy, lars.gustaebel, pitrou, giampaolo.rodola |
2012-05-14 18:00:01 | terry.reedy | set | messageid: <1337018401.63.0.516647361801.issue14807@psf.upfronthosting.co.za> |
2012-05-14 18:00:01 | terry.reedy | link | issue14807 messages |
2012-05-14 18:00:00 | terry.reedy | create | |
|