Message 160650 - Python tracker (original) (raw)

  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.

  1. 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.

  1. Misc/NEWS entry suggestion:
  1. stat module doc entry.