| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\ |
|
| |
| |
| |
| |
| | |
This release contains a critical fix for newer Poetry versions that
crashes due to "invalid" pyproject.toml syntax.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
This is designed as a script and a data file (in YAML format), and meant
to manage the RTD redirects with a version controlled file.
This makes it possible for pull requests to this repository to update
the redirects for this project's documentation (eg: for better error
urls) and for this evolution to be tracked as a part of version control
history.
|
| |
|
|
|
|
|
| |
This makes local runs of `nox -s lint` quicker while still providing
the relevant protections for checking the MANIFEST file.
|
|
|
|
| |
This is necessary to work in no-network environments like pre-commit.ci.
|
|
|
|
|
| |
This avoids modifying PRs and slows down the frequency of auto-update
pull requests.
|
|
|
|
| |
This is a step in moving linting completely to pre-commit.ci.
|
|
|
|
| |
Also fix some Mypy errors newly found with upgrade.
|
| |
|
|
|
|
| |
This makes the output easier to parse on failures in this.
|
|
|
|
| |
Co-Authored-By: q0w <43147888+q0w@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
pytest includes type annotations and is PEP-561 compliant. This helps
ensure correct pytest API usage.
This caught a misuse of pytest.mark.skipif which did not include a
boolean argument. The test is now marked "network" and no longer
skipped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tests are a large consumer of the pip API (both the internal API and
otherwise). By running mypy on tests, we help to:
1. Ensure the internal API is consistent with regards to typing
2. Ensure the tests are representative of real life scenarios as the API
are used correctly.
3. Helps to recognize unnecessary tests that simply pass junk data to
functions which can be caught by the type checker.
4. Make sure test support code in tests/lib/ is correct and consistent.
This is especially important when refactoring such code. For example, if
we were to replace tests/lib/path.py with pathlib.
As a first start, untyped defs are allowed. All existing typing issues
have been resolved. Overtime, we can chip away at untyped defs and
eventually remove the configuration option for stricter type checking of
tests.
The following changes were made to help make mypy pass:
Remove unused record_callback argument from make_wheel() in tests.
Unused since its introduction in
6d8a58f7e136df92704d2334288e4589d91a082b.
Replace toml with tomli_w in tests/functional/test_pep517.py. Unlike the
toml package, tomli_w contains inline typing annotations.
Remove unnecessary make_no_network_finder(). Unnecessary since
bab1e4f8a1a3ba5f5f08207c83a4e0a7a87ea615 where the _get_pages method was
removed.
|
| |
|
| |
|
|\
| |
| | |
Upgrade nox to remove mypy ignores
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This notably gets us on a version of mypy that uses modular typeshed:
https://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html
which allows us to have finer control over what version of stubs we pull
in from typeshed. Also contains other routine improvements to mypy.
Required a few minor typing changes.
Add flag --show-error-code so errors look like this
src/pip/_internal/network/auth.py:70: error: Incompatible types in assignment
(expression has type "None", variable has type Module) [assignment]
rather than
src/pip/_internal/network/auth.py:70: error: Incompatible types in assignment
(expression has type "None", variable has type Module)
|
| |
|
| |
|
|\
| |
| | |
Blacken src/pip/_internal/commands/
|
| |
| |
| |
| | |
Progresses the black formatting of the codebase further.
|
| |
| |
| |
| | |
Progresses the black formatting of the codebase further.
|
|\ \
| | |
| | | |
Blacken tools/
|
| |/
| |
| |
| | |
Progresses the black formatting of the codebase further.
|
|/
|
|
| |
Progresses the black formatting of the codebase further.
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
|\
| |
| | |
Drop YAML tests for the resolver
|
| |
| |
| |
| |
| | |
We've created a fairly capable setup with the new resolver tests,
which has now rendered this logic redundant and generally unnecessary.
|
|/ |
|
| |
|
|\
| |
| | |
Blacken the src/pip/_internal/distributions directory
|
| | |
|
|\ \
| |/
|/| |
Blacken src/pip/_internal/cli directory
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In autocompletion.py, the should_list_installed boolean expression was
flipped to workaround upstream black bug:
https://github.com/psf/black/issues/1629
The bug makes black fail to stabilize formatting when the list isn't the
last piece of the expression.
|
|\ \
| | |
| | | |
Blacken src/pip/_internal/utils directory
|
| |/ |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allows removing a "mypy: disallow-untyped-defs=False" comment.
To workaround a mypy bug, map(os.path.basename, distribution_files) was
changed to use a generator expression. See:
https://github.com/python/mypy/issues/9864
To verify correct usage of the nox API, it is now a dependency during
pre-commit mypy runs.
The mypy configuration "follow_imports = silent" allowed erroneous code
to pass, so it has been removed. Now, all imports must be available
during type.
|
|
|
|
| |
Taking advantage of pre-commit's manual stage.
|