summaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorDos Moonen <d.moonen@nki.nl>2022-12-15 12:19:15 +0100
committerDos Moonen <d.moonen@nki.nl>2023-01-30 09:00:59 +0100
commit33cd541cc49b112753841c7937427bf0fe18e197 (patch)
tree74c474024d0772287e8c161f927fc5da6d8b1eae /.pre-commit-config.yaml
parenta2a4feb588edc7233ae262d76b2c7291d6857a31 (diff)
downloadpip-33cd541cc49b112753841c7937427bf0fe18e197.tar.gz
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.
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml2
1 files changed, 1 insertions, 1 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a49016eed..0fb3a836b 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -47,7 +47,7 @@ repos:
additional_dependencies: [
'keyring==23.0.1',
'nox==2021.6.12',
- 'pytest==7.1.1',
+ 'pytest',
'types-docutils==0.18.3',
'types-setuptools==57.4.14',
'types-freezegun==1.1.9',