Skip to content

Commit d0f6cf7

Browse files
committed
Merge branch 'master' of https://github.com/pypa/pip into issue-6222
2 parents 714e7d1 + 402b468 commit d0f6cf7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2324
-2704
lines changed

.github/workflows/python-linters.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Code quality
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
# Run every Friday at 18:02 UTC
8+
# https://crontab.guru/#2_18_*_*_5
9+
- cron: 2 18 * * 5
10+
11+
jobs:
12+
linters:
13+
name: 🤖
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
# max-parallel: 5
17+
matrix:
18+
os:
19+
- ubuntu-18.04
20+
env:
21+
- TOXENV: docs
22+
- TOXENV: lint
23+
- TOXENV: lint-py2
24+
PYTHON_VERSION: 2.7
25+
- TOXENV: mypy
26+
- TOXENV: packaging
27+
steps:
28+
- uses: actions/checkout@master
29+
- name: Set up Python ${{ matrix.env.PYTHON_VERSION || 3.7 }}
30+
uses: actions/setup-python@v1
31+
with:
32+
version: ${{ matrix.env.PYTHON_VERSION || 3.7 }}
33+
- name: Pre-configure global Git settings
34+
run: >-
35+
tools/travis/setup.sh
36+
- name: Update setuptools and tox dependencies
37+
run: >-
38+
tools/travis/install.sh
39+
- name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}'
40+
run: >-
41+
python -m tox --notest --skip-missing-interpreters false
42+
env: ${{ matrix.env }}
43+
- name: Test with tox
44+
run: >-
45+
python -m tox
46+
env: ${{ matrix.env }}

docs/html/development/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ or the `pypa-dev mailing list`_, to ask questions or get involved.
1414

1515
getting-started
1616
contributing
17+
issue-triage
1718
architecture/index
1819
release-process
1920
vendoring-policy
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.. note::
2+
This section of the documentation is currently being written. pip
3+
developers welcome your help to complete this documentation. If you're
4+
interested in helping out, please let us know in the
5+
`tracking issue <https://github.com/pypa/pip/issues/6583>`__.
6+
7+
============
8+
Issue Triage
9+
============
10+
11+
This serves as an introduction to issue tracking in pip as well as
12+
how to help triage reported issues.
13+
14+
15+
Issue Tracker
16+
*************
17+
18+
The `pip issue tracker <https://github.com/pypa/pip/issues>`__ is hosted on
19+
GitHub alongside the project.
20+
21+
Currently, the issue tracker is used for bugs, feature requests, and general
22+
user support.
23+
24+
In the pip issue tracker, we make use of labels and milestones to organize and
25+
track work.

docs/html/reference/pip_install.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ pip supports installing from a package index using a :term:`requirement
244244
specifier <pypug:Requirement Specifier>`. Generally speaking, a requirement
245245
specifier is composed of a project name followed by optional :term:`version
246246
specifiers <pypug:Version Specifier>`. :pep:`508` contains a full specification
247-
of the format of a requirement (pip does not support the ``url_req`` form
248-
of specifier at this time).
247+
of the format of a requirement.
249248

250249
Some examples:
251250

@@ -265,6 +264,13 @@ Since version 6.0, pip also supports specifiers containing `environment markers
265264
SomeProject ==5.4 ; python_version < '2.7'
266265
SomeProject; sys_platform == 'win32'
267266

267+
Since version 19.1, pip also supports `direct references
268+
<https://www.python.org/dev/peps/pep-0440/#direct-references>`__ like so:
269+
270+
::
271+
272+
SomeProject @ file:///somewhere/...
273+
268274
Environment markers are supported in the command line and in requirements files.
269275

270276
.. note::
@@ -880,6 +886,14 @@ Examples
880886
$ pip install http://my.package.repo/SomePackage-1.0.4.zip
881887

882888

889+
#. Install a particular source archive file following :pep:`440` direct references.
890+
891+
::
892+
893+
$ pip install SomeProject==1.0.4@http://my.package.repo//SomeProject-1.2.3-py33-none-any.whl
894+
$ pip install "SomeProject==1.0.4 @ http://my.package.repo//SomeProject-1.2.3-py33-none-any.whl"
895+
896+
883897
#. Install from alternative package repositories.
884898

