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
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
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
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
Tzu-ping Chung
8e55757a2f
Lazy-evaluate candidates with installed inserted
2020-12-27 04:17:26 +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
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
Pradyun Gedam
7407bc1e8a
Merge pull request #9353 from ichard26/fix_broken_mailto_link
...
Fix broken email link in docs feedback banners
2020-12-26 10:21:59 +00:00
Pradyun Gedam
31eb524ff0
Merge pull request #9351 from jdufresne/object
...
Remove object from class definitions
2020-12-26 10:21:40 +00:00
Pradyun Gedam
49c898e4b6
Merge pull request #9358 from jdufresne/uses-fragment
...
Remove Python 2 compatibility shim for urlparse.uses_fragment
2020-12-26 10:21:09 +00:00
Pradyun Gedam
7a6b1a5805
Merge pull request #9357 from jdufresne/ipaddress
...
Replace vendored ipaddress with stdlib
2020-12-26 10:20:18 +00:00
Pradyun Gedam
3977babbab
Merge pull request #9362 from jdufresne/str-call-literal
...
Remove unnecessary str() call around str literal
2020-12-26 09:21:21 +00:00
Pradyun Gedam
fe741a2610
Merge pull request #9360 from jdufresne/json-decode-error
...
Remove Python 2 compatibility shim for json.JSONDecodeError
2020-12-26 09:20:42 +00:00
Pradyun Gedam
4e48ba838b
Merge pull request #9356 from jdufresne/lru-cache
...
Replace utils.compat.lru_cache with stdlib functools.lru_cache
2020-12-26 09:20:20 +00:00
Jon Dufresne
1f9d6e4aea
Remove unnecessary str() call around str literal
...
Unnecessary since dropping Python 2.
2020-12-25 16:52:35 -08:00
Jon Dufresne
07ddf66f65
Remove Python 2 compatibility shim for json.JSONDecodeError
...
JSONDecodeError has been available since Python 3.5.
https://docs.python.org/3/library/json.html#json.JSONDecodeError
2020-12-25 16:28:53 -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
Jon Dufresne
a1fff4a080
Replace io.open() and codecs.open() with builtin open()
...
In Python 3, these are functionally equivalent and share the same
feature set.
2020-12-25 15:53:08 -08:00
Jon Dufresne
09b3d3a50b
Remove object from class definitions
...
Unnecessary since dropping Python 2 support. In Python 3, all classes
are new style classes.
2020-12-25 15:48:11 -08:00
Jon Dufresne
0b761a164c
Harmonize type signature of VersionControl.get_remote_url() subclasses
...
In the base class, the signature is defined as:
type: (str) -> str
Further, the docstring says:
Raises RemoteNotFoundError if the repository does not have a remote
url configured.
However, some subclasses were returning None instead of raising
RemoteNotFoundError. This violated the type signature and forced calling
code to handle multiple error paradigms.
Now, all subclasses implement the base's signature.
This allowed simplifying some call sites as they can assume None will
not be returned.
This mismatch was noticed while trying to remove "mypy:
disallow-untyped-defs=False" comments.
2020-12-25 13:45:17 -08:00
Jon Dufresne
7e3fe0c84e
Remove Python 2 compatibility shim for urlparse.uses_fragment
...
This attribute (now urllib.parse.uses_fragment) is unused by the stdlib
and remains only for backwards compatibility. See the comment:
https://github.com/python/cpython/blob/v3.6.0/Lib/urllib/parse.py#L55-L63
2020-12-25 11:48:38 -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
17d72b748f
Replace utils.compat.lru_cache with stdlib functools.lru_cache
...
The stdlib version has been available since Python 3.2.
2020-12-25 08:51:15 -08:00
Jon Dufresne
653f12b5e7
Replace vendored ipaddress with stdlib
...
The vendored copy is unnecessary since dropping Python 2 support. The
module has been available in the stdlib since Python 3.3.
2020-12-25 08:47:38 -08:00
Jon Dufresne
2e38024991
Drop u prefix from str literals
...
Unnecessary since dropping Python 2 support.
This makes one test case from test_str_to_display a duplicate and so has
been removed.
2020-12-25 07:26:06 -08: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
Richard Si
a61586cdcf
Fix broken email link in docs feedback banners
...
'docs-feedback+ux/pip.pypa.io@pypa.io' isn't a valid email address, so
I replaced it with the right email address according to this GitHub
comment:
https://github.com/pypa/pip/issues/8783#issuecomment-685823974
2020-12-24 18:07:15 -05: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
e6d2bb2341
📰
2020-12-21 19:10:19 +00:00
Pradyun Gedam
be9637f7f5
Merge pull request #9189 from pradyunsg/drop-old-python-support
...
Drop support for Python 2.7 and Python 3.5
2020-12-20 18:57:41 +00:00
Pradyun Gedam
c7a72060ba
📰
2020-12-20 12:03:14 +00:00
Nikita Chepanov
f8b03eefe2
Add `--ignore-requires-python` support to pip download
2020-12-17 12:40:01 -05:00
Pradyun Gedam
a387de10d8
Bump for release
2020-12-15 15:21:16 +00:00
Pradyun Gedam
95c3ae32a3
📰
2020-12-15 14:17:29 +00:00
Pradyun Gedam
e1fded5780
Bump for release
2020-12-15 01:45:06 +00:00
gpiks
6b2ccdd10d
Update packaging to version 20.8
...
To account for Python 3.10, update the packaging version to 20.8.
2020-12-14 14:12:47 -05:00
Sumana Harihareswara
df7a97f3bc
docs: Fix small style issues.
...
Signed-off-by: Sumana Harihareswara <sh@changeset.nyc>
2020-12-13 17:37:28 -05:00
Tzu-ping Chung
d869e0cbfd
Merge master
2020-12-12 18:49:14 +08:00
Pradyun Gedam
0aee48ff1f
Merge pull request #9265 from uranusjr/new-resolver-cache-installed-candidates
...
Cache AlreadyInstalledCandidate
2020-12-11 21:03:56 +00:00