Commit Graph

11211 Commits

Author SHA1 Message Date
Stéphane Bidoul 05a127da20
Merge pull request #9414 from jdufresne/consume
Remove unused utility function consume()
2021-01-02 11:43:55 +01:00
Jon Dufresne 004b2cf9a8 Remove unused utility function consume()
Unused since e706af20fe.
2021-01-01 16:07:53 -08:00
Stéphane Bidoul 062f0e54d9
Merge pull request #9401 from jdufresne/ne
Remove unnecessary __ne__ definitions
2021-01-01 19:38:09 +01:00
Stéphane Bidoul 35604e5a4c
Merge pull request #9403 from jdufresne/get-revision
Harmonize return type of VersionControl.get_revision in subclasses
2021-01-01 19:36:20 +01:00
Stéphane Bidoul df6ac53382
Merge pull request #9406 from sbidoul/simplify-check_binary_allowed-sbi
Simplify check_binary_allowed
2021-01-01 19:33:13 +01:00
Stéphane Bidoul a61cb200b5
Merge pull request #9408 from jdufresne/setup-no-remote
Handle ._get_svn_url_rev() returning None in .get_remote_url()
2021-01-01 19:32:21 +01:00
Jon Dufresne ca053fbe88 Handle ._get_svn_url_rev() returning None in .get_remote_url()
The method Subversion._get_svn_url_rev() will sometimes return None for
a remote URL. The calling code should handle this. If it is None, raise
a RemoteNotFoundError as prescribed by the parent class docstring.

Followup to 0b761a164c.
2020-12-31 14:36:58 -08:00
Stéphane Bidoul 06f1eff024
Simplify check_binary_allowed
check_binary_allowed is only used to check
if a wheel needs to be built in 'pip install' mode.
It mixed format control and pep517 mode check.

We change it so it checks allowed formats only,
which leads to better readability of _should_build().
2020-12-31 13:17:44 +01:00
Jon Dufresne c513c5e890 Harmonize return type of VersionControl.get_revision in subclasses
Previously, the Subversion subclass violated the parent's type signature
by returning an int, but it is now coerced to a str to match the
expected signature.
2020-12-30 11:25:29 -08:00
Jon Dufresne a49f1732e9 Remove unnecessary __ne__ definitions
Unnecessary since dropping Python 2 support. In Python 3, `__ne__`
defaults to the opposite of of `__eq__`.

https://docs.python.org/3/reference/datamodel.html#object.__ne__

> For `__ne__()`, by default it delegates to `__eq__()` and inverts the
> result unless it is `NotImplemented`.
2020-12-30 08:23:04 -08:00
Pradyun Gedam 7369ac2ee8
Merge pull request #9396 from jdufresne/expanduser
Replace compat.expanduser() with os.path.expanduser()
2020-12-29 19:06:36 +00:00
Jon Dufresne 5150129f6b Replace compat.expanduser() with os.path.expanduser()
The upstream bug has been fixed and released in all supported Python
version: https://bugs.python.org/issue14768
2020-12-29 08:15:55 -08:00
Pradyun Gedam af5b7fe1f9
Merge pull request #9390 from jdufresne/noqa
Remove unnecessary "noqa" comments
2020-12-29 09:01:17 +00:00
Pradyun Gedam 914b7c2165
Merge pull request #9389 from jdufresne/copy-tree-kwargs
Remove unused class CopytreeKwargs
2020-12-29 08:57:42 +00:00
Pradyun Gedam 193267b417
Merge pull request #9392 from jdufresne/version-cand
Remove unused type VersionCandidate
2020-12-29 08:57:22 +00:00
Jon Dufresne 133e146a88 Remove unused type VersionCandidate
Unused since 6a8956d7a8.
2020-12-28 19:18:20 -08:00
Jon Dufresne b78f71216f Remove unnecessary "noqa" comments 2020-12-28 18:19:09 -08:00
Jon Dufresne 4bfe1037ee Remove unused class CopytreeKwargs
Unused since d509a27ad4.
2020-12-28 17:07:56 -08:00
Pradyun Gedam 7edb8ebfee
Merge pull request #9387 from hugovk/test-feature-branch
GitHub Actions: Allow testing of feature branches
2020-12-28 22:55:33 +00:00
Hugo van Kemenade cc00f8ac71 Allow testing of feature branches 2020-12-28 18:36:03 +02:00
Pradyun Gedam 67c03c3e81
Merge pull request #9382 from jdufresne/colorama-import
Remove outdated mypy workaround for colorama import
2020-12-28 07:46:51 +00:00
Pradyun Gedam adca454611
Merge pull request #9385 from jdufresne/named-temp-file
Remove unnecessary type override NamedTemporaryFileResult
2020-12-28 07:36:22 +00:00
Pradyun Gedam bad26fb5fe
Merge pull request #9379 from jdufresne/pypy-locations
Remove outdated PyPy workaround for site_packages location
2020-12-28 07:35:06 +00:00
Jon Dufresne 089bbcb939 Remove unnecessary type override NamedTemporaryFileResult
The object returned by NamedTemporaryFile delegates all functions calls
to the underlying file so can avoid the type override by relying on IO
methods.
2020-12-27 17:19:28 -08:00
Jon Dufresne 9109e1ccde Remove outdated mypy workaround for colorama import 2020-12-27 13:15:27 -08:00
Jon Dufresne bd0c1f5d4c Remove outdated PyPy workaround for site_packages location
Upstream issue has been resolved and released on Python versions
supported by pip:
https://foss.heptapod.net/pypy/pypy/-/issues/2506
2020-12-27 12:16:28 -08:00
Pradyun Gedam 97b2b0cdee
Merge pull request #9376 from jdufresne/fake-file
Remove unnecessary class FakeFile
2020-12-27 18:31:26 +00:00
Jon Dufresne 8a9fea7434 Remove unnecessary class FakeFile
The class was being used in a single place, passed to csv.reader().
However, per the docs, csv.reader() can handle a list of str objects.

