New submission from Éric Araujo <mer...@netwok.org>: I found a few possible bugs in tarfile:
- “mode in 'raw'” can give false positives for '' or 'ra'. Most of the code also checks for “len(mode) > 1”, but I find clearer and safer to just use “mode in ('r', 'a', 'w')”. - To use the shadowed builtin “open”, tarfile uses both “import as” and a local alias “bltin_open = open”. However, the second idiom would break if tarfile were reloaded. - Error messages don’t say what the invalid mode was. (Error messages are not part of the language, but nonetheless maybe it’s best not to commit that to stable branches.) ---------- components: Library (Lib) files: tarfile-misc-bugs-3.2.diff keywords: patch messages: 153348 nosy: eric.araujo, lars.gustaebel priority: normal severity: normal stage: commit review status: open title: Misc tarfile fixes type: behavior versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file24520/tarfile-misc-bugs-3.2.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14012> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com