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

Use a helper to ensure tox always runs a known-good pip version #5770

Closed
wants to merge 1 commit into from

Conversation

pradyunsg
Copy link
Member

@pradyunsg pradyunsg commented Sep 7, 2018

Similar to #4657

Adds a helper that backs up a known good pip on the first invocation in a tox venv and replaces the installed version with that on every subsequent run. Arguably there's scope for improvement here by not replacing unless it might be broken but I'd consider that an optimization.

This change as it stands, means breaking pip horribly does not result in tox environments not being functional, which is an improvement.

@pradyunsg pradyunsg added skip news Does not need a NEWS file entry (eg: trivial changes) type: maintenance Related to Development and Maintenance Processes labels Sep 7, 2018
@pradyunsg pradyunsg self-assigned this Sep 7, 2018
install_command = python -m pip install {opts} {packages}
usedevelop = True
commands =
{[shorthands]pip} install -e {toxinidir}
Copy link
Member Author

Choose a reason for hiding this comment

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

tox runs freeze after installing develop if usedevelop = True.

This is why this is a separate line in commands.

Copy link
Member Author

@pradyunsg pradyunsg Sep 7, 2018

Choose a reason for hiding this comment

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

We could be "smart" in the wrapper script and not overwrite if we're doing a freeze but this is a bit more robust in case pip freeze is what breaks.

Plus we can then just remove multiple skip_install = True lines and add the above installation line to simply install when needed, instead of vice versa.

@pradyunsg pradyunsg changed the title Use a helper for ensure tox always runs a known-good pip version. Use a helper for ensure tox always runs a known-good pip version Sep 7, 2018
@pradyunsg pradyunsg changed the title Use a helper for ensure tox always runs a known-good pip version Use a helper to ensure tox always runs a known-good pip version Sep 7, 2018
@pradyunsg
Copy link
Member Author

@pfmoore Could you take this for a spin on Windows, and see how this fits with your workflow?

@pradyunsg pradyunsg deleted the tests/preserve-tox-pip branch October 10, 2018 06:16
@lock
Copy link

lock bot commented May 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 31, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation skip news Does not need a NEWS file entry (eg: trivial changes) type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant