1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

455 commits

Author SHA1 Message Date
Stéphane Bidoul e76eadc9d6
Pass freeze() kwargs directly 2021-01-02 13:46:55 +01:00
Stéphane Bidoul 93a51f1de3
The freeze operation does not need a wheel_cache 2021-01-02 13:43:56 +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 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
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
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 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 ba40f58ecc Remove encoding cookie from Python source files
Unnecessary since dropping Python 2. Python now decodes files as utf-8
by default.
2020-12-25 07:26:07 -08:00
Jon Dufresne f32adaf09b Remove __future__ imports
Unnecessary since dropping Python 2.
2020-12-24 08:38:09 -08:00
Jon Dufresne 53234e578f Remove obsolete "# type: ignore" comments
Obsolete since dropping Python 2 support.

Add the mypy setting "warn_unused_ignores = True" to catch these
earlier.
2020-12-23 15:42:48 -08:00
Hugo van Kemenade add5cfa514 Replace compat shim with shutil.get_terminal_size() 2020-12-22 22:41:58 +02:00
Hugo van Kemenade 817ee23051 Remove redundant Python 2.7 code 2020-12-22 09:06:26 +02:00
Pradyun Gedam 77fa5dfb9e
Present a nicer error in pip search 2020-12-18 17:50:36 +00:00
Nikita Chepanov f8b03eefe2 Add --ignore-requires-python support to pip download 2020-12-17 12:40:01 -05:00
Stéphane Bidoul 31a2e1a586
Restore --build-dir 2020-12-01 23:22:07 +01:00
Pradyun Gedam aa847eaa8a
Merge pull request #9123 from sbidoul/pip-wheel-editable-fix-sbi 2020-11-22 21:32:44 +00:00
Stéphane Bidoul a24d198c15
Do not download editables while preparing requirements
Downloading is done at the end of the download command
just like any other requirement. This is necessary to avoid
archiving editable requirements to a zip file when running
pip wheel.
2020-11-22 21:14:09 +01:00
Pradyun Gedam 7be91574d9
Update message displayed on conflicts post-resolution 2020-11-12 06:53:29 +05:30
Xavier Fernandez 9725229888 Add --exclude option to pip freeze and pip list commands 2020-10-30 21:50:59 +01:00
Pradyun Gedam cdc5422ed5
Merge pull request #9019 from pradyunsg/flip-the-switch-on-new-resolver 2020-10-31 00:36:32 +05:30
Xavier Fernandez c33cf49381 freeze: deprecate option --find-links 2020-10-30 13:41:27 +01:00
Pradyun Gedam 385077a944
Factor out logic for determining resolver to use 2020-10-30 07:11:54 +05:30
Paul Moore 40904e3a05 Remove --build-dir option, as per deprecation 2020-10-27 15:24:36 +00:00
Nguyễn Gia Phong b28e2c4928 New resolver: Avoid polluting dest dir
Previously, during dependency resolution for `pip download -d <dir>`
or `pip wheel -w <dir>`, distributions downloaded are always saved
to <dir>, even for those are only used in backtracking and are not
part of the returned requirement set.
2020-10-07 13:42:21 +07:00
Nguyễn Gia Phong 6887b0795b Merge usage of download_dir and wheel_download_dir
In every cases, at least one of them is None.  By doing this,
it is also possible to simplify wrapper codes around download_dir.
2020-10-07 13:42:21 +07:00
Nguyễn Gia Phong 78b294e746 Remove download_dir exist check
Both pip download and wheel call endure_dir on the directory.
2020-10-07 13:42:21 +07:00
Pradyun Gedam 8aab76c63f
Merge pull request #8910 from hugovk/pip-cache-http
Include http subdirectory in 'pip cache info' and 'pip cache purge'
2020-10-02 13:26:00 +05:30
Hugo van Kemenade 0652a2f016 Rename to 'Package index page cache location' 2020-10-02 09:59:38 +03:00
Hugo van Kemenade d45ba65c37 Include http directory in 'pip cache info' and 'pip cache purge' 2020-09-24 01:33:56 +03:00
Pradyun Gedam 58c594c06b
Prepare isort for black 2020-09-23 21:47:47 +05:30
Pradyun Gedam 25ab172b55
Update linter: isort 2020-09-23 19:52:28 +05:30
Devesh Kumar Singh 9450f8837a Use format options for abspath 2020-09-11 09:23:51 +05:30
Devesh Kumar Singh 0b3ba87bbf Add option to output full path of cache enty 2020-09-11 09:23:51 +05:30
Nguyễn Gia Phong cca500f053 Remove unused definitions 2020-09-04 17:37:43 +07:00
Pradyun Gedam 0b18e21cbe
Merge pull request #8752 from sbidoul/imp-8369-deprecation-sbi 2020-08-25 20:40:27 +05:30
Pradyun Gedam a3fd4246af
Merge pull request #8709 from McSinyx/successfully-downloaded
[2020-resolver] List downloaded distributions before exiting
2020-08-17 17:22:17 +05:30
Stéphane Bidoul 9c4a88b0a0
Improve deprecation message for issue 8368 2020-08-12 11:07:36 +02:00
Nguyễn Gia Phong 4f210f3608 [2020-resolver] List downloaded distributions before exiting
This unifies the behavior of pip download for both legacy and new
resolvers.  InstallRequirement.successfully_download is no longer needed
for this task and is thus retired.
2020-08-06 16:52:31 +07:00
Tzu-ping Chung c04182893a Work around lax semantics in commands.search 2020-08-05 04:56:00 +08:00
Nguyễn Gia Phong e48a0cb7cb Remove no-longer-used messages 2020-08-01 20:26:44 +07:00
Pradyun Gedam 31299ee370
Merge pull request #8603 from tekumara/pip-list-ignore-require-venv 2020-07-29 09:28:58 +05:30
Pradyun Gedam 1b2ae22e7b
Don't print that form link after the end of month. 2020-07-27 19:51:40 +05:30
Pradyun Gedam 4e4951066d
Reverse if statement's condition 2020-07-27 13:52:54 +05:30
Pradyun Gedam 8db354260a
Move the form link to make the linter happy 2020-07-27 13:49:21 +05:30
Pradyun Gedam efdb66ed16
Add messaging variation based on "new resolver" usage 2020-07-27 13:49:21 +05:30
Pradyun Gedam 42c62a08f7
Short circuit when there's nothing to report 2020-07-27 13:49:20 +05:30
Pradyun Gedam d77b5c234c
Refactor the logging calls into a dedicated loop 2020-07-27 13:49:11 +05:30
Oliver Mannion 95dfd8b5a7 Ignore require-virtualenv in pip list 2020-07-20 16:45:52 +10:00
Stéphane Bidoul d924b16b0d
Give mypy some love after rebase 2020-07-18 13:46:19 +02:00