-
-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maxlevels -1 on compileall for unlimited recursion #63827
Comments
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 The patch adds a new command option, -r, where |
Ping. :) Can someone review this patch, please? |
Added patch which addresses the comments of Berker Peksag. Thanks for the review! |
Do we really want to allow infinite recursion (say a symbolic link loop)? |
Ah, bad font, I thought the -l was a -1. I see you aren't adding the infinite recursion, the just ability to control the maximum. The patch looks good to me. |
Why can't we just reuse the "-l" option? |
Backward compatibility reasons, I guess. compileall -l completely deactivates the recursion, so using -l for controlling the number of levels seems to overwrite its original meaning. |
New changeset a62368778d6c by Benjamin Peterson in branch 'default': |
I'm wondering what the recursion limit is if -l and -r are not given. Does it default to 10 too or is there no limit? If the first is the case maybe this should also get documented. |
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
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: