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

fix(x): fix a regex used to find python executable #132694

Conversation

ismailarilik
Copy link
Contributor

@ismailarilik ismailarilik commented Nov 6, 2024

Isn't the regex ^python[2-3]\.[0-9]\+$ wrong? It doesn't match, for example, with python2.8. There should be a plus sign at the end for a match, like python2.8+. I think [0-9]+ is meant here instead of [0-9]\+. In that case a string like python2.8 would match. This wasn't noticed because the script probably find and run the Python executable before this line.

@rustbot
Copy link
Collaborator

rustbot commented Nov 6, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 6, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Yes, [0-9]+ seems correct. Thanks!

gh-jieyouxu@dev-desktop-eu-1:~/rust$ compgen -c python
python3-config
python3.12-config
python
python3.12
python-dotenv
python3
python3-config
python3.12-config
python
python3.12
python-dotenv
python3

@jieyouxu
Copy link
Member

jieyouxu commented Nov 7, 2024

r? jieyouxu

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 7, 2024

📌 Commit e0b98c7 has been approved by jieyouxu

It is now in the queue for this repository.

@rustbot rustbot assigned jieyouxu and unassigned Mark-Simulacrum Nov 7, 2024
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 7, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 7, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#132057 (miri: update ABI compat checks to accept Option-like types)
 - rust-lang#132665 (Implement `div_ceil` for `NonZero<unsigned>`)
 - rust-lang#132694 (fix(x): fix a regex used to find python executable)
 - rust-lang#132707 (Add --diagnostic-width to some tests failing after 1a0c502)
 - rust-lang#132715 (fix `LazyLock::get` and `LazyLock::get_mut` document)
 - rust-lang#132716 (chore(issue-template): fix branch name)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7044cc7 into rust-lang:master Nov 7, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 7, 2024
Rollup merge of rust-lang#132694 - ismailarilik:fix/x/fix-a-regex-used-to-find-python-executable, r=jieyouxu

fix(x): fix a regex used to find python executable

Isn't the regex `^python[2-3]\.[0-9]\+$` wrong? It doesn't match, for example, with `python2.8`. There should be a plus sign at the end for a match, like `python2.8+`. I think `[0-9]+` is meant here instead of `[0-9]\+`. In that case a string like `python2.8` would match. This wasn't noticed because the script probably find and run the Python executable before this line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants