Commit Graph

32 Commits

Author SHA1 Message Date
Stéphane Bidoul b3d348d6e7
Merge remote-tracking branch 'upstream/master' into 7969-revert-sbi 2020-12-27 17:01:58 +01:00
Stéphane Bidoul eda67075c1
Revert "Create call_subprocess just for vcs commands"
This reverts commit 8adbc216a6.
2020-12-27 16:54:56 +01:00
Tzu-ping Chung 41a30089de Re-apply invalid metadata skip
Skip candidate not providing valid metadata

This reverts commit 7165ab8cb9.
2020-12-27 04:16:24 +08:00
Jon Dufresne cdcf74fb8e Use f-strings for simple string formatting
Use pyupgrade to convert simple string formatting to use f-string
syntax. pyupgrade is intentionally timid and will not create an f-string
if it would make the expression longer or if the substitution parameters
are anything but simple names or dotted names.
2020-12-25 16:21:20 -08:00
Pradyun Gedam f91ba6b348
Merge pull request #9354 from jdufresne/super
Use short Python3 super() syntax
2020-12-25 19:18:28 +00:00
Jon Dufresne 5e11687cbd Replace typing.Text with str
Using typing.Text is unnecessary since dropping Python 2 support.

In Python 3, typing.Text is a simple alias of str. It exists as a
backward compatibility shim for Python 2.
2020-12-24 16:40:55 -08:00
Jon Dufresne c148bcc1aa Use short Python3 super() syntax 2020-12-24 15:11:51 -08:00
Jon Dufresne f32adaf09b Remove __future__ imports
Unnecessary since dropping Python 2.
2020-12-24 08:38:09 -08:00
Hugo van Kemenade 817ee23051 Remove redundant Python 2.7 code 2020-12-22 09:06:26 +02:00
Pradyun Gedam 7165ab8cb9
Revert "Skip candidate not providing valid metadata" 2020-12-15 10:17:20 +00:00
Tzu-ping Chung d45541c8f3 Skip candidate not providing valid metadata
This is done by catching InstallationError from the underlying
distribution preparation logic. There are three cases to catch:

1. Candidates from indexes. These are simply ignored since we can
   potentially satisfy the requirement with other candidates.
2. Candidates from URLs with a dist name (PEP 508 or #egg=). A new
   UnsatisfiableRequirement class is introduced to represent this; it is
   like an ExplicitRequirement without an underlying candidate. As the
   name suggests, an instance of this can never be satisfied, and will
   cause eventual backtracking.
3. Candidates from URLs without a dist name. This is only possible for
   top-level user requirements, and no recourse is possible for them. So
   we error out eagerly.

The InstallationError raised during distribution preparation is cached
in the factory, like successfully prepared candidates, since we don't
want to repeatedly try to build a candidate if we already know it'd
fail. Plus pip's preparation logic also does not allow packages to be
built multiple times anyway.
2020-12-12 02:23:32 +08:00
Nguyễn Gia Phong cf6ecab627 Bump mypy to 0.790 for Python 3.9 compat
HashError.order is now annotated as an int to allow
HashErrors.errors.sort(key=lambda e: e.order).  Alternatively we can
define a function which assert e is not None but I prefer the more
concise version, since we never raise HashError directly anyway.
2020-10-12 17:37:55 +07:00
Pradyun Gedam 25ab172b55
Update linter: isort 2020-09-23 19:52:28 +05:30
Prashant Sharma 07e8712677
reformat(pip/_internal): Resolve lint errors 2020-07-09 15:15:01 +05:30
gutsytechster 8c267e6e39
feat(pip/_internal/*): Use custom raise_for_status method 2020-07-08 18:08:55 +05:30
Tzu-ping Chung e4f870ba25 Raise proper exceptions on metadata mismatch 2020-06-03 03:52:07 +08:00
Stéphane Bidoul 69a4cb3eed
Merge pull request #8296 from deveshks/mypy-pip-internal
Complete type annotations in "pip._internal.{build_env,self_outdated_check,exceptions}"
2020-05-31 18:46:31 +02:00
Devesh Kumar Singh 5c24a1eaee Remove redundant variable annotations 2020-05-30 15:53:19 +05:30
Devesh Kumar Singh 8adbc216a6 Create call_subprocess just for vcs commands 2020-05-23 19:13:13 +05:30
Devesh Kumar Singh 4fbe61af3a Update message type to configparser.Error 2020-05-23 14:29:26 +05:30
Devesh Kumar Singh 3c1ad45370 Type annotations for pip._internal.exceptions 2020-05-22 10:47:16 +05:30
Tzu-ping Chung 6db0df928c Move wheel cache out of InstallRequirment 2020-03-30 17:36:03 +08:00
Anudit Nagar 082c0f01d2
Update old-style formatting to new-style formatting (#7762) 2020-02-21 21:48:14 +05:30
Deepak Sharma d31cf696e8 string_formatting 2020-01-30 20:33:00 +05:30
Maxim Kurnikov 3692097cca add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
Albert Tugushev c6e9a9eab4 Remove unused assignment 2019-09-28 01:46:04 +03:00
Chris Jerdonek cd5bd2cd52 Improve error message if METADATA or PKG-INFO metadata is None. 2019-05-26 12:35:07 -07:00
Maxim Kurnikov f77b8ca051 remove #noqa: F401 2019-02-22 14:17:07 +03:00
Pradyun Gedam 22fe45d462
Fix new issues found in mypy 0.620 -> 0.650 2018-12-18 11:20:14 +05:30
Pradyun Gedam be5f4afcfc
Fix inconsistencies in mypy annotations 2018-12-17 23:56:00 +05:30
Pradyun Gedam 6a18c24803
Show error messages when configuration-related errors occur 2018-09-20 11:18:22 +05:30
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Renamed from pip/exceptions.py (Browse further)