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

tox tests are failing due to new pip release #1403

Closed
nicoa opened this issue May 27, 2021 · 3 comments · Fixed by #1405
Closed

tox tests are failing due to new pip release #1403

nicoa opened this issue May 27, 2021 · 3 comments · Fixed by #1405
Assignees
Labels
bug Something is not working ci Related to continuous integration tasks pip Related to pip PR wanted Feature is discussed or bug is confirmed, PR needed tests Testing and related things

Comments

@nicoa
Copy link
Contributor

nicoa commented May 27, 2021

There is a deprecation leading to failing CI since a few days, namely the one discussed in pypa/pip#7555:

  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.

I'm not sure about the options here - i.e. if this should be filtered out or tested as suggested by pip maintainers in that message and where / how to do this in the tests when the cli is invoked.

Further, a second problem are the pip deprecation warnings for the "previous" pip test setup.

So, the obvious solution would be to do the following on each pip-call: use feature flag in recent pip (as suggested in the warning above) and suppress version warnings in previous pip (export PIP_DISABLE_PIP_VERSION_CHECK=1).

Unfortunately I'm not sure how to proceed here or how to move the warnings from the pytest error section to the pytest warnings section.

If the solution is easy to implement and one could guide me to the proper place and has a bigger vision of what should happen and has the time for this, I'd be happy to get some guidance to file a PR.

Links

@webknjaz webknjaz added bug Something is not working ci Related to continuous integration tasks pip Related to pip PR wanted Feature is discussed or bug is confirmed, PR needed tests Testing and related things labels May 27, 2021
@webknjaz
Copy link
Member

Regarding pytest, this can be suppressed with the filterwarnings option. But of course, it's best to test pip in different modes, especially since the default is going to get flipped at some point.

@nicoa
Copy link
Contributor Author

nicoa commented May 28, 2021

I'd suggest to du the following in tox.ini:

setenv =
    coverage: PYTEST_ADDOPTS=--strict --doctest-modules --cov --cov-report=term-missing --cov-report=xml {env:PYTEST_ADDOPTS:}
+        pipprevious,pip20.3: PIP_DISABLE_PIP_VERSION_CHECK=1
+        piplatest,pipmain: PIP_USE_FEATURE=in-tree-build

One could consider adding another env for piplatest with suppressed warning about new feature, but imho this wouldn't be necessary.

If nobody says this would be the wrong approach or should be done differently, I'd be happy to file a PR and test if that works out properly - let me know if you have any objections!

Update: trying out, see linked PR.

@nicoa nicoa mentioned this issue May 28, 2021
3 tasks
@nicoa
Copy link
Contributor Author

nicoa commented May 28, 2021

Seems that it is not only related to the above issues, but as well to now the fake-with-deps package gets output for wheel built, opposed to before. Not sure if this is related to the latest updates to setuptools (there was a new release recently).

EDIT: okay, seems I tracked it down to setuptools release. with 56.2.0 it works on my local machine, with 57.0.0 it is broken. Will continue investigating, let me know if the traceback of the failing code (not included in the CI output) would help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working ci Related to continuous integration tasks pip Related to pip PR wanted Feature is discussed or bug is confirmed, PR needed tests Testing and related things
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants