Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Thank you for your patch Oleg. 3.4 and 3.5 are in security fixes only mode now.

Good catch, the usage of os.walk() in pygettext.py is incorrect. But your 
change is not enough. In _visit_pyfiles() the name 'CVS' is removed from the 
names list. If names is a list of directories emitted by os.walk(), this would 
exclude the whole directory CVS from searching. But if it is a new list "dirs + 
files", this doesn't have any effect. And directories with the ".py" extension 
shouldn't be added to the list of Python files. Hence _visit_pyfiles should 
take two separate lists for directories and files. And since it no longer is a 
callback, it would be better to inline its code.

There are tests for pygettext in Lib/test/test_tools/test_i18n.py. It would be 
nice to add a new test for the fixed feature.

----------
nosy: +serhiy.storchaka
stage: patch review -> needs patch
versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31920>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to