Commit Graph

583 Commits

Author SHA1 Message Date
Arnaud Dezandee bb0ca90fec Ignore existing venv dir when PIPENV_VENV_IN_PROJECT is false (#6009) 2023-11-14 17:40:56 -05:00
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
Matt Davis 1b3b61eb21 Python 3.12 support (passing) (#5987)
* pipenv support for python 3.12
2023-10-24 17:26:12 -04:00
Matt Davis 8fd6dfc9cc Merge pull request #5965 from daveschaefer/sort-category-alphabetical
feat: Option to sort packages alphabetically inside each Pipfile category
2023-10-20 07:41:10 -04:00
Matt Davis 04f01063be Merge pull request #5879 from deronnax/mdupuy/drop-python-3.7
Drop support for python3.7
2023-10-20 06:56:08 -04: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
Matt Davis 9d9baee3c3 Skip test because truststore is now included. 2023-10-19 14:50:27 +02:00
Mathieu Dupuy f7ae8f10a8 more cleaning 2023-10-11 13:33:12 +02:00
Dave Schaefer 4802425c86 Add upgrade tests 2023-10-10 21:11:21 -06:00
Dave Schaefer 966afee813 Add tests for sorting str and dict values
Currently these fail. Will be fixed shortly in the next patch.

Pipfiles can contain different formats for package specifications.
Current default behaivour is to sort packages into groups - all string values will be sorted first, followed by all dictionary values. e.g.

```
aa = "*"
bb = "*"
cc = "*"
aaa = {version = "*"}
bbb = {version = "*"}
ccc = {version = "*"}
```

This will have to be fixed.
2023-10-10 21:03:25 -06:00
Dave Schaefer 4010f5d197 Mark install for other tests that install
Since the goal of the mark is to note which tests use it.
2023-10-08 10:52:05 -06:00
Dave Schaefer 4de4d20b74 mark uninstall tests with install
since the test calls `install` while running.
as discussed in https://github.com/pypa/pipenv/pull/5965
2023-10-08 10:48:26 -06:00
Dave Schaefer 7b33b04374 Implement pipfile sorting for uninstall
using sorting directive
2023-10-08 09:51:40 -06:00
Dave Schaefer 9bc4ffa506 Rename sorting directive
`sort_pipfile` , as requested in https://github.com/pypa/pipenv/pull/5965
2023-10-08 09:46:45 -06:00
Dave Schaefer 8e189035a3 Added new Pipenv option sort_alphabetical
Sort packages alphabetically inside each category.
Currently runs on `install`.
2023-10-07 11:01:53 -06:00
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