-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Convert test runner to use pypiserver package as standalone process #5284
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
Conversation
… in our pypi artifacts.
…lt. Fix requests pollution.
…this does not work due to AttributeError: 'HTMLParser' object has no attribute 'unescape'
…y for tests that gets cleanedup.
…y for tests that gets cleanedup.
…lib from other tests.
@pytest.mark.skip_windows | ||
@pytest.mark.skipif(sys.version_info >= (3, 9), reason="old setuptools doesn't work") | ||
@pytest.mark.needs_internet | ||
def test_outdated_setuptools_with_pep517_legacy_build_meta_is_updated(PipenvInstance): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are the black magic of the devil and old setuptools -- how they ever passed I have no clue and vote we should drop them now. Just read the comments, it feels like a very old problem it was checking for, and with time we would drop these tests anyway.
I believe, though I haven't tested it, that adding gunicorn on Ubuntu and Mac might improve the speed of the tests. |
…ypa#5284) * Check point progress on moving tests to pypiserver. * Allow other indexes to mimic the pypi json API for package hashes. * Fix these tests that run on lower python versions only. * Try adding the pypiserver to the github actions to only run once. * Expand the scope of fixtures for pypiserver. * try to accomedate microsoft runner. * Windows networking troubles. * Remove running as a background job. * Try to condtionally invoke different start pypi-server commands * Try to condtionally invoke different start pypi-server commands * Try to condtionally invoke different start pypi-server commands * Try to condtionally invoke different start pypi-server commands * Try to condtionally invoke different start pypi-server commands * Try to condtionally invoke different start pypi-server commands * Try to condtionally invoke different start pypi-server commands * Try to introduce pypi as the root index because setuptools-scm is not in our pypi artifacts. * see if the windows tests run faster (and the other tests) by supplying waitress. * Only use waitress on windows because the others are fast on the default. Fix requests pollution. * Supply a suitable Pipfile instead for these two failing tests. * More requests resolver cross test contamination cleanup. * remove problematic tests because even on my version of python 3.8.12 this does not work due to AttributeError: 'HTMLParser' object has no attribute 'unescape' * fix mirror install test. * Fix Pipfile. * Fix Pipfile for real * Fix tests * Cleanup test naming and more test enhancements. * Save this optimization for a subsequent PR. * Cleanup the TemporaryDirectory between tests. * resolve merge conflict. * Cleanup path initalization -- it hsould always be a TemporaryDirectory for tests that gets cleanedup. * Cleanup path initalization -- it hsould always be a TemporaryDirectory for tests that gets cleanedup. * tableflip on those requests tests that read the setup metadata in reqlib from other tests. * Update developer documentation for running tests. * add news fragment. * Try gunicorn perfoormance for linux/mac * Only use gunicorn on linux based on the results of last run.
pypiserver
.pypiserver
correctly for all supported OS typeswaitress
for Windows only because it reduced the run time of windows test runner by 10 minutes from the default wsgi bottle.waitress
for Ubuntu because it slowed it down significantly, nor for mac OS which showed no difference using it.dep_to_pip
style tests and realize that there is still some cross tests contamination going on that sometimes confused requirementslib into adding a specifier for requests without a specifier -- I ultimately concluded that I don't have time currently to figure out how to prevent this other than to convert those requests and requests with extras pip_to_deps tests to use uvicorn as its test subject instead, since it too has extras and we don't use it in other tests that pull in the vcs setup.py metadata artifacts. We can see on the latest main build this failed again too, so we basically have been getting lucky and this change touvicorn
at least gurantees the build won't be flaky anymore for this particular reason: https://github.com/pypa/pipenv/runs/8179118655?check_suite_focus=trueDeferred for Future
Extends the hash lookup method to consider if the index being used supports the same pypi API for retrieving package hashes.-- Deferred to future PR since I shouldn't add a functional change to pipenv in this re-work of the testing framework.pypiserver
and when I subbed out feature it shaved almost a 30-60 seconds off my test runner locally: Prototype supporting the same package hash json API response that pypi provides pypiserver/pypiserver#440Artifacts and Stats
First run where this PR refactor was really successful:
Second run where I pushed doc/news changes and let it re-run:
###Latest main branch run (for possible comparison)

The checklist
news/
directory to describe this fix with the extension.bugfix.rst
,.feature.rst
,.behavior.rst
,.doc.rst
..vendor.rst
. or.trivial.rst
(this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.