https://docs.python.org/3/library/csv.html#csv.reader

> csvfile can be any object which supports the iterator protocol and
> returns a string each time its __next__() method is called — file
> objects and list objects are both suitable.
2020-12-27 09:26:15 -08:00
Pradyun Gedam 36602b7977
Merge pull request #9374 from jdufresne/csv23
Drop csv23 and enum34 in favor of stdlib
2020-12-27 17:05:54 +00:00
Jon Dufresne 3cfb0ca1e8 Drop enum34 in favor of stdlib enum
Using enum34 has been unnecessary since dropping Python 2 support. It
previously remained as a compatibility shim.
2020-12-27 08:10:20 -08:00
Jon Dufresne 14380668b5 Drop csv23 in favor of stdlib csv
Using csv23 has been unnecessary since dropping Python 2 support. It
previously remained as a compatibility shim.
2020-12-27 08:09:32 -08:00
Pradyun Gedam 609d9d4a68
Merge pull request #9371 from hugovk/tidy-urllib-imports
Clean up urllib imports
2020-12-27 15:34:09 +00:00
Pradyun Gedam 22b387a8ed
Merge pull request #9369 from uranusjr/resolvelib-054 2020-12-27 15:26:43 +00:00
Tzu-ping Chung 92b90ea7e9 Split news into two sections 2020-12-27 22:25:34 +08:00
Hugo van Kemenade a3e246f7d0 Cleanup: replace 'from urllib import xyz as urllib_xyz' with import urllib.xyz 2020-12-27 16:18:44 +02:00
Tzu-ping Chung 6a438bdc93 Upgrade vendored resolvelib to 0.5.4 2020-12-27 20:23:07 +08:00
Pradyun Gedam 5ccd226df8
Merge pull request #9364 from jdufresne/oserror
Use unified OSError and its subclasses
2020-12-27 12:15:41 +00:00
Pradyun Gedam 7e609a058e
Merge pull request #9315 from pradyunsg/better-search-errors 2020-12-27 11:59:44 +00:00
Pradyun Gedam 2aea6e8d0c
Merge pull request #9289 from uranusjr/new-resolver-lazy-insert 2020-12-27 11:41:55 +00:00
Tzu-ping Chung 2a25452542 Add docstring to emphasise laziness 2020-12-27 04:17:26 +08:00
Tzu-ping Chung 8e55757a2f Lazy-evaluate candidates with installed inserted 2020-12-27 04:17:26 +08:00
Tzu-ping Chung 92ad717612 New resolver incorrectly tries unneeded candidates
When the new resolver needs to upgrade a package, it puts the
already-installed package in the middle of the candidate list obtained
from indexes. But when doing it, the candidate list is eagerly consumed,
causing pip to download all candidates.
2020-12-27 04:16:29 +08: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 d282fb94a3 Use unified OSError and its subclasses
Since Python 3.3, the following classes have merged into OSError. They
remain as aliases for backward compatibility.

- EnvironmentError
- IOError
- WindowsError

https://docs.python.org/3/library/exceptions.html#OSError

Python 3 also has subclasses of OSError to help identify more specific
errors. For example, FileNotFoundError. This allows simplifying some
except blocks.
2020-12-26 12:16:09 -08:00
Pradyun Gedam 2fb341aac7
Merge pull request #9365 from jdufresne/yield-from
Use "yield from" syntax
2020-12-26 16:35:58 +00:00
Jon Dufresne 14ebb03997 Use "yield from" syntax
Available since Python 3.3.

https://docs.python.org/3/whatsnew/3.3.html#pep-380
2020-12-26 07:04:58 -08:00
Pradyun Gedam c383ec3b41
Merge pull request #9172 from webknjaz/docs/unreleased-change-fragments-preview
Add a preview for the "next release" change notes
2020-12-26 10:50:10 +00:00
Pradyun Gedam a48ad5385b
Merge pull request #9352 from jdufresne/io-codecs-open
Replace io.open() and codecs.open() with builtin open()
2020-12-26 10:24:47 +00:00
Pradyun Gedam 86afa89043
Merge pull request #9361 from jdufresne/f-strings
Use f-strings for simple string formatting
2020-12-26 10:24:18 +00:00
Pradyun Gedam fecfa11f5a
Merge pull request #9359 from jdufresne/get-remote-url
Harmonize type signature of VersionControl.get_remote_url() subclasses
2020-12-26 10:23:39 +00:00