-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
pathfix.py does not find Python scripts that have '-' in its filename #82528
Comments
Tools/scripts/pathfix.py does not find Python scripts that contain a '-' in their filename when working recursively. r'^[a-zA-Z0-9_]+\.py$' r'^[a-zA-Z0-9_-]+\.py$' fixes this. I am not sure if you want to allow further characters in script names like spaces or other special characters. The pull request I will create will only fix the '-' issue. |
Thanks Ruediger Pluem: I merged your change into master and backported to 3.8 and 3.7. For the 3.7 backport, I skipped tests. |
Welcome Victor Stinner. Any chance to get it also backported to 3.6 as I guess this would increase the chance to see it in RedHat 8 where I hit the issue? |
Python 3.6 doesn't accept bugfixes upstream. If you are a Red Hat customer, you can contact the support to request a backport. Or you can copy the file from the master branch :-) |
Thanks for the information. I opened a support request. |
Note that the pathfix comment says: # Directories are searched recursively for files whose name looks Files with a dash are *not* Python modules, since they can't be imported. Should the comment (which is the only documentation for pathfix, AFAIK) be updated to say it looks for the .py suffix? |
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: