Commit Graph

26 Commits

Author SHA1 Message Date
Damian Shaw 68529081c2
Enforce f-strings via Ruff (#12393) 2023-11-07 09:14:56 +00:00
Jeremy Stanley 7a42bce594
Replace `cgi` module with `email.message` (#11098) 2022-05-24 17:06:56 +05:30
Pradyun Gedam a330ea462f
Use the progress bar from rich by default
Utilise rich's progress bar to present download progress. This has a
subjectively nicer presentation style and should degrade gracefully
without additional effort from our end.
2021-11-26 11:50:27 +00:00
Pradyun Gedam 1bc0eef056
Blacken src/pip/_internal/network/
Progresses the black formatting of the codebase further.
2021-07-23 20:51:50 +01:00
Harutaka Kawamura f8a7439528
Complete type annotations in `pip/_internal/network` (#10184) 2021-07-23 18:27:28 +08:00
Jon Dufresne 0945809afc Remove typing.TYPE_CHECKING guards
The typing module has been available since Python 3.5. Guarding the
import has been unnecessary since dropping Python 2.

Some guards remain to either:

- Avoid circular imports
- Importing objects that are also guarded by typing.TYPE_CHECKING
- Avoid mypy_extensions dependency
2021-02-19 18:34:21 -08:00
Jon Dufresne a6392bd62e Replace pip._internal.utils.typing with stdlib typing
The stdlib module has been available since Python 3.5 and the
TYPE_CHECKING constant has been available since 3.5.2.

By using stdlib, this removes the need for pip to maintain its own
Python 2 typing compatibility shim.
2021-02-18 19:09:13 -08:00
Tzu-ping Chung f03d71e6fe
Merge pull request #8896 2021-02-18 22:43:36 +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
Danny McClanahan 22406d48fc
download requirements in the download command, outside of the resolver
create PartialRequirementDownloadCompleter, and use in wheel, install, and download

add NEWS entry

rename NEWS entry

rename NEWS entry

respond to review comments

move the partial requirement download completion to the bottom of the prepare_more method
2020-10-09 00:19:21 -07:00
Pradyun Gedam 58c594c06b
Prepare isort for black 2020-09-23 21:47:47 +05:30
Nguyễn Gia Phong b46576d933 Give batch downloader a separate class 2020-08-12 16:07:27 +07:00
Nguyễn Gia Phong 39d296eeb8 Clean up code style and internal interface
Co-Authored-By: Pradyun Gedam <pradyunsg@gmail.com>
Co-Authored-By: Chris Hunt <chrahunt@gmail.com>
2020-08-11 22:40:39 +07:00
Nguyễn Gia Phong 078e0effb7 Add memoization mechanism for file download
This is intentionally dependent from caching, which relies on cache dir.
2020-08-11 22:39:42 +07:00
Nguyễn Gia Phong e62f16e969 Make Downloader perform the download 2020-08-11 22:36:08 +07:00
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
Nguyễn Gia Phong 3eb85a0619 Draft lazy zip over HTTP 2020-06-26 15:15:28 +07:00
Nitesh Sharma ce1e0f470a
Move UI helpers to cli subpackage (#6727) 2020-02-21 14:01:13 +05:30
Chris Hunt 78a221cf71 Move Downloader to network.download
This will help us move Downloader construction out of
RequirementPreparer, reducing its concerns and making it easier to test
in isolation.
2019-12-04 18:31:53 -05:00
Chris Hunt 3a2ff979de Move _http_get_download to network.download 2019-12-04 18:31:53 -05:00
Chris Hunt e354b728dc Move _get_http_response_filename to network.download 2019-12-04 18:31:53 -05:00
Chris Hunt 762e4a0817 Move parse_content_disposition to network.download 2019-12-04 18:31:53 -05:00
Chris Hunt 32b0fc23ab Move sanitize_content_filename to network.download 2019-12-04 18:31:53 -05:00
Chris Hunt 3fbc991f0c Move _prepare_download to network.download 2019-12-04 18:31:53 -05:00
Chris Hunt 864f78bd96 Add network.download module
This will be home to Dowloader, Download, and associated helper
functions. Since this is an abstraction over PipSession, it makes
sense to keep these functions in a separate module.

Also move a helper function here from operations.prepare.
2019-12-04 18:30:27 -05:00