Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2014-08-19.21:13:36.739>created_at=<Date2013-11-16.20:40:50.753>labels= ['type-feature', 'library']
title='maxlevels -1 on compileall for unlimited recursion'updated_at=<Date2015-10-28.08:27:28.935>user='https://bugs.python.org/Sworddragon'
All functions of compileall are providing a maxlevels argument which defaults to 10. But it is currently not possible to disable this recursion limitation. Maybe it would be useful to have a special value like -1 to disable this limitation and allow to compile in an infinite amount of subdirectories.
Also I'm noticing maxlevels is the only argument which is not available on command line. Does it default there to 10 too? Maybe it would be useful if it could be configured too (in this case it could theoretically replace -l).
Here's a patch which adds support for controlling the maxlevels on command line. Currently, compileall uses a binary choice, either we don't process subdirectories or we process at most 10 subdirectories. This seems to be the case since its inception, in
1828 (b464e1d0b2fb) New way of generating .pyc files, thanks to Sjoerd.
Guido van Rossum <firstname.lastname@example.org>
1994-08-29 10:52:58 +0000 (1994-08-29)
The patch adds a new command option, -r, where -r 0 is equivalent to specifying -l. I guess we can't modify -l to actually control the maxlevels, due to backward compatibility concerns.