Commit Graph

900 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 7b9b1aeb1c Allow users to pass a string of extra arguments to pip (#5283)
* Allow users to pass a string of extra arguments to pip install
2022-09-04 16:20:59 -04:00
Matt Davis 7d80a7fea5 Use a different library since I could not figure out the six conflicts this caused with other tests. 2022-09-04 00:28:02 +02:00
Matt Davis dbb0277866 Try to fix cross test pollution of Pipfile. 2022-09-04 00:28:02 +02:00
Matt Davis b26b4bfe2f Try to fix cross test pollution of Pipfile. 2022-09-04 00:28:02 +02:00
Matt Davis 4d7fc1506e Have the tests cleanup Pipfile after itself. 2022-09-04 00:28:02 +02:00
Matt Davis d59ded7de5 Add test case that fails on main branch and covers example fix of the issue. 2022-09-04 00:28:02 +02:00
Matt Davis f0d29d415c fix test 2022-09-01 01:52:50 +02:00
Matt Davis 46f8c863e0 Cleanup requests packages from the install_twists tests. 2022-09-01 01:52:50 +02:00
Matt Davis 44583cab20 Make this operation safe for all users and provide tests. 2022-09-01 01:52:50 +02: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 bac7b68e4a Try to address these sproadic test failures without skipping the test. 2022-08-29 08:36:05 +02:00
Albert Hopkins 44edfd4883 Fix: try python3 before python in install --system (#5296)
Fix a regression from commit dbea3f5 where `pip install --system` tries
to install using the `python` executable first which, on some systems
may point to Python 2.  Instead try `python3` first.
2022-08-27 22:28:10 +02:00
Matt Davis e4cc8f2550 Vendor in requirementslib==2.0.0 & drop pip-shims & revert sysconfig patch w/ safer setuptools usage (#5228)
* Vendor in requirementslib 2.0.0

* Drop sysconfig default patch.

* Remove setuptools import usages in pipenv.

* Add news fragment.
2022-08-24 14:09:17 -04:00
Dương Quốc Khánh 640612d0d7 Issue 5273 constraints are not recognized (#5274)
* Add more test for get_constraints_from_deps
* Use pip's check_invalid_constraint_type.
2022-08-18 19:52:23 -04:00
Matt Davis e44d797ae1 Add unit test for this. 2022-08-13 21:19:19 +02:00
Matt Davis 6ad1c1c8f4 Mark these tests as flaky. 2022-08-13 08:46:41 -04:00
Dương Quốc Khánh e9dc3247dc Issue 4371 incorrect dependencies when install dev packages (#5234)
* Add test, ensure dev lock use default packages as constraints.

* Use default packages as constraints when locking develop packages.

* Add test, ensure installing dev-packages use default packages as constraints. (#4371) (#2987)

* Use default packages as constraints when installing provided dev packages.

* change vistir.path.normalize_path to pipenv.utils.shell.normalize_path

* Add function that get contraints from packages.

* Add test for get_constraints_from_deps function

* Use get_constraints_from_deps to get constraints

* Use @cached_property instead of @property

* Use standalone utility to write constraints file

* prepare_constraint_file use precomputed constraints.

* Add news fragment.
2022-08-13 05:17:09 -04:00
Matt Davis d8c88ef510 Remove code that is not required but may be causing the mac OS test failures. (#5241) 2022-08-12 20:14:38 -04:00
Matt Davis 078f28bd6c Try with version that has new setuptools available in pypi. 2022-08-07 22:53:26 +02:00
Matt Davis c6e0dd4ae7 Remove commented out line. 2022-08-07 22:53:26 +02:00
Matt Davis 374b670afb Remove other spots that did not use the internal pip version to exectue pipenv commands. 2022-08-07 22:53:26 +02:00
Matt Davis 66e1256018 Convert this test off pip-shims, it became flakey recently. 2022-08-07 00:06:20 +02:00
Matt Davis 84065c49ed test corrections. 2022-08-06 08:32:25 +02:00
Matt Davis 1daa4d5d8d Remove old way of generting requirements. 2022-08-06 08:32:25 +02:00
Oz N Tiram ca38db63db Use temp_environ in test for CUSTOM_VENV_NAME
This is so that PIPENV_CUSTOM_VENV_NAME does not leak to
other tests.
2022-08-04 10:56:48 +02:00
otherjake ec38ae1e81 Add unit test, create a section about venv names
in advanced docs.
2022-08-04 10:56:48 +02:00
Matt Davis e2e67caabd Remove another dead test. 2022-07-29 15:28:18 +02:00
Matt Davis 771cee564a Remove tests that are old and permenently skipped, remove OS skips that seem to not make sense. 2022-07-29 15:28:18 +02:00
Matt Davis cd5a9683be Rename notpip to pip. Vendor in pip-22.2.1 and latest requirementslib and vistir. 2022-07-28 11:58:10 +02:00
Oz N Tiram dbe6d45e89 Clean reference to delegator
We no longer vendor this package
2022-07-27 06:52:30 +02:00
Matt Davis 2b895ffb3f Support the NO_COLOR and deprecate PIPENV_COLORBLIND environment variables (#5185)
* Refactor to support the NO_COLOR argument and deprecate PIPENV_COLORBIND variable.

* Add news fragment.
2022-07-24 09:04:28 +02:00
Matt Davis 9200fe1635 Reenable these tests again on the Windows CI. (#5163)
* reenable these skipped tests on the Windows CI as they appear to be passing again.
2022-07-05 23:55:39 -04:00
Oz N Tiram b0d5e2e58b Add importlib-metadata explicitly on tests/pytest-pypi 2022-06-28 23:32:18 +02:00
ImreC 37b1fb422b Include markers issue #5092 (#5114)
* Include markers

* Change to marker flag and include test

* Flip markers flag to exclude by default

* Docs and newsfile

* Let default dependencies update dev dependencies
2022-06-25 13:23:04 +02:00
Till Grutschus e276239538 Fix formatter screwup 2022-06-21 14:29:05 +02:00
Till Grutschus bdc11b3148 Test requirements env var expansion 2022-06-21 14:29:05 +02:00
Oz N Tiram ec34097407 Fixes of `requirements` with git requirements (#5083)
Solved by using existing convert_deps_to_pip function.

Fix #5076.

Original implementation by @fraser-langton. This also
solves the export of packages with editable mode, as suggested
by @hoyaaaa (#5071).
2022-04-26 13:19:17 +02:00
Matt Davis 5b3c55d85d Fix install failures that silently pass (#5046)
* Check at the end of install if the failed dependency queue is empty or not and exit with error when there are still failed dependencies.

* Address PR feedback about crayons.

* Fix windows tests that fail because of showing the progress bar, but only local -- CI still breaks. 

* Skip these tests on the windows CI for now.   Created https://github.com/pypa/pipenv/issues/5064 to track
2022-04-20 21:52:53 -04:00
Oz N Tiram 2bf70b7416 Removed usage of fs_str from vistir (#5062)
* Removed usage of fs_str from vistir

  This function was all about compatability of py2-py3.3 versions.
  Later versions don't need it.

* Explicitly convert dict values to strings

* Add news fragment
2022-04-20 16:17:57 +02:00
Matt Davis 949ee95d67 More granular control over PIPENV_VENV_IN_PROJECT variable. (#5026)
* Allow PIPENV_VENV_IN_PROJECT to be read in as None, and ensure if it is set to False that it does not use .venv directory.

* refactor based on PR feedback and add news fragment.

* Review unit test coverage and add new tests.  Remove unneccesary bits from other tests.
2022-04-06 21:10:05 +02:00
ImreC 63ac0d03a9 Implements requirements command as per #4959 (#5013)
* Implements reqs command

* Add news document

* Process comments

* Rename newsfile

* Adds --dev-only and --hash args

* Linting fixes

Co-authored-by: Imre Persoonlijk <imre1@pop-os.localdomain>
2022-04-05 14:13:33 +02: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
Matt Davis 0788b0122e Refactor test into a version that also check quiet mode, move to correct test file.
Add test cases for pip freeze has expected output
Add test for the package index restrictions.
2022-03-26 10:05:56 -04:00
Matt Davis 7f05d65eed Restore this message as stderr because it affects requirements.txt generation (#5005)
* Restore this message as stderr because it affects requirements.txt generation.

* Only load the dotenv file when it's a real file, and thus only print the message when it's present.

* Add news fragment.
2022-03-23 15:22:42 +01:00
Matt Davis b60fa7f5e6 Fix the assumption that all sources are named. (#5004)
* Fix the assumption that all sources are named.

* Add test case

* Add news fragment
2022-03-23 14:04:13 +01:00
Matt Davis 1207b34e14 Remove broken unused check and broken code argument from pipenv. 2022-03-21 05:52:23 -04:00
Oz N Tiram 2337984fd0 Merge pull request #4776 from cm-iwata/fix/4775_consider_envvar_piptarget
Consider environment variable PIP_TARGET when calculate depndancy delta
2022-03-20 00:56:02 +01:00
Matt Davis 506b9b40b9 Remove remaining references to git:// 2022-03-16 21:53:11 -04:00
Matt Davis b605989746 fix remaining failng test due to git:// protocol deprecation. 2022-03-16 21:31:10 -04:00