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

18 commits

Author SHA1 Message Date
Shantanu
eddd9ddb66
Enable mypy's strict equality checks (#12209)
This makes mypy check more behaviours within the codebase.

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2023-09-23 17:10:13 +01:00
Stéphane Bidoul
fab8cf7479 Remove Unused "type: ignore" comments 2023-06-27 15:49:40 +02: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
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
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
Jon Dufresne
60c274be2d Complete type annotations of tests/unit/ directory 2021-09-23 05:44:54 -07:00
Jesse Rittner
d05d3c1e97 fix auth cache to allow for username in index url 2021-09-06 10:04:50 -04:00
Pradyun Gedam
94999255d5
Reformat the codebase, with black 2021-08-20 13:37:49 +01:00
Pradyun Gedam
a196b3bf01
Minor formatting tweaks (#10190)
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2021-07-24 03:55:14 +08:00
Bruno S
dca1299b18 network auth / minor changes and more tests 2021-06-01 21:14:52 +02:00
Bruno S
ff03baee67 network auth / allow username alone and fix tests 2021-06-01 09:55:35 +02:00
Jon Dufresne
09b3d3a50b Remove object from class definitions
Unnecessary since dropping Python 2 support. In Python 3, all classes
are new style classes.
2020-12-25 15:48:11 -08:00
Miro Hrončok
ba062c3ed0 When one keyring attempt fails, don't bother with more
This makes https://github.com/pypa/pip/issues/8090 much less painful.
2020-08-03 12:34:26 +02:00
gutsytechster
2276f9528c fix(network/auth): Asks for password when it is None
When `get_keyring_auth` provides the password as None, the
user should be prompt to ask password.
2020-05-15 19:41:43 +05:30
Chris Hunt
40bc4ea8fe Move network unit tests to align with subpackage names 2020-02-23 16:22:30 -05:00
Renamed from tests/unit/test_networking_auth.py (Browse further)