Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve Python docs, add section about PEP 668 #16643

Merged
merged 1 commit into from Feb 15, 2024

Conversation

iMichka
Copy link
Member

@iMichka iMichka commented Feb 12, 2024

Remove comment about Python@2 that is now long gone

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

@iMichka
Copy link
Member Author

iMichka commented Feb 12, 2024

Note: this PR does not contain other comments / decisions we made in Homebrew/homebrew-core#157500, which I will handle later in a second PR.

docs/Homebrew-and-Python.md Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

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

Some small nitpicks 🙂

docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Looks good! As a general note (and we should maybe define this somewhere): a "package" is "either a cask or a formula". In cases where it's definitely either a "formula" or "cask": use that instead to avoid confusion.

(I believe some casks may depend on Python formulae but never vice-versa and there are no Python modules installed as casks).

docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
docs/Homebrew-and-Python.md Outdated Show resolved Hide resolved
Remove comment about Python@2 that is now long gone
@iMichka
Copy link
Member Author

iMichka commented Feb 15, 2024

Looks good! As a general note (and we should maybe define this somewhere): a "package" is "either a cask or a formula". In cases where it's definitely either a "formula" or "cask": use that instead to avoid confusion.

(I believe some casks may depend on Python formulae but never vice-versa and there are no Python modules installed as casks).

I went with formula in more places to be consistent. I think that a cask depending on a brewed Python is a very small edge case that is not worth mentioning in this documentation (unless there is a specific thing that our users should be aware of, but let's try to not confuse them too much).

@iMichka iMichka changed the title docs: improve Python docs, add section about PEP688 docs: improve Python docs, add section about PEP 668 Feb 15, 2024
@MikeMcQuaid
Copy link
Member

Thanks @iMichka!

@iMichka iMichka merged commit a06eac0 into Homebrew:master Feb 15, 2024
24 checks passed
@iMichka iMichka deleted the docpep branch February 15, 2024 13:35
@iMichka
Copy link
Member Author

iMichka commented Feb 15, 2024

Merging, we can do a second pass later. I opened a PR to improve the second page of Python documentation: #16662
Given that there is much more content in #16662, I think both documents will need a full final review at the end.


Virtualenv has a `--system-site-packages` switch to allow "global" (i.e. Homebrew's) `site-packages` to be accessible from within the virtualenv.
It is possible to install some Python packages as formulae, by using `brew install xyz`. We do not recommend using these formulae and recommend you install them with pip using a virtualenv. These syste-wide Hombrew Python formulae are often Homebrew-specific formulae that are useful as dependencies for other Homebrew formulae. It is not recommended to rely on them.
Copy link
Member

Choose a reason for hiding this comment

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

Some typos to fix for future PR:

Suggested change
It is possible to install some Python packages as formulae, by using `brew install xyz`. We do not recommend using these formulae and recommend you install them with pip using a virtualenv. These syste-wide Hombrew Python formulae are often Homebrew-specific formulae that are useful as dependencies for other Homebrew formulae. It is not recommended to rely on them.
It is possible to install some Python packages as formulae, by using `brew install xyz`. We do not recommend using these formulae and recommend you install them with pip using a virtualenv. These system-wide Homebrew Python formulae are often Homebrew-specific formulae that are useful as dependencies for other Homebrew formulae. It is not recommended to rely on them.

@github-actions github-actions bot added the outdated PR was locked due to age label Mar 18, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants