Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Downloader] Catch OSErrors from invalid repo names #3029
Description of the changes
Technically this fixes the problem though when you're already doing something about this, I wonder if we could also add hyphens to set of allowed characters, especially that some repos already use those in repo names and it would seem logical to allow such names.
I'm somewhat concerned that this is an overly restrictive set and that it would be better to detect when a file path is problematic to the host system and inform users rather than error out, and adjust the help text to match that, however I also see how this is not the easiset approach.
(On windows) There are other things which are invalid which that regex allows
And rather than handling each possible failure case preventatively, it is likely more productive to just detect the error and ask the user to use something their filesystem and OS allow, and adjust the help text to match that.
* [Downloader] Ensure repo names only contain the characters stated * Create 2827.bugfix.rst * [Downloader] Catch OSErrors from invalid filenames * Update 2827.bugfix.rst * Style * do the thing again * Update 2827.bugfix.rst