Skip to content

gh-149701: Fully silence potential hash -r error#149702

Merged
vsajip merged 4 commits into
python:mainfrom
genericallyterrible:venv_activate
May 13, 2026
Merged

gh-149701: Fully silence potential hash -r error#149702
vsajip merged 4 commits into
python:mainfrom
genericallyterrible:venv_activate

Conversation

@genericallyterrible

@genericallyterrible genericallyterrible commented May 12, 2026

Copy link
Copy Markdown
Contributor

@bedevere-app

bedevere-app Bot commented May 12, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot

python-cla-bot Bot commented May 12, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@sepehr-rs sepehr-rs 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.

Tested on Debian 13, can confirm this fix works.

bash-5.2$ set +h
bash-5.2$ hash
bash: hash: hashing disabled
bash-5.2$ source .venv/bin/activate
(.venv) bash-5.2$ echo $?
0

@genericallyterrible

Copy link
Copy Markdown
Contributor Author

After digging, seems the same thing happened previously in virtualenv: pypa/virtualenv#2717

New here so I'm not sure if tests may need updated to watch for regressions.

@bedevere-app

bedevere-app Bot commented May 12, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@zware

zware commented May 12, 2026

Copy link
Copy Markdown
Member

Yes, I think this is worth adding a test along the lines of what was done in the virtualenv change.

@vsajip vsajip 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.

As per @zware's comment, I agree that a test should be added.

@bedevere-app

bedevere-app Bot commented May 12, 2026

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@genericallyterrible

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

I copied the preceding test, test_deactivate_with_strict_bash_opts, and added set +h before the source command.

Sorry for the noise, I mistakenly merged main through github instead of rebasing my commits locally.

@bedevere-app

bedevere-app Bot commented May 12, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

@vsajip: please review the changes made to this pull request.

@bedevere-app bedevere-app Bot requested a review from vsajip May 12, 2026 19:57

@zware zware 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.

LGTM!

@vsajip vsajip merged commit cd60968 into python:main May 13, 2026
57 of 60 checks passed
@vsajip vsajip added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels May 13, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @genericallyterrible for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @genericallyterrible for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @genericallyterrible for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented May 13, 2026

Copy link
Copy Markdown

GH-149757 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 13, 2026
@bedevere-app

bedevere-app Bot commented May 13, 2026

Copy link
Copy Markdown

GH-149758 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 13, 2026
@bedevere-app

bedevere-app Bot commented May 13, 2026

Copy link
Copy Markdown

GH-149759 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label May 13, 2026
@genericallyterrible genericallyterrible deleted the venv_activate branch May 13, 2026 08:01
vsajip pushed a commit that referenced this pull request May 13, 2026
vsajip pushed a commit that referenced this pull request May 13, 2026
vsajip pushed a commit that referenced this pull request May 13, 2026
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.

4 participants