885899
Install from a different index, and not `PyPI`_ ::

news/4910.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``rmtree_errorhandler`` to skip non-existing directories.

news/6202.bugfix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix requirement line parser to correctly handle PEP 440 requirements with a URL
2+
pointing to an archive file.

news/6892.bugfix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Correctly uninstall symlinks that were installed in a virtualenv,
2+
by tools such as ``flit install --symlink``.

news/6952-gh-actions--linters.trivial

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a GitHub Actions workflow running all linters.

news/6954.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Don't use hardlinks for locking selfcheck state file.

news/6991.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ignore "require_virtualenv" in `pip config`

news/7037.removal

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Remove undocumented support for http:// requirements pointing to SVN
2+
repositories.

news/deprecated-yield-fixture.trivial

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Use normal ``fixture`` instead of ``yield_fixture``.
2+
It's been deprecated in pytest since 2.10 version.

news/lockfile.vendor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove Lockfile as a vendored dependency.

src/pip/_internal/cli/cmdoptions.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
from pip._internal.locations import USER_CACHE_DIR, get_src_prefix
2525
from pip._internal.models.format_control import FormatControl
2626
from pip._internal.models.index import PyPI
27-
from pip._internal.models.search_scope import SearchScope
2827
from pip._internal.models.target_python import TargetPython
2928
from pip._internal.utils.hashes import STRONG_HASHES
30-
from pip._internal.utils.misc import redact_auth_from_url
3129
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
3230
from pip._internal.utils.ui import BAR_TYPES
3331

@@ -359,30 +357,6 @@ def find_links():
359357
)
360358

361359

362-
def make_search_scope(options, suppress_no_index=False):
363-
# type: (Values, bool) -> SearchScope
364-
"""
365-
:param suppress_no_index: Whether to ignore the --no-index option
366-
when constructing the SearchScope object.
367-
"""
368-
index_urls = [options.index_url] + options.extra_index_urls
369-
if options.no_index and not suppress_no_index:
370-
logger.debug(
371-
'Ignoring indexes: %s',
372-
','.join(redact_auth_from_url(url) for url in index_urls),
373-
)
374-
index_urls = []
375-
376-
# Make sure find_links is a list before passing to create().
377-
find_links = options.find_links or []
378-
379-
search_scope = SearchScope.create(
380-
find_links=find_links, index_urls=index_urls,
381-
)
382-
383-
return search_scope
384-
385-
386360
def trusted_host():
387361
# type: () -> Option
388362
return Option(

src/pip/_internal/cli/req_command.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from functools import partial
1010

1111
from pip._internal.cli.base_command import Command
12-
from pip._internal.cli.cmdoptions import make_search_scope
1312
from pip._internal.cli.command_context import CommandContextMixIn
1413
from pip._internal.download import PipSession
1514
from pip._internal.exceptions import CommandError
@@ -24,7 +23,7 @@
2423
)
2524
from pip._internal.req.req_file import parse_requirements
2625
from pip._internal.utils.misc import normalize_path
27-
from pip._internal.utils.outdated import pip_version_check
26+
from pip._internal.utils.outdated import make_link_collector, pip_version_check
2827
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
2928

3029
if MYPY_CHECK_RUNNING:
@@ -283,7 +282,7 @@ def _build_package_finder(
283282
:param ignore_requires_python: Whether to ignore incompatible
284283
"Requires-Python" values in links. Defaults to False.
285284
"""
286-
search_scope = make_search_scope(options)
285+
link_collector = make_link_collector(session, options=options)
287286
selection_prefs = SelectionPreferences(
288287
allow_yanked=True,
289288
format_control=options.format_control,
@@ -293,8 +292,7 @@ def _build_package_finder(
293292
)
294293

295294
return PackageFinder.create(
296-
search_scope=search_scope,
295+
link_collector=link_collector,
297296
selection_prefs=selection_prefs,
298-
session=session,
299297
target_python=target_python,
300298
)

0 commit comments

Comments
 (0)