Skip to content

Introduce python_major_minor_version DSL - #23481

Merged
MikeMcQuaid merged 1 commit into
mainfrom
python_major_minor_version
Aug 10, 2026
Merged

Introduce python_major_minor_version DSL#23481
MikeMcQuaid merged 1 commit into
mainfrom
python_major_minor_version

Conversation

@iMichka

@iMichka iMichka commented Aug 9, 2026

Copy link
Copy Markdown
Member

This is a shorthand version for Language::Python.major_minor_version


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Copilot AI lite review requested due to automatic review settings August 9, 2026 17:13
@iMichka

iMichka commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

Cc @MikeMcQuaid

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Formula DSL helper in Language::Python::Virtualenv to expose Language::Python.major_minor_version via a shorter call site, plus a spec to verify delegation.

Changes:

  • Introduce python_major_minor_version(python) as a delegating DSL helper for formulas including Language::Python::Virtualenv.
  • Add an RSpec example asserting the helper delegates to Language::Python.major_minor_version.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Library/Homebrew/language/python.rb Adds a new public DSL helper method delegating to Language::Python.major_minor_version.
Library/Homebrew/test/language/python/virtualenv_spec.rb Adds a spec covering the new helper method鈥檚 delegation behavior.

馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread Library/Homebrew/language/python.rb Outdated
Comment thread Library/Homebrew/test/language/python/virtualenv_spec.rb Outdated
@iMichka

iMichka commented Aug 10, 2026

Copy link
Copy Markdown
Member Author

Waiting for the discussion in #23479 (comment) to finish, as we might go in another direction

@iMichka
iMichka force-pushed the python_major_minor_version branch from 44b69fc to 9e8e2d4 Compare August 10, 2026 07:36
@iMichka iMichka changed the title Introduce python_major_minor DSL Introduce python_major_minor_version DSL Aug 10, 2026
This is a shorthand version for Language::Python.major_minor_version
@iMichka
iMichka force-pushed the python_major_minor_version branch from 9e8e2d4 to ec271a7 Compare August 10, 2026 07:41

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@MikeMcQuaid
MikeMcQuaid enabled auto-merge August 10, 2026 07:57
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit 3ecc9ef Aug 10, 2026
42 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the python_major_minor_version branch August 10, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants