1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

1560 commits

Author SHA1 Message Date
Pradyun Gedam
e7c80c7b46
Merge pull request #10535 from lukasjuhrich/main 2021-11-12 09:57:11 +00:00
Hugo van Kemenade
0252c04a16 Drop support for soon-EOL Python 3.6 2021-11-08 12:02:16 +02:00
Lukas Juhrich
2e67986782 make linters happy 2021-10-23 17:42:22 +02:00
Lukas Juhrich
58996b5ddb Add tests for BadZipFile handling
Note that the functional test does not actually detect the behavioral
change of throwing unhandled `BadZipFile` → throwing unhandled
`InvalidWheel`, whereas the unit test does.
2021-10-23 17:42:22 +02:00
Lukas Juhrich
cd3aefe7ad adapt network test to InvalidWheel 2021-10-23 17:42:22 +02:00
Pradyun Gedam
a00e7bcd88
Implement diagnostic errors for build-system.requires issues
This demonstrates how the new diagnostic errors are to implement, and
how they get presented to users.
2021-10-22 13:47:53 +01:00
Pradyun Gedam
85b43482bb
Introduce DiagnosticPipError
This introduces an exception and presentation model, for providing
better errors messages. The motivating idea is that the better error
messages contain clear wording and provide additional context to users
to better understand what is happening.

The `DiagnosticPipError` class introduces a structured framework in our
exception model, for code authors to write their error messages. The
usage explicitly requires passing "context" and a "hint" (which accept
None values). This should nudge code authors to explicitly think about
what additional information can/should be presented to the user, and
to provide relevant hints to them whenever possible. It also makes it
straightforward to identify cases where we don't do this, which may
serve as clear areas for improvement in the future.

The initial implementation is intentionally basic and doesn't do much;
however we should be able to introduce better usage of terminal colors
and other features (eg: hyperlinks!) to further improve the presentation
of these errors. It does improve the presentation style by a bit, even
though there are significant presentation-related improvements to be
made.

Additionally, having a structured framework means that these would be
improvements in presentation of *all* the errors that are within this
framework -- increasing the benefits of investing in the presentation
of these errors.
2021-10-22 13:41:40 +01:00
Stéphane Bidoul
ae512892eb
Prepare legacy editable metadata in isolated env
When there is a pyproject.toml, metadata preparation must be
done in the isolated build environment for legacy editable installs too
(fixes a regression).

