Commit Graph

567 Commits

Author SHA1 Message Date
Dave Schaefer e87e2ceb05 Sort packages alphabetically inside each category
When installing any package, sort all package names alphabetically inside the category, for easier reading.

Unsure if this is the best place or way to implement.
Small prototype to add to discussion in https://github.com/pypa/pipenv/issues/5964

Tests:

before patch:

```
AssertionError: assert ['atomicwrite...ama', 'build'] == ['atomicwrite...', 'colorama']
  At index 1 diff: 'colorama' != 'build'
  Full diff:
  - ['atomicwrites', 'build', 'colorama']
  ?                  ---------
  + ['atomicwrites', 'colorama', 'build']
  ?                            +++++++++
```

after patch: pass.
2023-10-04 21:35:16 -06:00
Matt Davis cdf41def30 Solving slashes or other less usual symbols in vcs refs were not being interpreted correctly. (#5935)
* Solving issue 5934 where slashes or other less usual symbols in vcs refs were not being interpreted correctly.
* add some new unit-style integration tests
2023-09-17 05:59:15 -04:00
Matt Davis 5df6d9c815 Drop 3.7 test runner (#5922)
* Drop 3.7 test runner and invoke 3.12

* Ok 3.12 on windows still hangs
2023-09-07 15:39:11 +02:00
Matt Davis 4cf36f82a7 Apply patch for install_search_all_sources = True (#5895)
* Apply patch for install_search_all_sources = True
* patch the patch
* Add news fragment
* add back test of install_search_all_sources
2023-08-31 20:16:07 -04:00
Christian Clauss 22223f0084 ruff rules SIM 2023-08-30 14:51:20 +02:00
Matt Davis a3b197e491 Attempt to fix the local/editable file installs (#5870)
* Attempt to fix the local/editable file installs

* More refinements to handling directories vs files and when it is relative vs not

* Add back missing egg fragment (I removed it during the initial removal of requirementslib).  Also fix the latest ruff error.
2023-08-26 14:54:43 +02:00
Christian Clauss 2062c6b1fb dict.keys 2023-08-25 22:51:25 +02:00
Christian Clauss e23890e105 Performance: ruff rules C4 and PERF 2023-08-25 22:51:25 +02:00
Matt Davis c8f446510e Add back --skip-lock flag using the new utilities. (#5847)
* Add back --skip-lock flag using the new utilities.
2023-08-22 06:17:14 -04:00
Matt Davis 457bd52803 More ruff fixing and convert install routines to rich console 2023-08-20 12:39:40 +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
DasaniT be8a084503 Add --categories option to work with requirements txt files 2023-08-17 22:30:53 +02:00
Matt Davis ec35f7fdf4 Remove --skip-lock flag 2023-07-29 10:07:51 +02:00
Matt Davis 69d8d1b7ea Merge pull request #5807 from pypa/fix-ruff-complaints
Fix ruff-complaints
2023-07-23 14:44:29 -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
Oz Tiram e74a282e09 Fix ruff warnings in tests/integration 2023-07-23 08:31:31 +02:00
Frank Lichtenheld 7085c79cdb utils.toml: Handle tomlkit OutOfOrderTableProxy (#5797)
We get this when we have subtables that do not
directly follow their parent table.

Fixes: #5794

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-07-18 23:05:59 -04:00
Matt Davis 70b77ae332 Fix failing test 2023-07-11 20:23:42 +02:00
Matt Davis 49b78914b4 somehow this change got reverted 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 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 2975e8e5e3 Use this because of macos and linux test failure. 2023-07-11 20:23:42 +02:00
Matt Davis faeae5cb40 Remove duplicated test 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 47e4d355e0 Invoke the resolver in the same process as pipenv rather than utilzing subprocess. Restore accidentally commented out part of pip validations. 2023-07-11 20:23:42 +02:00
Matt Davis ea82bae751 Fix extras not being included for pypi packages in requirements command (#5784)
* Fix extras not being included for pypi packages in requirements command
* fix for issue with requirements command not handling file based requirements.
* add news fragment
2023-07-09 05:14:52 -04:00
Matt Davis 9befcb644e Merge pull request #5730 from pypa/drop-deprecated-flags
Drop the --keep-outdated flag and --selective-upgrade flags
2023-07-05 01:40:15 -04:00
Matt Davis 343f0208fa Merge pull request #5765 from sebastien-coavoux/main
Ensure version contains an operator when defined
2023-07-04 16:43:45 -04:00
Tim Hourigan 7a1f18d12f gh-5777 Keep hashes at the end 2023-07-04 01:05:12 +01:00
Sébastien Coavoux 2ca0ed4ca3 Ensure version match operator when building specifier from pipfile 2023-07-03 14:50:33 -04:00
Matt Davis 6a55712651 Merge pull request #5768 from pypa/issue-5766
Issue 5766
2023-06-30 23:53:47 -04:00
Matt Davis 9a98977997 Add test and news fragment. 2023-06-30 23:02:17 -04:00
Christian Clauss 44e8aebc41 ruff --select=FLY,UP --target-version=py37 --fix . 2023-06-30 08:36:14 +02:00
Matt Davis cb23498757 requirements command improvements, fixes issue 5755. (#5757)
* requirements command improvements, fixes issue 5755.

* editable is not a pip arg

* Apply suggestions from code review

Co-authored-by: Michael Marino <mmarino@gmail.com>

* Update pipenv/routines/requirements.py

Co-authored-by: Michael Marino <mmarino@gmail.com>

* fix test

* add news fragment.

---------

Co-authored-by: Michael Marino <mmarino@gmail.com>
2023-06-29 23:52:18 -04:00
Matt Davis 7458b32e34 Bump requirements lib to v3.0.0 (#5679)
* Port over latest requirementslib sample changes to pydantic.

* fix import

* port over more changes from other attempt.

* port over more changes from other attempt.

* Iterate

* fix some tests

* fix markers tests

* Spot check changes back towards what was passing in pipenv prior.

* Parity with latest requirementslib changes

* latest changes that work for both pipenv and requirementslib.

* Hack for cross-test contamination looking for version of six that isn't in the private pypi.

* Differences between reqlib3 and prototype branch

* corrrect re-written imports that were wrong.
2023-06-26 23:54:47 +02:00
Matt Davis 6daa947bc7 skip other failing test -- won't be possible to support multiple indexes without using our resolver. 2023-06-18 22:45:06 +02:00
Matt Davis 2058565edf Fix failing test 2023-06-18 22:45:06 +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 205269ce09 Drop the --keep-outdated flag and --selective-upgrade flag that have been deprecated in favor of update/upgrade commands. 2023-06-11 01:30:27 -04:00
Matt Davis be046bfbb8 This pre pip install path should no longer be neccessary when adding packages. (#5700)
* This pre pip install path should no longer be neccessary when adding packages.

* Fix test -- not sure how this was ever correct.

* Address test edge case
2023-06-02 06:40:40 +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
Christian Clauss 9525db4623 feat: Replace flake8 and isort with ruff 2023-04-13 15:58:49 +02:00
Matt Davis 8c8d3d1f8e Improve pipenv update and add pipenv upgrade command (#5617)
* Split apart core using pycharm refactor move methods.

* move init to remove cicular import.

* Fix imports.

* Check in concept for pipenv upgrade command

* Fix upgrade command expectation on how it updates the lockfile.

* Actually write the result to the Pipfile, and fix secondary bug with items not being written to the Pipfile.

* Fix issue where package being upgraded already exists.

* Add news fragment.

* Integrate upgrade with a refactor of update.

* Handle cases where there is nothing to upgrade.

* Add lock-only option.
2023-03-01 10:26:36 +01:00
Matt Davis 52f180eb91 Split apart core.py (#5616)
* Split apart core using pycharm refactor move methods.
2023-02-25 00:25:00 +01:00