[issue31920] pygettext ignores directories as inputfile argument

2018-04-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset a61f5da54772b0ea6a7eccf21df08e61585ef712 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-31920: Fixed handling directories as arguments in the ``pygettext`` 
script. (GH-6259) (GH-6436)
https://github.com/python/cpython/commit/a61f5da54772b0ea6a7eccf21df08e61585ef712


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2018-04-10 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2018-04-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6131

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2018-04-09 Thread miss-islington

miss-islington  added the comment:


New changeset e0dbc57e116516f6ca1ef021f71e1a98773d57ed by Miss Islington (bot) 
in branch '3.6':
bpo-31920: Fixed handling directories as arguments in the ``pygettext`` script. 
(GH-6259)
https://github.com/python/cpython/commit/e0dbc57e116516f6ca1ef021f71e1a98773d57ed


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2018-04-09 Thread miss-islington

miss-islington  added the comment:


New changeset 9b25bd6e26b50ade8d52a85c78d957b1f6f9131c by Miss Islington (bot) 
in branch '3.7':
bpo-31920: Fixed handling directories as arguments in the ``pygettext`` script. 
(GH-6259)
https://github.com/python/cpython/commit/9b25bd6e26b50ade8d52a85c78d957b1f6f9131c


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2018-04-09 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6128

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2018-04-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset c93938b5beea4c3f592119ebee6d4029558db8de by Serhiy Storchaka in 
branch 'master':
bpo-31920: Fixed handling directories as arguments in the ``pygettext`` script. 
(GH-6259)
https://github.com/python/cpython/commit/c93938b5beea4c3f592119ebee6d4029558db8de


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2018-04-09 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6127

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2018-03-26 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +5982
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2017-11-03 Thread Oleg Krasnikov

Oleg Krasnikov  added the comment:

Thanks for quite sensible notes Serhiy. I've fixed all that in recent commit 
and added a regression test. Still not sure about "testing conventions" here 
cause this is my first PR to python repository, so please let me know if 
something is wrong and I'll fix that.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2017-11-02 Thread Oleg Krasnikov

Change by Oleg Krasnikov :


--
keywords: +patch
pull_requests: +4193
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31920] pygettext ignores directories as inputfile argument

2017-11-02 Thread Oleg Krasnikov

New submission from Oleg Krasnikov :

This happens because pygettext's `getFilesForName` calls `os.walk` as if it was 
`os.path.walk`. But the `walk` function has changed signature when moved from 
`os.path` to `os`. So now `_visit_pyfiles` is passed to `walk` as `topdown` 
argument which is obviously wrong and therefore `_visit_pyfiles` is never 
called.

--
components: Demos and Tools
messages: 305406
nosy: Oleg Krasnikov
priority: normal
severity: normal
status: open
title: pygettext ignores directories as inputfile argument
type: behavior
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com