Also detect earlier if an editable install must go through the
legacy install path, to be sure to run it in an environment
with the correct build requirements.
2021-10-18 14:34:50 +02:00
Stéphane Bidoul
ddfeaaef20
Reject projects that have neither a pyproject.toml nor a setup.py 2021-10-18 14:31:11 +02:00
Pradyun Gedam
1b4ee832db
Rework MacOS configuration paths, to match documentation
This brings us in line with pre-platformdirs behaviours on these,
following the details of the configuration paths, as documented in pip's
own documentation.
2021-10-17 15:07:58 +01:00
Pradyun Gedam
9f18a403ca
Merge pull request #10481 from notatallshaw/prefer_failures 2021-10-10 00:06:30 +01:00
Pradyun Gedam
610424f9f8
Quote "PreferenceInformation" to avoid runtime NameError 2021-10-09 09:41:56 +01:00
Pradyun Gedam
c01b5c6d8a
Update a test for resolvelib 0.8.0 2021-10-09 09:41:35 +01:00
Joseph Bylund
98d8401035
Apply suggestions from code review
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2021-10-08 07:27:38 -04:00
Joseph Bylund
dee6690f06 Renames, moves, docstrings, comments 2021-10-07 07:11:33 -04:00
Joseph Bylund
0862d40d35 (joe) work around no equality operator for requirement objects 2021-10-06 13:04:23 -04:00
Joseph Bylund
bd87828eae (joe) black + imports 2021-10-06 12:48:48 -04:00
Joseph Bylund
bb8824439e (joe) requirement creation is very expensive, and at least in my test case there were only ~200 unique requirement objects created in ~5-10 minutes of resolution time 2021-10-06 12:42:44 -04:00
Pradyun Gedam
377754b44a
Drop the hacky appdirs tests
There is no reason to try to test for other platforms.
2021-10-03 14:30:52 +01:00
Dominic Davis-Foster
78b8b8b5d2
Reformat test_appdirs.py, add type annotations, and switch to @pytest.mark.usefixtures 2021-09-30 16:48:40 +01:00
Dominic Davis-Foster
147e8a8a55
Remove duplicate monkeypatches 2021-09-30 15:37:12 +01:00
Dominic Davis-Foster
d031c640eb
Bump platformdirs version. 2021-09-30 15:36:13 +01:00
Dominic Davis-Foster
f2ff6effc1
Lint test_appdirs.py 2021-09-30 15:36:13 +01:00
Dominic Davis-Foster
ae6cf66c79
Switch from appdirs to platformdirs 2021-09-30 15:34:35 +01:00
Tzu-ping Chung
cb2d4b89a7
Merge pull request #10526 from uranusjr/remove-extra-merge-xfail 2021-09-30 16:34:39 +08:00
Tzu-ping Chung
8043eb267e Remove stale xfail on macOS tag generation 2021-09-30 15:30:42 +08:00
Jon Dufresne
72937f6520 Complete type annotations for tests/conftest.py and tests/lib/* 2021-09-29 19:57:29 -07:00
Stéphane Bidoul
e5be3f796e
Add PEP 660 support (build_editable) 2021-09-28 23:04:51 +02:00
Jon Dufresne
dadc9fc2fb Fix new mypy failures in tests/unit/resolution_resolvelib/
Before, during, or after merge b392833a0f,
new code was added that now requires typing.
2021-09-26 07:02:56 -07:00
Tzu-ping Chung
b392833a0f
Merge pull request #10435 from jdufresne/typing-unit 2021-09-26 16:29:29 +08:00
Tzu-ping Chung
f609d35a8f
Merge pull request #10482 from notatallshaw/known_depths 2021-09-26 12:42:12 +08:00
Damian
d311c8c7c6 further simplification 2021-09-23 20:34:25 -04:00
Damian
23050dfae6 Replace requirement creation with install_req_from_req_string 2021-09-23 19:59:20 -04:00
Damian
9844d79b18 Better names 2021-09-23 19:29:18 -04:00
Damian
8aef5c2a49 Add argument names 2021-09-23 18:58:50 -04:00
Damian
d7bd6dc084 Typo 2021-09-23 18:55:30 -04:00
Damian
724291214f Simplify test 2021-09-23 18:52:17 -04:00
Damian
f226b2f17a Fix linting 2021-09-23 11:46:24 -04:00
Damian
b8ff7f3f50 Replace build_iter_view with iter 2021-09-23 11:45:26 -04:00
Damian
0e40c942d4 Fix comment 2021-09-23 11:39:39 -04:00
Damian
4852663019 Fix lint issues 2021-09-23 11:29:25 -04:00
Jon Dufresne
60c274be2d Complete type annotations of tests/unit/ directory 2021-09-23 05:44:54 -07:00
Damian
478c5e5c3f Remove comments, add new line 2021-09-23 00:15:58 -04:00
Damian
27da19920d First attempt at provider known depths test 2021-09-23 00:11:13 -04:00
Tzu-ping Chung
58b1b73f30
Merge pull request #9498 from NoahGorny/cache-http-requests
session: Cache http requests of trusted hosts
2021-09-22 11:03:56 +08:00
Tzu-ping Chung
f6665f3512
Merge pull request #10288 from rittneje/fix-credential-cache 2021-09-22 10:23:08 +08:00
Stéphane Bidoul
42c1b2997a
Merge pull request #10493 from jdufresne/excinfo
Fix unreachable code in tests/unit/test_network_utils.py
2021-09-21 17:35:42 +02:00
Tzu-ping Chung
a902f5cba4
Merge pull request #10494 from jdufresne/missing-session
Add missing "session" fixtures in tests/unit/test_req_file.py
2021-09-21 21:26:08 +08:00
Stéphane Bidoul
2de1e5b1bf
Remove egg_link_path() 2021-09-21 11:18:02 +02:00
Stéphane Bidoul
5fa413d363
Extract egg_link* function to a separate module 2021-09-21 11:18:02 +02:00