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

1658 commits

Author SHA1 Message Date
Stéphane Bidoul
3726f71720
Add a --dry-run option to pip install 2022-06-23 19:33:18 +02:00
q0w
c8c88ce520 Adapt tests 2022-06-23 19:20:18 +03:00
q0w
49657d8c94 Use os.fspath 2022-06-21 19:35:22 +03:00
q0w
3181063f94 Convert to str shutil.move src arg for py<=39
https://github.com/python/cpython/issues/76870
2022-06-15 22:07:15 +03:00
Роман Донченко
28d7730087 test_download_use_pep517_propagation: use a different approach
The approach it uses now doesn't work anymore due to 452d7da8.
The installation of `fake_dep` now succeeds whether or not `setuptools`
is installed in the test environment.

Use a different approach instead: try to import `pip` in the `setup.py`
script. If it succeeds, then we are not running in an isolated environment,
and therefore PEP 517 isn't being used.

To add this custom logic to `setup.py`, add a new argument to
`create_basic_sdist_for_package`. Note that to make this work, I had to
switch from f-strings to `str.format`, since the `dedent` has to happen
before formatting.
2022-06-15 18:11:07 +03:00
Роман Донченко
698784796b pip download: make sure that --use-pep517 is propagated to the dependencies 2022-06-15 18:10:22 +03:00
Tzu-ping Chung
42359a9605 Migrate tests to use pathlib.Path
The pip-specific Path implementation has been removed, and all its
usages replaced by pathlib.Path. The tmpdir and tmpdir_factory fixtures
are also removed, and all usages are replaced by tmp_path and
tmp_path_factory, which use pathlib.Path.

The pip() function now also accepts pathlib.Path so we don't need to put
str() everywhere. Path arguments are coerced with os.fspath() into str.
2022-06-08 19:58:46 +08:00
Stéphane Bidoul
e58a8a591b
Merge pull request #11137 from sbidoul/download-info-sbi
Add download_info: DirectUrl to InstallRequirement
2022-06-01 08:21:12 +02:00
Tzu-ping Chung
b91dbde21f
Merge pull request #11082 from uranusjr/truststore 2022-05-30 02:32:49 -04:00
Pradyun Gedam
90096394c3
Merge pull request #11134 from q0w/revert-10998-handle-netrc
Revert "Prioritize url credentials over netrc"
2022-05-25 12:38:57 +05:30
Stéphane Bidoul
e7449498d3
Record origin url in wheel cache 2022-05-22 22:46:35 +02:00
Pradyun Gedam
f20ab575b9
Merge pull request #11124 from uranusjr/use-contain-for-checking
Allow pre-release to satisfy build requirements
2022-05-16 15:05:40 +01:00
Tzu-ping Chung
f7c05a5124 Allow pre-release to satisfy build requirements 2022-05-16 07:40:00 -04:00
Pradyun Gedam
30af8074bf
Merge pull request #11117 from q0w/opt-check
Opt to check build dependencies
2022-05-14 21:55:18 +01:00
q0w
e20aab9901 Revert "Merge pull request #10998 from q0w/handle-netrc"
This reverts commit eacc739320, reversing
changes made to d5e1eeecc8.
2022-05-14 20:48:29 +03:00
q0w
3166157e40 Opt to check build dependencies 2022-05-13 03:05:55 +03:00
Pradyun Gedam
611e9253ff
Filter out build requirements that require an extra to be used
There is no mechanism provided for build requirements to have extras.

