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

Clean up pip exclusion. #1198

Merged
merged 2 commits into from
Apr 24, 2023
Merged

Clean up pip exclusion. #1198

merged 2 commits into from
Apr 24, 2023

Conversation

freakboy3742
Copy link
Member

#1196 added exclusions for pip 23.1; however, due to the way that tox auto-updates pip to the most-recent version, an explicit configuration was needed to avoid using pip 23.1 in practice. That configuration is no longer required, and hard-pinning an old version of pip isn't desirable.

Fixes #1195.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@freakboy3742
Copy link
Member Author

This isn't passing CI right now; as soon as there is an updated version of pip that resolves pypa/pip#11982, it should pass. I've submitted this as a PR so that we don't forget the cleanup that will be required once that happens.

@rmartin16
Copy link
Member

rmartin16 commented Apr 22, 2023

hmm...pip 23.1.1 released....still failing...

@freakboy3742
Copy link
Member Author

Is it possible something (e.g., a tox environment) is being cached?

@rmartin16
Copy link
Member

No...I found it, though.

virtualenv does some sneaky stuff apparently. It embeds a copy of pip....right now, that embedded version is 23.1. By default, this is where virtualenv will source the version of pip to install in to virtual environments that are created. Presumably, an upcoming version of virtualenv will update this and allow CI to properly run.

That said, virtualenv supports a flag to always download the latest version of pip (as well as setuptools and wheel).

This finally worked for me:

diff --git a/tox.ini b/tox.ini
index d1c27bb7..06e25d1e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,3 +1,6 @@
+[pkgenv]
+download = True
+
 # The leading comma generates the "py" environment.
 [testenv:py{,38,39,310,311,312}]
 passenv =
@@ -5,6 +8,7 @@ passenv =
     LOCALAPPDATA
 extras =
     dev
+download = True
 commands =
     python -m coverage run -m pytest -vv {posargs}

@freakboy3742
Copy link
Member Author

Ugh... so... the problem is caused by the fact that it downloads the latest version of pip... and the only way to fix it is to force the download of the latest version of pip. 🤯

@rmartin16
Copy link
Member

rmartin16 commented Apr 22, 2023

well...tox downloads the latest virtualenv which is 20.22.0 and that version includes pip 23.1....and that's what's installed when the virtual env is created; so, later runs of this pip then fail. Using download=True tells virtualenv to just fetch the latest pip instead of using its embedded version.

image

@freakboy3742
Copy link
Member Author

So - what was causing the error previously then? Did we just luck out and have Virtualenv push out a new version that pinned 23.1 as soon as it was available, but they haven't pushed out an update that pins 23.1.1?

@rmartin16
Copy link
Member

rmartin16 commented Apr 22, 2023

Yeah, I think so. pip==23.1 was released April 15 and virtualenv==20.21.1 and virtualenv==20.22.0 were released on April 19.

@mhsmith mhsmith merged commit f0ac680 into beeware:main Apr 24, 2023
@freakboy3742 freakboy3742 deleted the pip-bug-cleanup branch April 25, 2023 15:55
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.

Test suite failing due to setuptools/pip updates
3 participants