replit/upm

python: Blacklist pies2overrides on python3

Closed this issue · 1 comments

The pies2overrides package is only intended to be installed on python 2; installing it on python 3 will break things because it conflicts with packages in the standard library. UPM sometimes suggests this package, apparently because it doesn't know that the module builtins comes from the standard library instead of a pypi module.

Repro instructions:

On repl.it, create a new python3 repl. Type import builtins in main.py and click run. It will try to automatically install pies2overrides and go into an infinite loop (demo repl: https://repl.it/@bdarnell/UnevenAshamedUnderstanding#main.py)

Suggested resolution:

Add pies2overrides to a blacklist, never to be installed automatically (at least not on python 3. It's potentially useful for python 2, although I'm not sure it's the sort of thing that would be good to auto-install). Or maintain an up-to-date list of packages in the standard library and don't recommend third-party packages that provide the same names.

Thanks for reporting this, it does indeed look like a bug in the generation of https://github.com/replit/upm/blob/master/internal/backends/python/pypi_packages.json. Sounds like we need to ban everything in https://docs.python.org/3/py-modindex.html and https://docs.python.org/2/py-modindex.html from discovery.