105 Commits

Author SHA1 Message Date
Matt Davis cd961a41b8 Fix issue-6011 direct file url path (#6012)
* Refactor this path logic to file url bug and re-use relative pathing logic.
* Handle case where the drive letter is different and so relative path may not be possible
* Add news fragment
2023-11-14 17:40:32 -05:00
Mathieu Dupuy 4e3a77d9d5 Revert "even more cleaning"
This reverts commit 578d3db710.
2023-10-20 10:23:49 +02:00
Mathieu Dupuy 578d3db710 even more cleaning 2023-10-20 09:48:23 +02:00
Mathieu Dupuy f7ae8f10a8 more cleaning 2023-10-11 13:33:12 +02:00
Christian Clauss 22223f0084 ruff rules SIM 2023-08-30 14:51:20 +02:00
Christian Clauss e23890e105 Performance: ruff rules C4 and PERF 2023-08-25 22:51:25 +02:00
Matt Davis 816502e2d2 fix ruff complaints 2023-08-20 12:39:40 +02: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
Matt Davis 70b77ae332 Fix failing test 2023-07-11 20:23:42 +02:00
Matt Davis 041695bbc4 Restore this patch in hopes it fixes the windows 3.8 build. 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
Christian Clauss 44e8aebc41 ruff --select=FLY,UP --target-version=py37 --fix . 2023-06-30 08:36:14 +02:00
Oz Tiram b0fa277a0b Remoe usage of toml in favor of tomlkit 2023-05-20 08:52:53 +02:00
Matt Davis 99800ec7a2 Requirementslib==2.3.0 (#5672)
* Bump requirementslib that drops vistir.

* Add news fragment

* Add missing file

* Remove vistir entirely

* fix circular import

* revert issue that may be causing circular import issue

* Hackaround current pythonfinder version importlib usage.

* PR Feedback

* fix lint
2023-04-29 19:22:28 +02:00
Matt Davis 89f554622a Revert "work towards fixing relative path . with extras"
This reverts commit 724364d241.
2023-04-26 22:43:54 -04:00
Matt Davis 724364d241 work towards fixing relative path . with extras 2023-04-26 22:39:39 -04:00
Oz Tiram abcb3e2df4 Remove pytest-pypi server from usage in tests 2022-12-28 15:45:41 +01:00
Oz Tiram c46ad88fb9 Tests: fix failing tests after removal of vistir.misc.run 2022-12-06 16:11:10 +01:00
Oz Tiram d474edc993 Remove another usage of vistir.misc.run 2022-12-06 15:25:10 +01:00
Matt Davis aed46b07c7 Fix tests 2022-11-10 01:47:29 -05:00
Oz N Tiram 7c945d6bf0 Remove usage of mkdir_p in favour of os.makedirs
This function was defined in ``pipenv.utils.shell`` and
in ``vistir.path``. ``os.makedirs`` which is added in newer Python
version is doing the same.
2022-10-12 11:00:15 +02:00
Oz N Tiram 9d532123d1 Merge pull request #5389 from pypa/clean-conftest
Clean conftest
2022-10-06 08:13:29 +02:00
Oz N Tiram 1f836f66fc Remove usage of fs_encode
See also #5062
2022-10-06 00:24:08 +02:00
Oz N Tiram ea84f684a6 Remove unused import of threading 2022-10-06 00:23:47 +02:00
Oz N Tiram d2fe28a8b0 Bump dparse version to 0.6.2 2022-10-02 23:58:38 +02: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 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
Oz N Tiram dbe6d45e89 Clean reference to delegator
We no longer vendor this package
2022-07-27 06:52:30 +02: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 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
Frost Ming ff32a68771 Remove some usages of vistir.compat 2021-11-08 23:49:40 +08:00
Frost Ming 0f67a112dc Populate the PATH env in pipenv run 2021-11-08 15:02:37 +08:00
Frost Ming 904f0a3b86 capture outputs written in subprocesses 2021-08-03 10:41:19 +08:00
Frost Ming 443547fee5 show 10 slowest cases 2021-08-03 10:41:17 +08:00
Frost Ming 46ea38fcca Isolate environment variables 2021-08-03 10:41: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
Frost Ming 698ef8cdd2 improve test performance 2020-11-02 11:11:57 +08:00
Frost Ming e6edaa6977 Disable ssh check 2020-11-02 11:11:56 +08:00
Dan Ryan c7425e7508 Skip tests that build extensions on windows
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-09 10:55:01 -04:00
Dan Ryan c19435e6da Fix relative path issue during tests
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-28 11:47:16 -04:00
Dan Ryan 73edea10a0 Skip flaky test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-22 17:28:19 -04: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
frostming 7d36f3fbda Reformat codes 2019-09-06 18:06:05 +08:00
Dan Ryan 8abaa06c23 Remove extraneous exception added to conftest.py
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 01:02:16 -04:00
Dan Ryan 9c3ee2a72b Get rid of devpi
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 02:55:47 -04:00
Dan Ryan 4b75c6490d Fix devpi server to work on windows
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 23:52:49 -04:00