It should be acceptable to enforce that any "optional" packages
that are supposed to be conditionally installed based on the presence of
an extra should not be installed in a build environment.
2022-05-12 01:04:11 +01:00
Pradyun Gedam
cb24fb4052
Merge pull request #11085 from pypa/revert-10962-fix-hashes 2022-05-09 08:38:51 +01:00
Tzu-ping Chung
a020e8c35c Add very simple tests to ensure feature is enabled 2022-05-03 11:04:05 -06:00
Pradyun Gedam
2d028e140e Revert "Filter available distributions using hash declarations from constraints files (#10962)"
This reverts commit 0c284520c6.
2022-05-03 17:50:21 +01:00
Stéphane Bidoul
3c62d1cbce
Add failing test for REQUESTED and URL constraints 2022-05-01 19:39:17 +02:00
Paul Moore
cdeb8f9e63
Merge pull request #11059 from pfmoore/config_settings
Add a UI to set config settings for PEP 517 backends
2022-04-29 12:58:32 +01:00
Pradyun Gedam
7164b1af50
Merge pull request #10827 from q0w/project-urls
Include Project-URLs in `pip show -v` output
2022-04-23 21:39:51 +01:00
Paul Moore
4db45851b6 Explicitly test installs (and fix a bug found by those tests!) 2022-04-23 13:14:22 +01:00
Paul Moore
1401dbae56 Add an end-to-end test for config settings 2022-04-21 18:30:48 +01:00
Tzu-ping Chung
8133d83929
Merge pull request #11030 from uranusjr/build-env-req-check-evaluate-marker 2022-04-16 19:46:23 +08:00
Tzu-ping Chung
233db7c31b Skip conditional build req without matching marker 2022-04-16 16:02:15 +08:00
Pradyun Gedam
c6e274e7fd
Merge pull request #10709 from uranusjr/metadata-importlib-backend 2022-04-15 12:49:32 +01:00
Frost Ming
6a1ed5c0f4
Add completion script for powershell (#9025) 2022-04-15 09:32:42 +01:00
Tzu-ping Chung
8073f65c14 Properly normalize and handle linked dist 2022-04-12 03:33:18 +08:00
Tzu-ping Chung
17355f8d47 Unnormalized metadata version works now! 2022-04-12 03:33:18 +08:00
Tzu-ping Chung
675de98f42 Better test setup and teardown with fixture 2022-04-12 03:31:50 +08:00
Pradyun Gedam
e679df4051
Merge pull request #11001 from pradyunsg/remove-out-of-tree
Drop out-of-tree/in-tree build transition flags
2022-04-09 16:02:40 +01:00
Pradyun Gedam
428e886ad6
Drop out-of-tree/in-tree build transition flags
These were intended to help users transition when the default behaviour
changed to no longer perform out-of-tree builds. The transition is now
considered complete.
2022-04-08 12:20:36 +01:00
q0w
b953f9aaa7 Use explicit wrong credentials 2022-04-07 11:15:48 +03:00
q0w
ee67cf714b Prioritize url credentials over netrc 2022-03-29 20:27:24 +03:00
q0w
db71def50f replace git scheme with https 2022-03-19 14:17:05 +03:00
Pradyun Gedam
25861e564d
Merge pull request #10560 from pradyunsg/fix-protect-pip-on-windows
Fix the protect-pip-on-windows logic
2022-03-18 12:32:18 +00:00
q0w
0c284520c6
Filter available distributions using hash declarations from constraints files (#10962) 2022-03-16 07:43:06 +00:00
q0w
a4f7508592
Drop the doctype check (#10906)
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2022-02-27 12:39:06 +00:00
Pradyun Gedam
ce30e6c532
Fix the protect-pip-on-windows logic
The names for the executables does not contain a `.exe` suffix anymore.
2022-02-26 12:32:52 +00:00
Pradyun Gedam
201135fd2e Normalise name to match newer flit behaviour 2022-02-25 12:08:44 +00:00
q0w
0c6d20f8c7
Validate build deps when --no-build-isolation is passed (#10886)
This can help catch issues in setting up the build environment, helping
ensure that packages get built according to their declared metadata.
2022-02-18 14:58:40 +00:00
Shivansh-007
5086e57997
Add test for failed parse log with invalid git version 2022-02-18 18:32:24 +05:30
Tzu-ping Chung
ec8edbf5df
Merge pull request #10819 from q0w/file404 2022-02-03 20:37:38 +08:00
q0w
7f6a9cad22 Add test 2022-02-03 14:57:21 +03:00
q0w
8749d0baad Add docstring 2022-02-02 21:11:23 +03:00
Pradyun Gedam
a78845ab33
Pacify functional tests that don't start with <!doctype html> 2022-01-30 21:57:22 +00:00
Jon Dufresne
bf5f4008e7
Replace vendored html5lib with stdlib
The html5lib library isn't strictly required as the same functionality
can be achieved through the stdlib html.parser module.

The html5lib is one of the largest uses of the six library. By dropping
this unnecessary dependency, the pip project is closer to dropping the
six library.

Additionally, html5lib maintenance has slowed down and the project has
rejected pull requests to drop Python 2 support.

For now, the html5lib code remains, but is gated behind a command
line option: `--use-deprecated=html5lib`. After a sufficient amount of
time has passed without any reported bugs, the vendored library and this
flag can be removed completely.
2022-01-28 06:45:57 +00:00
Pradyun Gedam
9d0db8839f
Add --use-deprecated=backtrack-on-build-failures
This serves as an opt-out from build failures causing the entire
installation to abort.
2022-01-27 18:11:05 +00:00
Pradyun Gedam
ca78aba456
Test that the resolver skips packages, as instructed by constraints 2022-01-27 18:11:05 +00:00
Pradyun Gedam
8eeee22304
Abort immediately on metadata generation failure instead of backtracking
This behaviour is more forgiving when a source distribution cannot be
installed (eg: due to missing build dependencies or platform
incompatibility) and favours early eager failures instead of trying to
ensure that a package is installed regardless of the amount of effort it
takes.
2022-01-27 18:11:02 +00:00
Pradyun Gedam
1cda23bd6b
Merge pull request #10795 from pradyunsg/better-subprocess-errors 2022-01-27 07:09:18 +00:00
Andy Freeland
e752b1a26b
Include files/folders in pip install autocomplete (#10682) 2022-01-25 18:27:09 +00:00
q0w
24bee84f44 Show Project-URLs 2022-01-25 18:26:06 +03:00
James Gerity
5c24a798b8
Change VCS tooling verbosity along with pip's verbosity (#9639)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2022-01-25 08:54:02 +00:00
Pradyun Gedam
deb2d754e7
Tweak the chattymodule to not leak potentially information
I'd like to use this in screenshots, but the os.environ makes it a bit
tricky to do.
2022-01-25 01:38:23 +00:00
Pradyun Gedam
a835e0a277
Prettify messages for discarding candidates due to issues
These are more pleasing colours and, more importantly, a clearer
presentation style of the package vs the error.
2022-01-25 01:38:23 +00:00
Pradyun Gedam
57198c6688
Use logger.warning instead of warnings.warn
This is more in line with the rest of our output presentation logic.
2022-01-25 01:38:22 +00:00
Pradyun Gedam
531c991ef9
Require every call_subprocess call-site to pass command_desc
This serves as additional context that can be presented in error
messages.
2022-01-25 01:38:22 +00:00
Pradyun Gedam
42075efa61
Annotate an unannotated test 2022-01-25 01:32:34 +00:00
Pradyun Gedam
997c5a742b
Merge pull request #10625 from albertosottile/ignore_yanked 2022-01-24 23:47:54 +00:00
Pradyun Gedam
b82dfd1745
Restore colors in regular logging messages
Also, reflects that `--no-color` does not mean no-ansi-escapes but only
affects colour rules.
2021-12-12 13:11:36 +00:00
Thomas VINCENT
077867237b Add test to reproduce issue #10222 2021-12-06 15:54:07 +01:00
Tzu-ping Chung
496343ead0 Fix in-site-packages patch for user install tests 2021-12-04 17:57:34 +08:00
Tzu-ping Chung
6ed6aa819f Fix test failures caused by name normalization 2021-12-04 17:57:34 +08:00
Dustin Ingram
06cd803328
Add type annotations 2021-12-02 16:43:03 -05:00
Dustin Ingram
772a17c698
Add failing test 2021-12-02 15:57:17 -05:00
Tzu-ping Chung
e0c7f24ee4
Merge pull request #10511 from uranusjr/metadata-uninstall 2021-11-22 09:54:15 +08:00
Tzu-ping Chung
f9250d29c9 Fix typing for uninstallation test 2021-11-21 23:43:49 +08:00
Jon Dufresne
c71cf88049 Complete type annotations of tests/functional/ directory 2021-11-18 18:26:17 -08:00
Tzu-ping Chung
ebd693e0b5 Abstract pkg_resources from uninstall operation 2021-11-18 17:55:38 +08:00
Pradyun Gedam
e7c80c7b46
Merge pull request #10535 from lukasjuhrich/main 2021-11-12 09:57:11 +00:00
Alberto Sottile
51bda9637b Lint 2021-11-06 16:27:39 +01:00
Alberto Sottile
99cb1e0fc3 Add test_error_all_yanked_files_and_no_pin test 2021-11-06 16:22:56 +01:00
Pradyun Gedam
c99e91224c
Merge pull request #10538 from pradyunsg/diagnostic-errors 2021-10-29 12:44:16 +01:00
Tzu-ping Chung
c4d9f563dd Add failing test for extra-already-installed case 2021-10-23 23:49:30 +08:00
Lukas Juhrich
58996b5ddb Add tests for BadZipFile handling
Note that the functional test does not actually detect the behavioral
change of throwing unhandled `BadZipFile` → throwing unhandled
`InvalidWheel`, whereas the unit test does.
2021-10-23 17:42:22 +02:00
Pradyun Gedam
a00e7bcd88
Implement diagnostic errors for build-system.requires issues
This demonstrates how the new diagnostic errors are to implement, and
how they get presented to users.
2021-10-22 13:47:53 +01:00
Stéphane Bidoul
619b257ed9
Add failing tests for issue 10573 2021-10-18 14:31:11 +02:00
Stéphane Bidoul
ddfeaaef20
Reject projects that have neither a pyproject.toml nor a setup.py 2021-10-18 14:31:11 +02:00
Alex Hedges
e1f81bfa4d Fix many typos 2021-10-11 15:48:17 -04:00
Pradyun Gedam
786957cf85
Use a shorter timeout, to ensure that this fails more often 2021-10-09 11:34:23 +01:00
Pradyun Gedam
ae2c9eda54
Merge pull request #10543 from pradyunsg/drop-sdist-reinstall
Un-deprecate source distribution re-installation behaviour
2021-10-09 07:37:36 +01:00
Diego Ramirez
02b4f86489
Return a better error message if a file: URL is not found (#10263)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2021-10-08 14:24:54 +01:00
Pradyun Gedam
68e22aa959
Un-deprecate source distribution re-installation behaviour
This will be handled as part of a broader effort to make the reinstall
behaviours more ergonomic and easier to reason about.
2021-10-08 12:22:15 +01:00
Pradyun Gedam
bc98892d0b
Drop --build-dir from the CLI
This was restored as a no-op for PyCharm, as a way to soften the
migration for them. It is no longer necessary, since the migration has
completed.
2021-10-04 22:35:48 +01:00
Pradyun Gedam
9a058c62b7
Fix a failing test
This was caused due to an overlap between two PRs which ended up being
incompatible.
2021-10-02 15:01:05 +01:00
Pradyun Gedam
a07bfb33a0
Merge pull request #10495 from sbidoul/out-of-tree-build-flag 2021-10-02 12:34:24 +01:00
Jon Dufresne
b0bf93f174 Remove unconditionally skipped test (fails if skip removed)
The test was introduced in f9990605dc (May
2017) and was unconditionally skipped in
6cf5d7db54. It remains skipped to this
day.

In commit bd850c0798, the patched_file
method was removed/renamed. So even if the skip were removed, it would
fail on the undefined attribute.

This was caught via mypy which emits an error due to the missing method.
2021-09-30 04:58:49 -07:00
Tzu-ping Chung
cb2d4b89a7
Merge pull request #10526 from uranusjr/remove-extra-merge-xfail 2021-09-30 16:34:39 +08:00
Tzu-ping Chung
12cb745985 Remove xfail from a weird but passing test 2021-09-30 15:59:58 +08:00
Tzu-ping Chung
fbdc4648c2 Remove --build xfail for now
The option is current restored. We should remove this test after the
option is removed (again).
2021-09-30 15:55:57 +08:00
Tzu-ping Chung
ad9b041650 Don't skip extra-merging test on 2020 resolver 2021-09-30 01:37:22 +08:00
Stéphane Bidoul
348d884d09
Merge pull request #8212 from sbidoul/pep517-editable-sbi
PEP 660 (build_editable) support
2021-09-29 11:36:06 +02:00
Pradyun Gedam
8ea265186a
Merge pull request #10459 from NoahGorny/do-not-throw-error-on-cache-purge 2021-09-28 22:53:34 +01:00
Stéphane Bidoul
e5be3f796e
Add PEP 660 support (build_editable) 2021-09-28 23:04:51 +02:00
Noah Gorny
2d3f17c214 tests: cache: Add no files to remove cases 2021-09-28 14:18:52 +03:00
Stéphane Bidoul
040cc391ba
Make in-tree-build the default
Add an out-of-tree-build feature flag to ease the transition.
2021-09-25 13:11:01 +02:00
Tzu-ping Chung
605d68ead3
Merge pull request #10492 from jdufresne/with-wheel
Use @pytest.mark.usefixture("with_wheel") in tests
2021-09-21 21:27:29 +08:00
Stéphane Bidoul
0199c500f0
Use editable project location in pip freeze 2021-09-21 11:18:00 +02:00
Stéphane Bidoul
d251b4bf94
Add editable project location to pip list output 2021-09-21 11:18:00 +02:00
Jon Dufresne
fa0804b98c Use @pytest.mark.usefixture("with_wheel") in tests
The with_wheel fixture doesn't have a value and isn't ever referenced
within a test function.

To avoid typing it every test function, change tests to use
pytest.mark.usefixture. It will no longer appear as an argument.

https://docs.pytest.org/en/latest/how-to/fixtures.html#use-fixtures-in-classes-and-modules-with-usefixtures
2021-09-20 21:44:29 -07:00
Tzu-ping Chung
9c3286873b
Merge pull request #10465 from jdufresne/mypy-pytest
Install pytest in mypy environment
2021-09-21 06:10:57 +08:00
Pradyun Gedam
4c609d5b68
Merge pull request #10437 from jdufresne/unused-tmpdir 2021-09-20 19:12:59 +01:00
Tzu-ping Chung
0de0b8dd9f
Merge pull request #10448 from jdufresne/unused-test-class
Remove unused class TestUpgradeDistributeToSetuptools
2021-09-15 14:25:23 +08:00
Jon Dufresne
426691dc14 Install pytest in mypy environment
pytest includes type annotations and is PEP-561 compliant. This helps
ensure correct pytest API usage.

This caught a misuse of pytest.mark.skipif which did not include a
boolean argument. The test is now marked "network" and no longer
skipped.
2021-09-12 20:49:56 -07:00
Jon Dufresne
5c6169465e Remove unused class TestUpgradeDistributeToSetuptools
Unused since 6b54145783 when the last test
method was removed.

Removing the class avoids the need to add type annotations.
2021-09-12 12:55:09 -07:00
Jon Dufresne
a4f483e96f Handle TODO comment in tests/functional/test_new_resolver.py 2021-09-12 12:54:54 -07:00
Jon Dufresne
8c5d3556bd Fix failing test due to removed setuptools feature, use_2to3
setuptools removed use_2to3 in version v58.0.1 (2021-09-06). Some tests
install the anyjson package which uses this feature and so those tests
result in a command failure. The failure appeared as:

    error in anyjson setup command: use_2to3 is invalid.

As anyjson package is no longer maintained (last release was 2012),
change the tests to use a package that is healthy.

For details on the setuptools change, see the history at:

https://setuptools.readthedocs.io/en/latest/history.html#v58-0-2
2021-09-08 05:37:55 -07:00
Jon Dufresne
ad25b61e07 Remove unused tmpdir fixtures from tests
There was also one unused monkeypatch fixture removed.
2021-09-05 07:08:06 -07:00
Jon Dufresne
4a4103e173 Replace use of pretend library with unitest.mock in tests
The pretend library was used by very few tests. In all cases, it is
simple enough to switch to stdlib unitest.mock.

Using stdlib means there is one fewer library to install before running
tests. It can also simplify mypy usage via typeshed.
2021-09-03 16:23:28 -07:00
Jon Dufresne
a775351a38 Clean up leftover references to removed Travis and Azure CI 2021-08-28 20:01:58 -07:00
Jon Dufresne
943af79f26 Run mypy on the tests directory
The tests are a large consumer of the pip API (both the internal API and
otherwise). By running mypy on tests, we help to:

1. Ensure the internal API is consistent with regards to typing

2. Ensure the tests are representative of real life scenarios as the API
   are used correctly.

3. Helps to recognize unnecessary tests that simply pass junk data to
   functions which can be caught by the type checker.

4. Make sure test support code in tests/lib/ is correct and consistent.
   This is especially important when refactoring such code. For example, if
   we were to replace tests/lib/path.py with pathlib.

As a first start, untyped defs are allowed. All existing typing issues
have been resolved. Overtime, we can chip away at untyped defs and
eventually remove the configuration option for stricter type checking of
tests.

The following changes were made to help make mypy pass:

Remove unused record_callback argument from make_wheel() in tests.
Unused since its introduction in
6d8a58f7e1.

Replace toml with tomli_w in tests/functional/test_pep517.py. Unlike the
toml package, tomli_w contains inline typing annotations.

Remove unnecessary make_no_network_finder(). Unnecessary since
bab1e4f8a1 where the _get_pages method was
removed.
2021-08-22 09:57:26 -06:00
Jon Dufresne
d144fd960c Cleanup several Python 2 version_info checks/workarounds 2021-08-20 09:39:31 -06:00
Pradyun Gedam
585037a80a
Cleanup implicit string concatenation 2021-08-20 13:37:52 +01:00
Pradyun Gedam
94999255d5
Reformat the codebase, with black 2021-08-20 13:37:49 +01:00
Pradyun Gedam
df501bcf96
Enforce keyword arguments in deprecated 2021-08-15 19:15:52 +01:00
Nipunn Koorapati
2d35b8072c Use git's partial clone feature to speed up pip
Clone with --filter=blob:none - as it fetches all
metadata, but only dynamically fetches the blobs as
needed by checkout. Since typically, pip only needs the blobs for
a single revision, this can be a big improvement, especially
when fetching from repositories with a lot of history,
particularly on slower network connections.

Added unit test for the rev-less path. Confirmed that both
of the if/else paths are tested by the unit tests.
2021-08-13 11:44:01 -07:00
Pradyun Gedam
b9f829553d
Merge pull request #10302 from nipunn1313/blacken_tests42
Run black on tests/functional/test_vcs_bazaar.py
2021-08-13 11:00:09 +01:00
Nipunn Koorapati
7e7c10ab4d Run black on tests/functional/test_new_resolver_errors.py 2021-08-11 13:24:05 +08:00
Nipunn Koorapati
1b15952618 Run black on tests/functional/test_hash.py 2021-08-11 13:23:50 +08:00
Nipunn Koorapati
7495e786f2 Run black on tests/functional/test_vcs_subversion.py 2021-08-11 13:23:44 +08:00
Nipunn Koorapati
d03b8a84a2 Run black on tests/functional/test_uninstall_user.py 2021-08-11 13:23:39 +08:00
Nipunn Koorapati
ba5a6784ed Run black on tests/functional/test_new_resolver_target.py 2021-08-11 13:23:32 +08:00
Nipunn Koorapati
13068687a7 Run black on tests/functional/test_new_resolver_hashes.py 2021-08-11 13:23:23 +08:00
Tzu-ping Chung
36877e327a
Merge pull request #10317 from nipunn1313/blacken_tests10
Run black on tests/functional/test_fast_deps.py
2021-08-11 13:22:10 +08:00
Tzu-ping Chung
c1c74dcaeb
Merge pull request #10318 from nipunn1313/blacken_tests24
Run black on tests/functional/test_install_requested.py
2021-08-11 13:21:59 +08:00
Tzu-ping Chung
bf91a07979
Merge pull request #10287 from jdufresne/com2ann
Move many type comments to annotations
2021-08-11 13:20:45 +08:00
Tzu-ping Chung
fcc61e8630
Merge pull request #10339 from nipunn1313/blacken_tests38 2021-08-11 13:20:03 +08:00
Nipunn Koorapati
dc9ef9d252 Run black on tests/functional/test_search.py 2021-08-10 11:21:20 -07:00
Jon Dufresne
6a6561c2cb Move many type comments to annotations
Use the tool com2ann to automatically convert most type comments to type
annotations. Some type comments continue to exist where any work beyond
the automatic conversion was required (for example, additional
formatting or circular references).

For additional information on the com2ann tool, see:
https://github.com/ilevkivskyi/com2ann
2021-08-10 07:12:32 -07:00
Nipunn Koorapati
319f81bc5d Run black on tests/functional/test_vcs_bazaar.py 2021-08-09 01:18:44 -07:00
Nipunn Koorapati
75332ac633 Run black on tests/functional/test_fast_deps.py 2021-08-09 01:18:43 -07:00
Nipunn Koorapati
7a19a9eed9 Run black on tests/functional/test_install_requested.py 2021-08-09 01:18:43 -07:00
Pradyun Gedam
df98748391
Skip warnings-as-errors test
There is no clean way, that we know of so far, for fixing this on 3.10+.
2021-08-06 13:42:31 +01:00
Tzu-ping Chung
6a228068fb
Correctly normalize relative paths for 'pip show' 2021-07-31 14:55:43 +08:00
Tzu-ping Chung
95fa4e5a2a Respect the base's constraint for extra-ed package 2021-07-30 20:13:25 +08:00
Guy Tuval
239a307372
Error handling upon uninstall invalid parameter (#10171)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-07-24 21:24:30 +08:00
Pradyun Gedam
a196b3bf01
Minor formatting tweaks (#10190)
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2021-07-24 03:55:14 +08:00
Tzu-ping Chung
6db400328b Add test case for file://localhost/ usages 2021-07-23 15:38:00 +08:00
Tzu-ping Chung
6af7739596
Merge pull request #10157 from uranusjr/metadata-refactor-2107
Replace more pkg_resources usages
2021-07-23 11:04:45 +08:00
Tzu-ping Chung
d4d2445350 Remove get_installed_distributions usages
The function itself is kept for now because it's currently used to test
the pip.metadata subpackage...
2021-07-22 23:22:12 +08:00
Tzu-ping Chung
26778e9436
Merge pull request #10079 from new-resolver-url-equivalent-no-hash
Smarter (and looser) link equivalency logic
2021-07-22 15:45:13 +08:00
Harutaka Kawamura
567282724d
Log commit SHA when installing package via Git URI (#10149)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-07-22 15:29:16 +08:00
Tzu-ping Chung
2da77e97a2 Smarter (and looser) link equivalency logic 2021-07-22 15:27:10 +08:00
Tzu-ping Chung
6f1c5dc949 Remove pkg_resources usages from 'pip freeze' 2021-07-22 15:25:18 +08:00
Tzu-ping Chung
19389df484 Fix expected error message format 2021-07-22 15:20:50 +08:00
Tzu-ping Chung
ead43d674d Add method to access the raw project name 2021-07-22 15:20:49 +08:00
Tzu-ping Chung
5f47421313 Remove pkg_resources usages from 'pip show' 2021-07-22 15:20:49 +08:00
Xavier Fernandez
1f1e1d6211 Remove deprecated --find-links option from pip freeze 2021-07-13 22:15:07 +02:00
Tzu-ping Chung
bd5ac261c0
Merge pull request #10035 from hukkin/tomli 2021-07-12 16:57:44 +08:00
Tzu-ping Chung
f9c49eff8d Failing test for local unnamed dependency 2021-07-12 12:37:59 +08:00
Tzu-ping Chung
e6c317769a Move assert_[not_]installed to Script and use it
This help function is much better than the previous ad-hoc logic used in
test_uninstall.py, which has trouble identifying normalized names.
2021-07-12 11:44:23 +08:00
Tzu-ping Chung
ef8299d559 pip list now normalizes the project name 2021-07-12 11:44:23 +08:00
briantracy
37a2b12a21
Special case warning for requirements.txt install (#9915)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-07-12 11:40:43 +08:00
Nikita Chepanov
f2ce7741ab Suppress "not on PATH" warning when --prefix is given
Similar to how it works with `--target`, avoid printing the
warning since it's clear from the context that the final
destionation of the executables is unlikely to be in the PATH.
2021-07-12 11:39:56 +08:00
Taneli Hukkinen
af79d0d393 Replace use of vendored toml in tests with PyPI toml 2021-07-02 00:21:00 +03:00
Tzu-ping Chung
7c3abccd22
Merge pull request #9994 from uranusjr/requires-python-before-other-deps
Check Requires-Python before other dependencies
2021-06-15 19:49:13 +08:00
Tzu-ping Chung
c16585173b
Merge pull request #9450 from minrk/custom-log-level 2021-06-11 19:05:56 +08:00
Noah Gorny
3751878b42
Implement new command 'pip index versions' 2021-06-11 19:01:14 +08:00
Tzu-ping Chung
b38b925400
Merge pull request #9822 from bwoodsend/fix-pip-freeze-git 2021-06-04 18:58:15 +08:00
bwoodsend
8b8fa2bd5f Explicitly recognise SCP-shorthand git remotes. 2021-06-03 17:52:25 +01:00
bwoodsend
f533671b0c Fix pip freeze to use modern format for git repos (#9822)
Pip dropped support for `git+ssh@` style requirements (see #7554)
in favour of `git+ssh://` but didn't propagate the change to
 `pip freeze` which resultantly returns invalid requirements.
Fix this behaviour.

Fixes #9625.
2021-06-03 17:45:56 +01:00
Paul Moore
3c1d1810dc
Merge pull request #9949 from hroncok/error_msg_missing_record
Provide a better error message when uninstalling packages without dist-info/RECORD
2021-06-02 13:31:32 +01:00
Tzu-ping Chung
c8638adc5a Check Requires-Python before other dependencies
This makes the resolver fail quicker when there's a interpreter
version conflict, and avoid additional (useless) downloads.
2021-06-02 01:54:44 +08:00
Tzu-ping Chung
8360cab1ba Test case for backtracking an installed candidate 2021-05-22 05:36:01 +08:00
Miro Hrončok
f77649e841 Provide a better error message when uninstalling packages without dist-info/RECORD
Fixes https://github.com/pypa/pip/issues/8954
2021-05-10 21:56:59 +02:00
Tzu-ping Chung
a31f8fd5ed Add failed test case 2021-04-19 08:31:28 +08:00
Stéphane Bidoul
8fc65ea53f
Merge pull request #9673 from mwchase/url-constraints-final-2
Support URL constraints in the new resolver
2021-04-18 12:31:45 +02:00
Max W Chase
4c69ab2a2c Support URL constraints in the new resolver
Fixes #8253
2021-04-17 07:59:57 -04:00
Tzu-ping Chung
d4c32a249c
Merge pull request #9774 from sbidoul/warn-on-pep517-build-global-option 2021-04-15 07:29:44 +08:00
Paul Moore
ef35e73a71 Make pip work with warnings converted to errors 2021-04-05 15:31:08 +01:00
Stéphane Bidoul
7c6ee48b04 PEP 517 build in presence of --global-option emits a warning
So these are not ignored silently.
2021-04-04 16:08:49 +02:00
Stéphane Bidoul
69dee6286d PEP 517 + --build-option is now a warning
We warn instead of erroring out when --build-option is present
when doing a PEP 517 build. There is no strong reason to error
out, and this will avoid backward compatibility issues when we
support build options in requirement files and installation.
2021-04-04 16:08:49 +02:00
Stéphane Bidoul
ecdcfeb8d6 Remove now unused VCS export code 2021-04-03 15:44:00 +02:00
Andrey Bienkowski
622f104694 Use f-strings for formatting
suggested by pyupgrade --py36-plus
2021-03-30 15:48:27 +03:00
Pradyun Gedam
6ff1f7da2f
Merge pull request #9739 from pradyunsg/tests/drop-YAML-based-resolver-tests
Drop YAML tests for the resolver
2021-03-28 07:56:09 +01:00
Pradyun Gedam
724bf3df0c
Drop pytest-timeout
It is incompatible with pytest-xdist and causes crashes when used with
it. Also removes the marker from the only test that uses it.
2021-03-26 08:03:04 +00:00
Pradyun Gedam
ad63666749
Drop YAML tests for the resolver
We've created a fairly capable setup with the new resolver tests,
which has now rendered this logic redundant and generally unnecessary.
2021-03-21 11:55:07 +00:00
Min RK
9b3e78474a -v shows subprocess output
adds VERBOSE custom log level between DEBUG and INFO

used when `-v` is given. Now require -vv to enable full debug output.

Messages can be logged with VERBOSE level to promote them to `-v` output instead of `-vv`
2021-03-12 13:12:09 +01:00
Tzu-ping Chung
80e0163e03
Merge pull request #9552
From uranusjr/new-resolver-requires-python-error
2021-03-08 02:26:20 +08:00
KOLANICH
7a95720e79 Fixed --editable install for setuptools projects without setup.py.
Co-Authored-By: Tzu-ping Chung <uranusjr@gmail.com>
Co-Authored-By: Pradyun Gedam <3275593+pradyunsg@users.noreply.github.com>
2021-03-03 21:24:29 +03:00
Tzu-ping Chung
e7d6e54dff
Merge pull request #9669 from uranusjr/ignore-invalid-name-dist-info
Ignore dist-info directories with invalid name
2021-02-28 23:27:06 +08:00
Tzu-ping Chung
550270c7ff
Merge pull request #9636 from dwt/master 2021-02-28 22:16:28 +08:00
Tzu-ping Chung
e4349aec70 Ignore dist-info directories with invalid name 2021-02-28 22:13:36 +08:00
Pradyun Gedam
2940eaf53d
Merge pull request #9583 from hexagonrecursion/set-literal
Use the set literal syntax
2021-02-28 07:36:43 +00:00
Tzu-ping Chung
2a5e84e1c4 Add failing test 2021-02-28 07:31:37 +08:00
Tzu-ping Chung
43b7f3ff95
Merge pull request #9300 2021-02-25 14:49:18 +08:00
Tzu-ping Chung
32376bf577 Test for constraint in message 2021-02-25 13:56:55 +08:00
Pradyun Gedam
baaf66f70d
Merge pull request #9591 from hexagonrecursion/open
Replace `open(file, 'r')` with `open(file)`
2021-02-23 13:37:25 +00:00
Andrey Bienkowski
e4e9af1d27 Drop python2 related stuff in tests 2021-02-23 13:49:59 +03:00
David Hewitt
838988cb44 Build local directories in-place with feature flag 2021-02-22 23:31:47 +00:00
Tzu-ping Chung
917ecadd77 Show constraint in error message 2021-02-23 02:08:19 +08:00
Pradyun Gedam
c2ba7c043b
Merge pull request #9606 from hexagonrecursion/fstr 2021-02-21 08:30:00 +00:00
Martin Häcker
9485c4e6a0 Fix --target not working with --editable as setup.py develop does not understand --home but instead requires the --install-dir option.
Parially fixes #4390
2021-02-20 16:10:21 +01:00
Tzu-ping Chung
62af9563ca
Merge pull request #8687 from hroncok/keyring_madness 2021-02-19 00:59:50 +08:00
Andrey Bienkowski
39d2fd131b Oops 2021-02-18 11:39:30 +03:00
Andrey Bienkowski
6045ade9a9 Apply review suggestions 2021-02-18 11:32:41 +03:00
Andrey Bienkowski
9b2cb894ba Convert more str.format() calls to f-strings 2021-02-13 09:27:17 +03:00