jaraco / pip-run

pip-run - dynamic dependency loader for Python
MIT License
136 stars 19 forks source link

Change `-m pip-run` in README to `-m pip_run` #50

Closed jwodder closed 3 years ago

jwodder commented 3 years ago

Recent versions of Python (not sure when it started; 3.9.0? 3.9.1?) no longer support using the -m option with an invalid module name. This PR thus updates the documentation to invoke pip-run with -m in a way that is guaranteed to work with all Python versions.

jaraco commented 3 years ago

Oh, this makes me sad. I really despise typing underscores as they're a chorded keystroke on my keyboard (and most users for that matter). I observe python -m pip-run still works on Python 3.9.0, so it's probably 3.9.1.

Hmm. It also works fine on Python 3.9.1:

$ docker run -it jaraco/multipy-tox
root@67e28fed58bd:/# python -V
Python 3.9.1
root@67e28fed58bd:/# python -m pip-run -- -c 'print("worked")'
worked
jaraco commented 3 years ago

By my reading, the only two changes to Python's runpy module in the past year are python/cpython#18699 and python/cpython#19239.

jaraco commented 3 years ago

Neither of those seem to be relevant. Can you provide a repro describing the behavior you encountered? Can you confirm that in your environment the pip-run.py script is installed as intended?

jwodder commented 3 years ago

So I guess just close this as "can't reproduce"?

jwodder commented 3 years ago

Interestingly, I just used Homebrew to upgrade Python to 3.9.2, and the pip-run.py file disappeared! I think I see what's causing it, and I've filed this as a bug with Homebrew.