Commit Graph

4023 Commits

Author SHA1 Message Date
Stéphane Bidoul 82b42c80f9
xfail test_pip_wheel_ext_module_with_tmpdir_inside (#11895) 2023-03-27 11:33:11 +01:00
Stéphane Bidoul a04748db8e Remove support for the deprecated --install-options 2023-03-18 11:20:51 +01:00
Stéphane Bidoul 9d09b85452
Merge pull request #11860 from sbidoul/rm-no-binary-implies-setuptools-install-sbi
Stop `--no-binary` implying `setup.py install`
2023-03-18 11:16:24 +01:00
Filipe Laíns 1268487cba
Support passing the same key multiple times in --config-settings (#11853) 2023-03-17 21:23:19 +00:00
Tzu-ping Chung 5c3d1fed4a
Merge pull request #11698 from Darsstar/keyring-multi-choice 2023-03-15 18:07:07 +08:00
Stéphane Bidoul 5189a6e0f4 --no-binary does not imply setup.py install anymore 2023-03-12 17:18:53 +01:00
Guillaume Seguin c546c99480 Display dependency chain on each Collecting line
This tremendously helps understand why a package is being fetched and
can help investigate and fix dependency resolver backtracking issues
when incoherent constraints/package sets are provided or when new
versions of a package trigger a completely different backtracking
strategy, leading to very hard to debug situations.
2023-02-23 18:12:08 -08:00
Dos Moonen 6affad8032 Merge branch 'main' into keyring-multi-choice
# Conflicts:
#	src/pip/_internal/network/auth.py
2023-02-21 14:02:32 +01:00
Stefano Rivera 9abb3c899a
Implement `--break-system-packages` for EXTERNALLY-MANAGED installations (#11780)
The PEP 668 expects an override mechanism to ease the transition.
This provides an override.

---------

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2023-02-06 07:06:59 +00:00
Stéphane Bidoul e5c88951a0 Do not crash in presence of misformatted hash field in ``direct_url.json``. 2023-02-05 00:13:32 +01:00
Tzu-ping Chung 56e5fa3c0f
Merge pull request #11487 from pelson/feature/base-prefix-config 2023-02-01 01:40:09 +08:00
Tzu-ping Chung d325245052 Better subprocess handling 2023-01-30 09:01:02 +01:00
Dos Moonen 33cd541cc4 Make it possible to request a keyring provider: `auto`, `disabled`, `import` or `subprocess`
Refactored `_get_index_url()` to get integration tests for the subprocess backend working.

Keyring support via the 'subprocess' provider can only retrieve a password, not a username-password combo. The username therefor MUST come from the URL.
If the URL obtained from the index does not contain a username then the username from a matching index is used. `_get_index_url()` does that matching.

The problem this refactoring solves is that the URL where a wheel or sdist can be downloaded from does not always start with the index url. Azure DevOps Artifacts Feeds are an example since it replaces the friendly name of the Feed with the GUID of the Feed. Causing `url.startswith(prefix)` to evaluate as `False`.

The new behaviour is to return the index which matches the netloc and has the longest common prefix of the `path` property of the value returned by `urllib.parse.urlsplit()`. The behaviour for resolving ties is unspecified.
2023-01-30 09:00:59 +01:00
Pradyun Gedam efedf09c49
Merge pull request #11759 from pradyunsg/fix-keyring-auth
Closes https://github.com/pypa/pip/issues/11658
2023-01-29 01:36:20 +00:00
Pradyun Gedam 60a4598440
Merge pull request #11758 from pradyunsg/vendoring-update 2023-01-29 01:36:04 +00:00
Pradyun Gedam acd7ef1f9a
Perform relaxed version matching in `pip debug` test
This ensures that we're not trying to compare versions as equal strings.
2023-01-28 22:35:25 +00:00
Pradyun Gedam 17e20c746e
Correctly handle keyring auth subprocess newlines on Windows
The line endings on Windows are not required to be `\n`.
2023-01-28 22:23:16 +00:00
Pradyun Gedam b5be1da918
Merge pull request #11757 from sbidoul/inspect-and-install-reports-stable-sbi
Declare inspect and install reports formats to be stable
2023-01-28 20:36:28 +00:00
Pradyun Gedam e32ec0a8c3
Merge pull request #11679 from sbidoul/direct_url-hashes-sbi
Allow multiple hashes in direct_url.json
2023-01-28 20:36:01 +00:00
Stéphane Bidoul 126e6f67a5 Install report format declared stable 2023-01-28 14:15:04 +01:00
Stéphane Bidoul 99dddc1616 pip inspect format declared stable 2023-01-28 14:15:04 +01:00
Stéphane Bidoul 38681f3d66 Allow multiple hashes in direct_url.json
This influences the recorded direct_url.json metadata,
and therefore the pip inspect output,
as well as the pip install --report format.
2023-01-28 13:25:38 +01:00
Роман Донченко 44c1ccaf40 Replace deprecated setup/teardown usage
As explained in
<https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose>,
`setup`/`teardown` are a part of nose compatibility, which is deprecated.
You're supposed to use `setup_method` and `teardown_method` instead.
2023-01-27 22:00:50 +03:00
Tzu-ping Chung 95a58e7ba5
Merge pull request #11663 from uranusjr/pep-668 2023-01-18 11:50:26 +08:00
Tzu-ping Chung 5e5480b3bc Only exclude --dry-run when used with --report 2023-01-17 15:04:56 +08:00
Daniil Konovalenko 15b2cc993e fix mypy 2023-01-14 12:27:51 +01:00
Daniil Konovalenko ed7dbe9843 fix formatting 2023-01-14 12:27:51 +01:00
Daniil Konovalenko 8374d818ac add test 2023-01-14 12:27:51 +01:00
Tzu-ping Chung 5eda50d237 Test and news for wheel cache restoration
The fix merged in 3b60e36289 also fixed
the wheel cache; this cherry-picks the test and news from the other pull
request to validate and document the fact.
2023-01-09 10:13:19 +08:00
Tzu-ping Chung 0233bf2757 Merge link_hash back into _hashes
Commit bad03ef931 introduced the new
link_hash attribute that holds the link's hash info, but that attribute
does the same thing as _hashes, and some existing usages still populate
that old attribute. Since the plural variant covers more use cases (a
file can be hashed with multiple algorithms), we restore the old logic
that uses _hashes before the commit, and consolidate link_hash back into
that attribute.
2023-01-04 18:42:52 +08:00
Tzu-ping Chung 8fe6563050 Fall back to non-localized message on Windows
Windows does not implement LC_MESSAGES, and since PEP 668 is mainly
designed for Linux distributions, we simply take the easier way out
until someone wants an equivalent on Windows.
2023-01-03 08:13:13 +08:00
Tzu-ping Chung 6750d847a7 Add PEP 668 functional tests 2023-01-03 07:57:21 +08:00
Tzu-ping Chung 3d1937f420 Add tests for EXTERNALLY-MANAGED parser 2023-01-03 07:57:21 +08:00
William Woodruff 64fe2235d8
Merge branch 'main' into ww/restrict-egg-fragement 2022-12-28 10:44:23 -05:00
doron zarhi e59ff2fc8c show: add editable location if package is editable (#11638) 2022-12-18 01:33:57 +02:00
Tzu-ping Chung 6d1f25b222 Skip tests using custom SSL on 3.7 + Linux
This combination does not work well on CI, and since 3.7 support is on
its last days anyway, let's just ignore those tests.
2022-12-13 14:33:56 +08:00
William Woodruff d9502ff501
tests: fix comment
Signed-off-by: William Woodruff <william@trailofbits.com>
2022-12-02 21:38:51 -08:00
William Woodruff 464d16618e
src, tests: use deprecation instead of hard error for egg fragments
This turns invalid egg fragments into a soft error, with a scheduled
deprecation period of two releases.

Signed-off-by: William Woodruff <william@trailofbits.com>
2022-12-02 21:33:22 -08:00
Tzu-ping Chung 8d34a1111d
Merge branch 'main' into feature/base-prefix-config 2022-11-25 09:38:56 +08:00
William Woodruff 227fbee124
tests: add more Link tests
This exercises our expectation that egg fragments don't include version
specifiers and are evaluated eagerly.

Signed-off-by: William Woodruff <william@trailofbits.com>
2022-11-22 17:40:55 -05:00
Tzu-ping Chung 1ab22ee302
Merge pull request #11590 from uranusjr/pathlib-housekeeping 2022-11-21 09:39:21 +08:00
Miro Hrončok f7589d6ec0 Don't maintain 2 copies of change_root
The change_root function was added twice:

In ae324d1703
and in 36a9b36523
2022-11-16 13:28:17 +01:00
Tzu-ping Chung 4a87ab04c8
Merge branch 'main' into feature/base-prefix-config 2022-11-16 12:50:52 +08:00
Tzu-ping Chung afb0d13220 Fix docstring to match reality
We've moved to pathlib a while ago, the docstring still references
tests.lib.path, which no longer exists.
2022-11-11 07:43:08 +08:00
Judah Rand c04222fe47
Simplify provider interface 2022-11-10 21:25:26 +00:00
Judah Rand 8d9ea8b62f
Add tests for new code paths 2022-11-10 20:05:07 +00:00
Judah Rand 3a15e01091
Get the tests passing again 2022-11-10 19:15:07 +00:00
Paul Moore 6d131137cf
Merge pull request #11547 from uranusjr/entry-point-python-version-replacement-multi-digit
Fix multi-digit version in entry point replacement
2022-11-03 11:50:58 +00:00
Tzu-ping Chung 30b4cff198
Fix typos
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
2022-11-03 15:20:47 +08:00
Tzu-ping Chung d6e333fb63
Add 3.11 to CI (#11550) 2022-10-28 11:37:04 -05:00