[issue16478] Fix division in tabnanny
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16478] Fix division in tabnanny
Ezio Melotti added the comment: The patch looks OK, buy can you provide a way to reproduce the error (if you get any)? Should we add tests for tabnanny? I tried to get an error from tabnanny but the only thing I got was a ResourceWarning (that can be easily fixed by a finally: f.close() near the end of the check() method). I also noticed that tabnanny doesn't detect any problem with: if 0: \t\t\t\t\t\t\tprint(1) else: print(2) if 1: print() else: \t \t print() -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16478] Fix division in tabnanny
Serhiy Storchaka added the comment: The patch looks OK, buy can you provide a way to reproduce the error (if you get any)? No, I have not any. I am even not sure tabnanny works at all. But this bug is obvious. So, let's fix it and go on. Should we add tests for tabnanny? This will be good, but it is a different issue. I'm not ready to write a test. I tried to get an error from tabnanny but the only thing I got was a ResourceWarning (that can be easily fixed by a finally: f.close() near the end of the check() method). I can't see a ResourceWarning. A finally: f.close() already exists near the end of the check() method. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16478] Fix division in tabnanny
Ezio Melotti added the comment: I can't see a ResourceWarning. A finally: f.close() already exists near the end of the check() method. Looks like it was added in 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16478] Fix division in tabnanny
Roundup Robot added the comment: New changeset fc17fdd42c66 by Ezio Melotti in branch '3.2': #16478: use floor division in tabnanny and fix a ResourceWarning. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/fc17fdd42c66 New changeset d7558e4015a4 by Ezio Melotti in branch '3.3': #16478: merge with 3.2. http://hg.python.org/cpython/rev/d7558e4015a4 New changeset 377a50f8cb8b by Ezio Melotti in branch 'default': #16478: merge with 3.3. http://hg.python.org/cpython/rev/377a50f8cb8b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16478] Fix division in tabnanny
Ezio Melotti added the comment: Applied the patch on all 3 branches and fixed the resource warning in 3.2. Thanks for the report and the patch! -- assignee: - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16478] Fix division in tabnanny
New submission from Serhiy Storchaka: Tabnanny should use floor division in calculation, the comment says about this. But in the current Python 3 code / was not changed to //. -- components: Demos and Tools, Library (Lib) files: tabnanny_div.patch keywords: easy, patch messages: 175622 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix division in tabnanny type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27989/tabnanny_div.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16478] Fix division in tabnanny
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16478] Fix division in tabnanny
Georg Brandl added the comment: Well, sounds reasonable since we're working with an integer number of spaces :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com