Commit Graph

19 Commits

Author SHA1 Message Date
Matt Davis 9848862927 Convert test runner to use pypiserver package as standalone process (#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.
2022-09-05 10:19:12 -04:00
Matt Davis 0caed6906f Reduce the amount of calls to pip and the number of tempfiles in batch_install. (#5301)
* Reduce the amount of calls to pip and the number of temp files in batch_install.

* Add logic to read the progress of the install in realtime from pip and stop using progress bar.

* refactor based on PR feedback.
2022-08-31 19:51:29 -04:00
Matt Davis 3387881a6d Code reorg utils into utils module reduces complexity (#4990)
* Split apart the massive utils.py into a utils module
2022-03-29 20:27:33 -04:00
Tomoya Iwata b20841e166 fix #4775 Consider environment variable PIP_TARGET when calculate depndancy delta. 2021-08-27 15:43:01 +09:00
Frost Ming 9b4eb98529 Remove unused patch files 2021-07-28 17:30:17 +08:00
Frost Ming a82bbb7b27 Try switching from delegator to subprocess 2021-07-28 16:39:36 +08:00
Frost Ming ca5d931f1f Update to py36 plus syntax 2021-07-28 10:59:00 +08:00
Dan Ryan e03878d7c7 Add news entry and fix lockfile
- Drop pytest-tap
- Update azure pipelines config
- Borrow ramdisk configuration from pip
- Fix pyinstaller ref for python 2
- Add 0-minute timeout and add github workflow
- Add skip for pywin32
- Scale down to `-n auto` to reduce race conditions on windows
- Skip pywin32 on python 3.8 as the relevant dependencies aren't
  compatible
- Use default pip exists action = ignore to work around VCS race
  condition
- Create local temp directory to avoid crossing drive letter boundary on
  azure during CI runs
- Monkeypatch click windows console detection to return False in CI

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:06 -04:00
Dan Ryan 83868c8f1a Cut over to devpi for tests and improve logging
- Verbose logs will now write gracefully to the terminal even while the
  spinner is running (i.e. during locking)
- This PR also cuts over to Devpi for a backing cache rather than a
  hacked httpbin instance
- Inclues a refactor of `pip_install` to deduplicate logic
- Attempts to switch back to relying on native editable installs in pip
  as the current implementation is broken on master (i.e. nothing is
  installed in the virtualenv)
- Fixes #3809

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 01:26:49 -04:00
Gleb Kozyrev 403a65105c Test sync --sequential processing every pip install result 2019-05-27 19:42:18 -04:00
Dan Ryan d8e66c7fce Add future imports to tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-16 00:52:10 -04:00
Dan Ryan 1601511d06 Don't depend on kenneth's personal mirror for testing
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-01-21 21:20:16 -05:00
jxltom 85e64b86be Resort imports for tests 2018-12-01 17:26:32 +08:00
Dan Ryan 83af37a2d1 Fix uninstallation if comments are present
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-01 16:20:45 -04:00
Dan Ryan cd5cad30be Refactor CLI for organization and simplicity
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-09-05 12:47:10 +08:00
Dan Ryan b74c6586fa Minor control flow and test logic updates
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-22 15:36:39 -04:00
Dan Ryan c31a311dc7 Minor code cleanup
Signed-off-by: Dan Ryan <dan@danryan.co>

Add pytz and certifi updates

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix nondeterministic resolution bug

- Update dependencies
- Fix some issues with test logic
- Update piptools patch

Signed-off-by: Dan Ryan <dan@danryan.co>

Update more packages

Signed-off-by: Dan Ryan <dan@danryan.co>

Update tests and utils

Signed-off-by: Dan Ryan <dan@danryan.co>

Still need to tackle last few failures

- this will seriously help with resolution issues

Add alembic new version

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-22 15:36:39 -04:00
Jacob Henner af91eb68bb Add support for PyPI mirrors
Adds support for the --pypi-mirror command line parameter and the
PIPENV_PYPI_MIRROR environment variable for most pipenv operations.
This permits pipenv to function without pypi.org, which is necessary for
users:

    1. behind restrictive networks
    2. facing strict artifact sourcing policies
    3. experiencing poor performance connecting to pypi.org
    4. who've configured a local cache for performance reasons

When specified, the value of this parameter replaces all instances of
pypi.org and pypi.python.org within pipenv operations without modifying
or requring the modification of Pipfiles.

- Resolves #2075
2018-06-07 18:24:18 -04:00
Tzu-ping Chung d21efa08c7 Check lockfile exists on sync, and don't update it
Matching the behaviour mentioned in:
https://github.com/pypa/pipenv/issues/1463#issuecomment-386297896
2018-05-03 19:18:45 -04:00