Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pypa/pip into issue-6222
Browse files Browse the repository at this point in the history
  • Loading branch information
seppeljordan committed Sep 22, 2019
2 parents 714e7d1 + 402b468 commit d0f6cf7
Show file tree
Hide file tree
Showing 72 changed files with 2,324 additions and 2,704 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/python-linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Code quality

on:
push:
pull_request:
schedule:
# Run every Friday at 18:02 UTC
# https://crontab.guru/#2_18_*_*_5
- cron: 2 18 * * 5

jobs:
linters:
name: 🤖
runs-on: ${{ matrix.os }}
strategy:
# max-parallel: 5
matrix:
os:
- ubuntu-18.04
env:
- TOXENV: docs
- TOXENV: lint
- TOXENV: lint-py2
PYTHON_VERSION: 2.7
- TOXENV: mypy
- TOXENV: packaging
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.env.PYTHON_VERSION || 3.7 }}
uses: actions/setup-python@v1
with:
version: ${{ matrix.env.PYTHON_VERSION || 3.7 }}
- name: Pre-configure global Git settings
run: >-
tools/travis/setup.sh
- name: Update setuptools and tox dependencies
run: >-
tools/travis/install.sh
- name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}'
run: >-
python -m tox --notest --skip-missing-interpreters false
env: ${{ matrix.env }}
- name: Test with tox
run: >-
python -m tox
env: ${{ matrix.env }}
1 change: 1 addition & 0 deletions docs/html/development/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ or the `pypa-dev mailing list`_, to ask questions or get involved.

getting-started
contributing
issue-triage
architecture/index
release-process
vendoring-policy
Expand Down
25 changes: 25 additions & 0 deletions docs/html/development/issue-triage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. note::
This section of the documentation is currently being written. pip
developers welcome your help to complete this documentation. If you're
interested in helping out, please let us know in the
`tracking issue <https://github.com/pypa/pip/issues/6583>`__.

============
Issue Triage
============

This serves as an introduction to issue tracking in pip as well as
how to help triage reported issues.


Issue Tracker
*************

The `pip issue tracker <https://github.com/pypa/pip/issues>`__ is hosted on
GitHub alongside the project.

Currently, the issue tracker is used for bugs, feature requests, and general
user support.

In the pip issue tracker, we make use of labels and milestones to organize and
track work.
18 changes: 16 additions & 2 deletions docs/html/reference/pip_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ pip supports installing from a package index using a :term:`requirement
specifier <pypug:Requirement Specifier>`. Generally speaking, a requirement
specifier is composed of a project name followed by optional :term:`version
specifiers <pypug:Version Specifier>`. :pep:`508` contains a full specification
of the format of a requirement (pip does not support the ``url_req`` form
of specifier at this time).
of the format of a requirement.

Some examples:

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

Since version 19.1, pip also supports `direct references
<https://www.python.org/dev/peps/pep-0440/#direct-references>`__ like so:

::

SomeProject @ file:///somewhere/...

Environment markers are supported in the command line and in requirements files.

.. note::
Expand Down Expand Up @@ -880,6 +886,14 @@ Examples
$ pip install http://my.package.repo/SomePackage-1.0.4.zip


#. Install a particular source archive file following :pep:`440` direct references.

::

$ pip install SomeProject==1.0.4@http://my.package.repo//SomeProject-1.2.3-py33-none-any.whl
$ pip install "SomeProject==1.0.4 @ http://my.package.repo//SomeProject-1.2.3-py33-none-any.whl"


#. Install from alternative package repositories.

Install from a different index, and not `PyPI`_ ::
Expand Down
1 change: 1 addition & 0 deletions news/4910.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ``rmtree_errorhandler`` to skip non-existing directories.
2 changes: 2 additions & 0 deletions news/6202.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix requirement line parser to correctly handle PEP 440 requirements with a URL
pointing to an archive file.
2 changes: 2 additions & 0 deletions news/6892.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Correctly uninstall symlinks that were installed in a virtualenv,
by tools such as ``flit install --symlink``.
1 change: 1 addition & 0 deletions news/6952-gh-actions--linters.trivial
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a GitHub Actions workflow running all linters.
1 change: 1 addition & 0 deletions news/6954.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't use hardlinks for locking selfcheck state file.
1 change: 1 addition & 0 deletions news/6991.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ignore "require_virtualenv" in `pip config`
2 changes: 2 additions & 0 deletions news/7037.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Remove undocumented support for http:// requirements pointing to SVN
repositories.
2 changes: 2 additions & 0 deletions news/deprecated-yield-fixture.trivial
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Use normal ``fixture`` instead of ``yield_fixture``.
It's been deprecated in pytest since 2.10 version.
1 change: 1 addition & 0 deletions news/lockfile.vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove Lockfile as a vendored dependency.
26 changes: 0 additions & 26 deletions src/pip/_internal/cli/cmdoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
from pip._internal.locations import USER_CACHE_DIR, get_src_prefix
from pip._internal.models.format_control import FormatControl
from pip._internal.models.index import PyPI
from pip._internal.models.search_scope import SearchScope
from pip._internal.models.target_python import TargetPython
from pip._internal.utils.hashes import STRONG_HASHES
from pip._internal.utils.misc import redact_auth_from_url
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
from pip._internal.utils.ui import BAR_TYPES

Expand Down Expand Up @@ -359,30 +357,6 @@ def find_links():
)


def make_search_scope(options, suppress_no_index=False):
# type: (Values, bool) -> SearchScope
"""
:param suppress_no_index: Whether to ignore the --no-index option
when constructing the SearchScope object.
"""
index_urls = [options.index_url] + options.extra_index_urls
if options.no_index and not suppress_no_index:
logger.debug(
'Ignoring indexes: %s',
','.join(redact_auth_from_url(url) for url in index_urls),
)
index_urls = []

# Make sure find_links is a list before passing to create().
find_links = options.find_links or []

search_scope = SearchScope.create(
find_links=find_links, index_urls=index_urls,
)

return search_scope


def trusted_host():
# type: () -> Option
return Option(
Expand Down
8 changes: 3 additions & 5 deletions src/pip/_internal/cli/req_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from functools import partial

from pip._internal.cli.base_command import Command
from pip._internal.cli.cmdoptions import make_search_scope
from pip._internal.cli.command_context import CommandContextMixIn
from pip._internal.download import PipSession
from pip._internal.exceptions import CommandError
Expand All @@ -24,7 +23,7 @@
)
from pip._internal.req.req_file import parse_requirements
from pip._internal.utils.misc import normalize_path
from pip._internal.utils.outdated import pip_version_check
from pip._internal.utils.outdated import make_link_collector, pip_version_check
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

if MYPY_CHECK_RUNNING:
Expand Down Expand Up @@ -283,7 +282,7 @@ def _build_package_finder(
:param ignore_requires_python: Whether to ignore incompatible
"Requires-Python" values in links. Defaults to False.
"""
search_scope = make_search_scope(options)
link_collector = make_link_collector(session, options=options)
selection_prefs = SelectionPreferences(
allow_yanked=True,
format_control=options.format_control,
Expand All @@ -293,8 +292,7 @@ def _build_package_finder(
)

return PackageFinder.create(
search_scope=search_scope,
link_collector=link_collector,
selection_prefs=selection_prefs,
session=session,
target_python=target_python,
)
Loading

0 comments on commit d0f6cf7

Please sign in to comment.