Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Changed 'python -mpip' to 'python -m pip' for consistency#19739

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jklymak merged 1 commit intomatplotlib:masterfromchbauman:master
Mar 21, 2021
Merged

Changed 'python -mpip' to 'python -m pip' for consistency#19739

jklymak merged 1 commit intomatplotlib:masterfromchbauman:master
Mar 21, 2021

Conversation

chbauman
Copy link
Contributor

The top-level files INSTALL.rst and README.rst both use the version with the space between the -m and the module in the command that is executed. To be more consistent, this was changed here as well.

PR Summary

PR Checklist

  • [N/A] Has pytest style unit tests (andpytest passes).
  • [N/A] IsFlake 8 compliant (runflake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • [N/A] Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • [N/A] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

The top-level files INSTALL.rst and README.rst both use the version with the space between the -m and the module that is execute. To be more consistent, this was changed here as well.
@tacaswell
Copy link
Member

It looks like we have a couple more:

✔ 18:10:46 $ ack 'python -m[^ ]' --rstdoc/devel/development_setup.rst61:``python -mpip install -ve .``doc/devel/contributing.rst209:   python -mpip install coverage210:   python -mpytest --cov=matplotlib --showlocals -v214:   python -mpip install pyflakesdoc/faq/installing_faq.rst59:   python -mpip install matplotlibdoc/faq/troubleshooting_faq.rst164:    python -mpip install -v . > build.out

and for completeness all the places we do it the other way

✘ 18:43:00 $ ack 'python -m ' --rstdoc/devel/development_setup.rst20:   python -m venv <file folder location>53:    python -m pip install -ve .doc/devel/documenting_mpl.rst282:  python -m sphinx.ext.intersphinx 'https://docs.python.org/3/objects.inv'283:  python -m sphinx.ext.intersphinx 'https://docs.scipy.org/doc/numpy/objects.inv'284:  python -m sphinx.ext.intersphinx 'https://docs.scipy.org/doc/scipy/reference/objects.inv'285:  python -m sphinx.ext.intersphinx 'https://pandas.pydata.org/pandas-docs/stable/objects.inv'doc/devel/dependencies.rst113:before running ``python -m pip install .``.doc/users/prev_whats_new/github_stats_3.2.0.rst425:* :ghpull:`15300`: CI: use python -m to make sure we are using the pip/pytest we wantREADME.rst68:  python -m pytestINSTALL.rst18:  python -m pip install -U pip19:  python -m pip install -U matplotlib101:  python -m pip install -e .106:  python -m pip install .110:  python -m pip install -r requirements/dev/dev-requirements.txt

This has come up a couple times and I remember that people had strong opinions in either direction, but I do not remember what they are.

I suspect pro-' ' is easier to read / seperate the same of the module from the-m and I suspect the anti-' ' is visually separates arguments to Python from arguments to the module?

I tend to actually type no-space, but I think for docs the space is easier to read.

Thank you for working on this@chbauman and sorry you walked into something with some historical discussions behind it ;)

timhoffm reacted with thumbs up emoji

@tacaswelltacaswell added this to thev3.5.0 milestoneMar 18, 2021
Copy link
Member

@tacaswelltacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I have a weak preference for the other cases to be converted as well, but not going to block on that getting done.

@anntzer
Copy link
Contributor

I also tend to type with no space (because why bother), but I recently found out that if the module is a dotted name, then powershell gets confused if there's no space (see the point about-Dfoo.bar=baz athttps://stackoverflow.com/questions/26614969/how-can-i-pass-batch-arguments-with-dots-into-a-powershell-script), so I think teaching to always use a space is better (as it works in more cases).

@jklymakjklymak merged commita4a508b intomatplotlib:masterMar 21, 2021
@jklymakjklymak mentioned this pull requestMar 21, 2021
@tacaswell
Copy link
Member

Thank you for your contribute@chbauman ! Congratulations on your first (I think) Matplotlib PR 🎉 hopefully we will hear from you again.

@chbauman
Copy link
ContributorAuthor

Thanks, was actually my second one, but it's also the first project I am contributing to. You will certainly hear more from me.

@tacaswell
Copy link
Member

@chbauman 🐑 sorry for my mistake, but still glad to have you helping!

@QuLogicQuLogic modified the milestones:v3.5.0,v3.4.0Mar 25, 2021
@QuLogic
Copy link
Member

@meeseeksdev backport to v3.4.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMar 25, 2021
QuLogic added a commit that referenced this pull requestMar 25, 2021
…739-on-v3.4.xBackport PR#19739 on branch v3.4.x (Changed 'python -mpip' to 'python -m pip' for consistency)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.4.0
Development

Successfully merging this pull request may close these issues.

5 participants
@chbauman@tacaswell@anntzer@QuLogic@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp