72 Commits

Author SHA1 Message Date
Matt Davis 9217384411 Merge pull request #6055 from pypa/vendor-bump-pipdeptree
Vendor bump pipdeptree
2024-01-21 20:47:42 -05:00
Oz Tiram abefb15913 Fix tests for reverse depency graph
pyyaml is now returned as PyYAML.

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
2024-01-04 21:57:14 +01:00
Matt Davis 4eb9256e26 Try fixing the CI 2023-12-06 02:31:01 -05:00
Matt Davis 6ac1451ec8 stop using requirementslib models (#5793)
* Move away from requirementslib models

* Revise test since PEP-440 does not support wildcard versions but does support equivalent compatible release specifiers.

* simplify and remove dead code

* Ensure the os_name marker is AND with the other markers.

* Move what we still need from requirementslib into the pipenv utils and stop vendoring it.

* Remove requirementslib.

* force upgrade of virtualenv for python 3.12

* remove virtualenv-clone

* Update vcs specifiers documentation; infer name from specific pip line formats where possible.

* Provide helpful text and error for recently removed commands

* Set the right log levels and verbosity to show users the errors generated by pip resolver when supplying -v flag

* Fix the collection of all matching package hashes for non-pypi indexes.  Plus lesson from testing torch which contains local identifiers.
2023-08-19 16:36:52 -04:00
Kian-Meng Ang 810fb745ae Fix typos
Found via `codespell -S ./peeps,./pipenv/patched,./pipenv/vendor,./pipenv/pipenv.1,./get-pipenv.py,./tests/test_artifacts`
2023-07-23 21:55:03 +08:00
Matt Davis 2fe293c58e Don't use search for generic python to crreate the venv for this test. 2023-07-11 20:23:42 +02:00
Matt Davis 593eb31592 Add news fragment. 2023-07-11 20:23:42 +02:00
Matt Davis c715b11234 Finally get to the bottom of the test parallelism random failures is because click's CliRunner is not thread safe. 2023-07-11 20:23:42 +02:00
Matt Davis bc277a132c Upgrade pydantic to v1.10.9 (#5729) 2023-06-11 08:59:57 +02:00
Matt Davis 63dea23b42 Update pipdeptree which solves issue 5652 (#5720)
* Update pipdeptree which solves issue 5652

* add news fragment.

* Fix broken test as expected output has changed.
2023-06-11 08:54:23 +02:00
Matt Davis ca436af2bc Issue 5600 check command should be able to pull requirements from lock file (#5607)
* Allow pipenv check inputs to be built from the lockfile categories instead of whats installed.

* fix lint

* add news fragment.

* update pipenv check documentation.

* Revise logic for pipenv check and change default behavior to check lockfile.

* fix issue revealed by tests

* fix docs for pipenv check changes.

* change conditional ordering in prep for supporting for future default categories env var.
2023-02-18 20:58:47 +01:00
Oz Tiram fe99aa1384 Remove deprecated flag --three 2023-01-23 01:18:23 +01:00
Oz N Tiram 8cd6e0174b Merge pull request #5504 from pypa/fix-5503
requirements: fix generation of file
2022-11-27 17:26:28 +01:00
Oz Tiram f57dac10de Fix failing integration test 2022-11-27 16:48:24 +01:00
Yeison Vargas fb9e4d769d Get packages for pipenv check from the target venv. 2022-11-24 00:52:22 -05:00
Matt Davis c58c371f6b Vendor new safety (#5217) (#5218)
* Vendor new safety (#5217)

* Closest to correct vendoring of ruamel.

* Fix lint

* New pipenv check with minimal output.

* Remove decode_for_output use in pipenv check functions.

* Use click.secho where is possible.

* Rerun vendoring to get the latest safety version.

* skip this test for now.

Co-authored-by: Yeison Vargas <yeisonvargasjf@gmail.com>
2022-11-22 21:14:24 -05:00
Oz Tiram 349b6edf16 Fix failing tests 2022-11-13 22:54:22 +01:00
Oz Tiram be92e26606 testing: disable some CVE checks for new CVEs without fix
This should be revised, but for now we can proceed without it.
2022-11-02 12:26:47 +01:00
Matt Davis 93c8bdaf62 Examine the 20 slowest tests and make improvements. 2022-09-06 00:13:12 -04:00
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 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 1207b34e14 Remove broken unused check and broken code argument from pipenv. 2022-03-21 05:52:23 -04:00
Matt Davis e7732e2a1b Add test case for this. 2022-03-11 01:49:16 -05:00
Denis Sazonov f742b9a8ca added a success message for verify 2021-12-20 11:25:46 +00:00
Denis Sazonov 45f8792804 added tests for pipenv verify 2021-12-18 22:29:35 +00:00
Frost Ming e06d9e0287 change a package 2021-11-05 12:43:11 +08:00
Frost Ming 30e2aac739 Fix test error 2021-11-04 18:33:43 +08:00
Ikko Ashimine dd1fdce056 Fix typo in test_cli.py
begining -> beginning
2021-08-17 22:20:18 +09:00
Frost Ming 904f0a3b86 capture outputs written in subprocesses 2021-08-03 10:41:19 +08:00
Frost Ming 6ef9344a5f Avoid wait() on processes 2021-07-29 14:42:52 +08: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
Glen Smith 243e300517 add inspection for 'which python' 2020-09-03 09:04:46 -06:00
Glen Smith c42f6094e9 Change the script command to scripts 2020-09-02 10:35:20 -06:00
Glen Smith 0e90c37d9f Merge remote-tracking branch 'upstream/master' into master 2020-09-02 10:18:55 -06:00
frostming 8c959096a8 Adapt test cases to prefer the mocked PyPI. 2020-09-01 16:35:37 +08:00
Glen Smith 622d119ea6 Fix script command and testing:
- Use string format compatible with python 2.7
- Use `click.echo`, not `print`
- The command is `pipenv script` not `pipenv scripts`
- The stanza label in Pipfile is `[scripts]`, not `[script]`
- The default when getting from the pipfile should be dict, not a list
2020-08-28 15:14:35 -06:00
Glen Smith 4e3baf5713 Fix command as script, not scripts 2020-08-28 12:15:52 -06:00
Glen Smith 07d166ac3b Add a scripts command and a test for it.
- https://github.com/pypa/pipenv/issues/3686
2020-08-28 12:08:58 -06:00
frostming 7d36f3fbda Reformat codes 2019-09-06 18:06:05 +08:00
Frost Ming 2dc8d0a070 use another version 2019-08-03 16:54:44 +08:00
Frost Ming c3b4c410fa change the version specifier 2019-08-03 11:42:07 +08:00
Frost Ming 7708cd8445 Pass lock options to outdated 2019-08-03 10:44:45 +08:00
John Vandenberg 050d9b4c78 graph tests: Replace requests with tablib 0.13.0
These tests fail when using requests in a de-vendored installation
because requests is part of the pre-installed image.

tablib has fewer constraints on its dependencies, however its
dependency tree is complicated enough to approximately test
the same functionality, and allows the graph tests to pass
even when de-vendored.
2019-07-11 13:33:01 +07:00
Dan Ryan 5ac676711a Fix editable VCS dependency resolution
- Fixes #3809

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 02:06:43 -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
Dan Ryan 2a0cc13f4e Merge branch 'master' into fix-several-general-options 2019-06-04 21:37:00 -04:00
Dan Ryan 359906c669 Update tests to resolve some transient resolution issues
Signed-off-by: Dan Ryan <dan@danryan.co>

probably need to sync submodules for this to work

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

Update to new version of artifacts

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

Fix windows failure

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

Update azure-pipelines.yml for Azure Pipelines

Update lockfile test for windows

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

Fix scandir test

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

Update azure test steps

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

Fix virtualenv test

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

Fix python discovery when nothing is supplied

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

Fix cli ensure_project call

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

Fix run in virtualenv test

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

Show why virtualenv test failed if it did

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

Fix python interpreter discovery

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

scale down lock test modifications and increase error logging

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

Fix spinner bugs on windows and python discovery

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

Fix pythonfinder search algorithm to dodge false paths on win

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

use pipenv directly

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-03 22:01:07 -04:00