pip
pip copied to clipboard
Remove `import re` from script template
Overrides distlib.scripts.ScripMaker.script_template with a template that doesn't import re.
Closes https://github.com/pypa/pip/issues/13165
While I would personally prefer the distlib script to contain the minimal number of imports, I am against diverging from distlibs default in pip.
If distlib maintainers don't want to take on the burden of this putting that burden on to pip has all the same problems and more, pip is not running distlib's test suite, does not have distlib's expertise, and could fall out of sync with changes in distlib. And this would affect a huge number of users.
I'll say -0, because it is actually fairly simple, and maybe some other maintainer is enthusiastic to support this.
Added some code review comments, but see my comment on #13165 for my broader views.
maybe some other maintainer is enthusiastic to support this.
I am!
Note @ichard26 has some changes for this template also: https://github.com/pypa/distlib/pull/242
@ichard26 you want to pull them in in this or a follow up PR?
Let's keep the changes separate. If we're going to override the script template, then I'm happy to make the changes against our template instead against distlib, but they achieve different goals and should be reviewed independently.
@hukkin thanks for your contribution.