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
Andrey Bienkowski
08bc2ab7f9
Add reminders to revert python3.7 compat fixes
2021-02-11 09:48:14 +03:00
Andrey Bienkowski
f30f515a6a
Fix test_install_sends_client_cert
2021-02-10 22:03:20 +03:00
Andrey Bienkowski
510e691bc0
Undo removal of test docstring
...
It was very hard for me to figure out what this test was designed
to test. It turns out that when this test was promoted from unit
to functional someone forgot to copy the docstring
9faa9aef29
2021-02-10 21:02:28 +03:00
Andrey Bienkowski
20688ee8e8
Don't forget to close an open file
2021-02-10 16:14:42 +03:00
Andrey Bienkowski
50db373adb
Lint
2021-02-10 13:38:21 +03:00
Andrey Bienkowski
ab35018c04
Use unittest.mock instead of mock
2021-02-10 13:28:55 +03:00
Andrey Bienkowski
f13e10c915
Replace open(file, 'r')
with open(file)
2021-02-10 13:20:11 +03:00
Andrey Bienkowski
264a65da80
Use the set literal syntax
2021-02-10 11:45:29 +03:00
Tzu-ping Chung
7d43ec5166
More permissive output check
2021-01-27 21:55:50 +08:00
Tzu-ping Chung
68a86c53c7
Failing test for repeated fetch
2021-01-27 19:44:17 +08:00
Tzu-ping Chung
c72631a5f1
Pin setuptools under 52 for easy_install tests
2021-01-25 22:16:58 +08:00
Paul Moore
d6a21011b3
Remove support for extras after specifier in requirements
2021-01-23 12:06:44 +00:00
Stéphane Bidoul
8de9edf401
Merge pull request #9436 from sbidoul/vcs-url-sbi
...
Remove deprecated support for VCS pseudo URLs
2021-01-19 11:07:17 +01:00
Tzu-ping Chung
6c0e484703
Include both sources in inconsistency error
2021-01-18 19:00:52 +08:00
Stéphane Bidoul
b3761f6fab
Remove support for git+git@ pseudo VCS URLs.
...
Now that we don't need to support git@
pseudo-urls, we can simplify the test for
valid VCS URLs based on link.is_vcs, which
is turns is based on the URL scheme.
This also means we fail earlier if a git@ pseudo
URL is used.
Since VCS requirements are not validated to be URLs
in Requirement constructors, we can simplify update_editable.
2021-01-18 09:11:07 +01:00
Pradyun Gedam
3af9093a73
Merge pull request #9274 from sbidoul/pip-wheel-must-keep-clone-sbi
2021-01-17 15:30:57 +00:00
Miro Hrončok
886275de2d
Only query the keyring for URLs that actually trigger error 401
...
Fixes https://github.com/pypa/pip/issues/8090
2021-01-04 17:47:56 +01:00
Pradyun Gedam
f01d60c3e3
Merge pull request #9388 from hugovk/the-future-is-now
2021-01-02 13:03:06 +00: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
Hugo van Kemenade
1cabd3a609
The future is now
2020-12-28 18:34:06 +02:00
Stéphane Bidoul
e47734ed03
Add failing test that pip wheel -e keeps git clone in src
2020-12-27 17:13:29 +01: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
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
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
31eb524ff0
Merge pull request #9351 from jdufresne/object
...
Remove object from class definitions
2020-12-26 10:21:40 +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
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
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
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
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
Hugo van Kemenade
209ca8de8f
Remove default allow_stderr_warning=False
2020-12-22 16:40:01 +02:00
Hugo van Kemenade
817ee23051
Remove redundant Python 2.7 code
2020-12-22 09:06:26 +02:00
Nikita Chepanov
f8b03eefe2
Add --ignore-requires-python
support to pip download
2020-12-17 12:40:01 -05:00
Pradyun Gedam
7165ab8cb9
Revert "Skip candidate not providing valid metadata"
2020-12-15 10:17:20 +00:00
Tzu-ping Chung
145be2eaf2
Skip pip search tests unless explicitly requested
2020-12-15 17:23:20 +08:00
Tzu-ping Chung
d45541c8f3
Skip candidate not providing valid metadata
...
This is done by catching InstallationError from the underlying
distribution preparation logic. There are three cases to catch:
1. Candidates from indexes. These are simply ignored since we can
potentially satisfy the requirement with other candidates.
2. Candidates from URLs with a dist name (PEP 508 or #egg=). A new
UnsatisfiableRequirement class is introduced to represent this; it is
like an ExplicitRequirement without an underlying candidate. As the
name suggests, an instance of this can never be satisfied, and will
cause eventual backtracking.
3. Candidates from URLs without a dist name. This is only possible for
top-level user requirements, and no recourse is possible for them. So
we error out eagerly.
The InstallationError raised during distribution preparation is cached
in the factory, like successfully prepared candidates, since we don't
want to repeatedly try to build a candidate if we already know it'd
fail. Plus pip's preparation logic also does not allow packages to be
built multiple times anyway.
2020-12-12 02:23:32 +08:00
Noah Gorny
8bc9c33b36
tests: Add extra_index_url test case to help redact url
2020-12-02 22:53:43 +02:00
Pradyun Gedam
8b4652efad
Merge pull request #9163 from NoahGorny/redact-url-from-help
...
Redact auth from URL in UpdatingDefaultsHelpFormatter
2020-11-27 09:04:14 +00:00
Noah Gorny
4f8dfcf29d
tests: help: Test that auth is redacted from url in help menu
2020-11-26 15:15:21 +02:00
Pradyun Gedam
258242f177
Remove test for not reinstalling wheels, as requested
...
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:08 +00:00
Pradyun Gedam
9add1c1f61
Add deprecation warning when reinstalling sdists
...
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:08 +00:00
Pradyun Gedam
d6e3643fd9
Print a message and don't reinstall wheels
...
Also, adds a test for source distributions being reinstalled.
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:04 +00:00
Pradyun Gedam
bb7fce7209
Ensure we're not mishandling local indexes
...
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:12:37 +00:00
Pradyun Gedam
ce46a5e36d
Re-install local candidates unconditionally
...
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:12:08 +00:00
Pradyun Gedam
84382715f0
Merge pull request #9096 from uranusjr/new-resolver-constrainting-extraed
...
Constrainting an extra-ed dependency
2020-11-23 10:57:39 +00:00
Tzu-ping Chung
c3670b36cb
2020 resolver can constrain path/URL to versions
2020-11-23 11:51:14 +08: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
Tzu-ping Chung
0f6750c98c
Modify old tests to accomodate restriction removal
2020-11-21 22:14:24 +08:00
Tzu-ping Chung
9b3cd280fd
Add failing test
2020-11-21 22:14:24 +08:00
Stéphane Bidoul
11d07016d9
Add failing test for issue 9122
2020-11-12 13:20:45 +01:00
Stéphane Bidoul
9613c887f1
Test download editable
2020-11-12 13:20:44 +01:00
Pradyun Gedam
7be91574d9
Update message displayed on conflicts post-resolution
2020-11-12 06:53:29 +05:30
Tzu-ping Chung
d08b4d99e2
Use packaging.version to check version equality
2020-11-03 16:04:35 +08:00
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
Pradyun Gedam
64ff484c76
Skip tests that fail on Python 2
2020-10-30 23:09:00 +05:30
Pradyun Gedam
8a5656f7b1
Fix a flaky test
2020-10-30 23:08:59 +05:30
Pradyun Gedam
a56fefc764
Add debugging information to CI
2020-10-30 23:08:59 +05:30
Pradyun Gedam
53db14b188
Mark test about install order as an xfail
2020-10-30 23:08:51 +05:30
Pradyun Gedam
ec9bb10922
Update YAML tests for resolver changes
2020-10-30 23:08:47 +05:30
Pradyun Gedam
6f26fb9fee
Update tests for resolver changes
2020-10-30 23:08:31 +05:30
Xavier Fernandez
c33cf49381
freeze: deprecate option --find-links
2020-10-30 13:41:27 +01:00
Pradyun Gedam
5cba61e118
Switch to resolver variants in the test suite
2020-10-30 07:16:19 +05:30
Pradyun Gedam
6028e6a0fb
Change how we skip a failing test
2020-10-30 07:16:19 +05:30
Pradyun Gedam
00e531a16e
Merge pull request #9017 from pradyunsg/backtracking-messaging
2020-10-28 18:25:29 +05:30
Daniel Katz
7237bd3397
Respond to feedback, and add functional tests.
2020-10-27 19:00:22 -04:00
Pradyun Gedam
9a5441c331
Merge pull request #9049 from pfmoore/remove_build_dir
2020-10-27 22:41:47 +05:30
Pradyun Gedam
f2852cd775
Merge pull request #8991 from asottile/dead_code
...
delete some dead test code (VERBOSE_FALSE)
2020-10-27 21:45:20 +05:30
Paul Moore
52e1c9a39c
Not clear why this didn't fail before...
2020-10-27 15:49:38 +00:00
Paul Moore
0c2a2bc803
Mark a couple of tests that still use --build as xfail
2020-10-27 15:24:36 +00:00
Paul Moore
7c4c5b8330
Remove test_pip_wheel_fail_cause_of_previous_build_dir as it's no longer valid
2020-10-27 15:24:36 +00:00
Pradyun Gedam
f3307a5103
Present a message upon first backtrack
2020-10-27 19:32:36 +05:30
Pradyun Gedam
95171c881f
Display messages when backtracking on a package
2020-10-27 19:32:35 +05:30
Pradyun Gedam
abb3d0fae3
Move build_env tests to functional
...
These tests use the script fixture which as a 30s setup time on my
machine. This KILLS productivity when trying to run unit tests as part
of a feedback loop during development.
2020-10-25 23:32:26 +05:30
Tzu-ping Chung
d22775819b
Test for candidate ordering
2020-10-13 16:12:11 +08:00
Anthony Sottile
336e979894
delete some dead test code (VERBOSE_FALSE)
...
was just browsing through some files and noticed this
2020-10-12 16:05:05 -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
Pradyun Gedam
e61bb616ef
Merge pull request #8839 from uranusjr/new-resolver-hash-intersect
2020-09-17 10:58:44 +05:30
Tzu-ping Chung
179ccbe6f5
Add tests for empty hash intersection
2020-09-11 15:01:50 +08:00
Devesh Kumar Singh
9450f8837a
Use format options for abspath
2020-09-11 09:23:51 +05:30
Devesh Kumar Singh
d22becc073
Add unit tests for --abspath flag
2020-09-11 09:23:51 +05:30
Tzu-ping Chung
753ad4d230
F Python 2
2020-09-03 17:35:22 +08:00
Tzu-ping Chung
dfaa111004
Pull in hashes from constraint files
2020-09-03 17:26:52 +08:00
Tzu-ping Chung
700eb7734f
Hashes from lines should intersect, not union
2020-09-03 17:19:01 +08:00
Pradyun Gedam
567630b4b8
Merge pull request #8758 from uranusjr/new-resolver-requires-python-when-no-deps
2020-09-02 20:09:32 +05:30
Pradyun Gedam
a99190459e
Merge pull request #8817 from sbidoul/improve-git-checkout
2020-09-01 18:40:51 +05:30
Stéphane Bidoul
eff32df28a
Add spacing in test
...
Co-authored-by: Pradyun Gedam <3275593+pradyunsg@users.noreply.github.com>
2020-08-30 18:15:35 +02:00
Stéphane Bidoul
1c61b4679f
Add failing test fetching a git commit in refs
2020-08-30 11:47:13 +02:00
Tzu-ping Chung
8b2b92485c
Include Requires-Python dep even with --no-deps
2020-08-26 09:49:25 +08:00
Nguyễn Gia Phong
c84ef7a67c
Mark tests using remote svn and hg as xfail
...
The source repositories for testing is no longer available.
2020-08-24 09:43:50 +07:00
Nguyễn Gia Phong
14397418d1
Test hash checking for fast-deps
2020-08-17 20:46:39 +07:00
Nguyễn Gia Phong
46b938349a
Allow py2 deprecation warning from setuptools
2020-08-14 17:56:15 +07:00
Tzu-ping Chung
312d1d0473
Add failing test for constraints with markers
2020-08-07 13:43:49 +08:00
Nguyễn Gia Phong
709ad37b2f
Make assertion failure give better message ( #8692 )
2020-08-06 15:40:13 +05:30
Pradyun Gedam
7e6ff08aae
Merge pull request #8656 from chrahunt/gracefully-handle-bad-data-paths
...
Trace a better error message on installation failure due to invalid .data files in wheels
2020-08-02 19:55:40 +05:30
Pradyun Gedam
e51a027964
Merge pull request #8659 from uranusjr/fix-get-distribution-dot-in-name
...
Canonicalize name in check_if_exists
2020-08-02 07:44:24 +05:30
Nguyễn Gia Phong
0ef877339a
Make assertions independent of log prefixes
2020-08-01 20:26:44 +07:00
Tzu-ping Chung
1fd5098b24
Canonicalize name in check_if_exists
...
The previous implementation uses pkg_resources.get_distribution(), which
does not canonicalize the package name correctly, and fails when
combined with pip's own get_distribution(), which does canonicalize
names. This makes InstallRequirement.check_if_exists() only use pip's
own canonicalization logic so different package name forms are matched
as expected.
2020-07-30 22:04:51 +08:00
Chris Hunt
3f9b326c11
Provide a reasonable error on invalid scheme keys
...
Originally we would throw an `AttributeError` if a bad scheme key was
used. After refactoring we would throw a `KeyError`, which isn't much
better. Now we call out the wheel being processed, scheme key we didn't
recognize, and provide a list of the valid scheme keys. This would
likely be useful for people developing/testing the wheel.
2020-07-29 22:24:09 -04:00
Chris Hunt
864f0e0efa
Explicitly handle incorrect .data paths during wheel install
...
Previously our wheel installation process allowed wheels which contained
non-conforming contents in a contained .data directory.
After the refactoring to enable direct-from-wheel installation, pip
throws an exception when encountering these wheels, but does not include
any helpful information to pinpoint the cause.
Now if we encounter such a wheel, we trace an error that includes the
name of the requirement we're trying to install, the path to the wheel
file, the path we didn't understand, and a hint about what we expect.
2020-07-29 18:12:16 -04:00
Pradyun Gedam
a8edffda1c
Merge pull request #8594 from pradyunsg/improve-install-conflict-warning
2020-07-28 18:22:53 +05:30
Pradyun Gedam
3962f9d2b8
Moar tests getting updated
2020-07-27 19:51:47 +05:30
Pradyun Gedam
b9ff93f7ba
Update test messages to reflect new reality
2020-07-27 19:51:47 +05:30
Pradyun Gedam
c631de61b9
Drop no-longer-used deprecated_python fixture
2020-07-27 19:51:47 +05:30
Pradyun Gedam
e4f8e0a2b8
Change {matches -> contains}_expected_lines
...
This also updates invocations that can't be translated as-is into a
different equivalent check.
2020-07-27 19:51:47 +05:30
Pradyun Gedam
a89ede7da3
tests: Check only the last output lines
2020-07-27 19:51:47 +05:30
Pradyun Gedam
7056132f6f
Merge pull request #8601 from rouge8/use-feature-requirements-file
2020-07-27 13:19:51 +05:30
Tzu-ping Chung
906072a292
Test for conflict message from requirements.txt
2020-07-26 15:59:07 +08:00
Stéphane Bidoul
ccdfa74d79
Reduce reliance on .egg-info directories in test suite
...
Make more tests run with with_wheel and test
that a .dist-info directory is created.
2020-07-25 13:02:20 +02:00
Pradyun Gedam
89a51a6fef
Merge pull request #8588 from McSinyx/fast-deps
...
Use lazy wheel to obtain dep info for new resolver
2020-07-24 09:01:56 +05:30
Pradyun Gedam
f94580bad7
Print output in test_debug__library_versions
...
This should make debugging issues in this test easier.
2020-07-22 19:57:20 +05:30
Nguyễn Gia Phong
4efae5c21a
Add integration tests for experimental feature fast-deps
...
Test pip {download,install,wheel} where requirements have dependencies
listed in their wheels' metadata.
2020-07-21 16:00:34 +07:00
Andy Freeland
7a3c802626
Attempt to test --use-feature in pip freeze
...
I can't get the functional tests to run locally...
2020-07-19 02:44:12 -07:00
Pradyun Gedam
61d497120f
Merge pull request #8424 from jku/8288-deprecate-nonconforming-extras
2020-07-15 18:03:00 +05:30
Chris Hunt
328e4c06da
Merge pull request #8502 from uranusjr/new-resolver-binary-compat-on-target
...
Ensure binary compat is checked in --target
2020-07-13 20:38:13 -04:00
Jussi Kukkonen
76b20d738e
Deprecate requirements format "base>=1.0[extra]"
...
This requirements format does not conform to PEP-508. Currently the
extras specified like this work by accident (because _strip_extras()
also parses them). The version checks end up being done with a
misparsed version '1.0[extra]' -- this is not changed in this commit.
Add deprecation warning and fix the corresponding resolver test. Add a
command line test.
Note that we really only check that the Requirement has SpecifierSet
with a specifier that ends in a ']'. A valid version number cannot
contain ']' and no wheels currently on pypi have versions ending in ']'.
2020-07-13 12:33:50 +03:00
Chris Hunt
15b7afbcad
Merge pull request #8266 from gutsytechster/add_logs_for_install
...
feat(): Add logs for pip environment when installing
2020-07-10 09:36:13 -04:00
Prashant Sharma
f7abe1f874
test(functional/test_install): Use shared_data for installing package
2020-07-10 16:20:30 +05:30
Chris Hunt
e9508591ce
Merge pull request #8556 from chrahunt/maint/fail-on-install-location-options
...
Disallow explicitly passing install-location-related arguments in --install-options
2020-07-09 21:25:20 -04:00
Tzu-ping Chung
152642ddcf
Ensure binary compat is checked in --target
2020-07-09 21:23:21 +08:00
gutsytechster
0ccbad8367
feat(): Add logs for pip environment when installing
2020-07-09 18:15:43 +05:30
Christopher Hunt
2f9b50c097
Merge pull request #8534 from chrahunt/thoroughly-test-header-installation
...
Make wheel header installation test more explicit
2020-07-08 17:21:47 -04:00
Chris Hunt
89572a7d40
Throw CommandError on any location-related install options
2020-07-07 19:11:11 -04:00
Chris Hunt
b46d8ab01a
Refactor overriding test to not use disallowed option
...
Similar to our previous test refactoring, this removes the usage of
`--home` from the test command.
"Overriding" in the original test meant "placed after" in the
command-line arguments, which makes sense because setuptools will use
the last argument passed.
2020-07-07 19:11:02 -04:00
Chris Hunt
50d7b930d3
Create more robust test for isolated --install-option
...
The current test depends on passing `--home` to `--install-option`.
Since we would like that to fail, we need to use another argument. None
of the other possible arguments have a visible side-effect, so we just
write the provided arguments to a file and check that in the test.
2020-07-07 19:10:27 -04:00
Chris Hunt
ffddab6986
Test that RECORD is populated correctly for data files
2020-07-07 09:25:16 -04:00
Devesh Kumar Singh
04fedfe53c
Create custom get_distribution function
2020-07-06 13:42:05 +05:30
Devesh Kumar Singh
2bdec6c9fd
Parametrize unit test
2020-07-06 13:32:09 +05:30
Devesh Kumar Singh
40261a475f
Add unit tests to verify pkg name normalization
2020-07-06 13:32:09 +05:30
Tzu-ping Chung
01e0700e68
Skip installing if the version matches locally
...
This check only applies to explicit requirements since we avoid
downloading the dist from finder altogether when there is a matching
installation (although the check wouldn’t change the behaviour in that
case anyway).
We can do this when we build the `ExplicitRequirement` instead, like how
we did for `SpecifierRequirement`, but that would require us to resolve
the direct requirement’s version eagerly, which I don’t want to.
The implemented approach checks the version only after resolution, at
which point the distribution is already built anyway and the operation
is cheap.
2020-07-06 11:06:14 +08:00
Pradyun Gedam
8db4fc8224
Merge pull request #8530 from pradyunsg/rollout-flags
2020-07-05 01:50:25 +05:30
Pradyun Gedam
28592d4c31
Allow for the deprecation warning in tests
2020-07-05 01:01:02 +05:30
Chris Hunt
b5f02f9dd8
Check that expected text is written in include files
...
This is a little more specific than checking that we happened to create
an already-empty file, and is a better mirror for reality.
2020-07-04 14:23:10 -04:00
Chris Hunt
0b0d53e8fa
Use wheel helper function instead of pre-created wheel file
2020-07-04 14:22:15 -04:00
Chris Hunt
00191b2db1
Explicitly test that header file was created as-expected
...
Since this is the special part of this test. This gives us more
confidence that we're doing the right thing when removing the standalone
wheel file next.
2020-07-04 14:22:15 -04:00
Pradyun Gedam
79de2c8911
Switch to --use-feature for determining which resolver to use
...
Also changes all invocations in the tests, to the new flag.
2020-07-03 18:49:56 +05:30
Xavier Fernandez
09f9b0030d
Merge pull request #8096 from deveshks/list-config-files
...
Add option to list config files with pip config
2020-07-02 15:01:35 +02:00
Pradyun Gedam
e774eccf46
Merge pull request #8343 from uranusjr/entrypoint-unicode
2020-06-30 14:33:24 +00:00
Pradyun Gedam
93b0683d65
Merge pull request #8470 from deveshks/remove-always-unzip
2020-06-30 13:33:30 +00:00
Devesh Kumar Singh
056f119ca9
Add test to verify global config file path
2020-06-28 16:22:01 +05:30
Devesh Kumar Singh
6e62481568
Add unit tests for pip config debug
2020-06-28 16:22:01 +05:30
Xavier Fernandez
9a3c082070
Merge pull request #8182 from deveshks/no-input-tests
...
Enable --no-input option by adding docs and tests
2020-06-26 21:29:19 +02:00
Devesh Kumar Singh
4ecd7ecbc7
Assert result string in test_prompt_for_authentication
2020-06-26 07:22:21 +05:30