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

2779 commits

Author SHA1 Message Date
Chris Hunt
8362c20da5 Rename legacy resolver unit tests
It's a little long, but better to be consistent with our other test file
naming conventions until we come up with better ones.
2020-02-25 09:04:07 -05:00
Chris Hunt
fd74d0362c Move legacy_resolve to resolution.legacy.resolver
This gives us a concrete place to put the new resolver code and
resolver-specific modules (`resolution.resolver`).

The reason for another level of hierarchy compared to other modules
is to allow us to move other modules here as they
become implementation details of the legacy resolver. Examples I
have in mind are: `req.req_set`, `req.req_install`,
`req.constructors`, and `operations.prepare`.
2020-02-25 09:04:06 -05:00
Chris Hunt
40bc4ea8fe Move network unit tests to align with subpackage names 2020-02-23 16:22:30 -05:00
Christopher Hunt
40523794d8
Merge pull request #7747 from pfmoore/parsed_requirement
Refactor parse_requirements to be independent of InstallRequirement
2020-02-24 00:21:28 +08:00
Anudit Nagar
082c0f01d2
Update old-style formatting to new-style formatting (#7762) 2020-02-21 21:48:14 +05:30
Nitesh Sharma
ce1e0f470a
Move UI helpers to cli subpackage (#6727) 2020-02-21 14:01:13 +05:30
Pradyun Gedam
e648e00dc0
pip is spelt all-lowercase 2020-02-18 10:55:16 +05:30
Paul Moore
f085bb0e0e Merge branch 'master' into parsed_requirement 2020-02-14 20:34:44 +00:00
Paul Moore
aac5d821f9 Move make_requirement to pip._internal.req.constructors (and rename it) 2020-02-14 12:22:50 +00:00
Paul Moore
90e4eb3eed Make parse_requirements return a ParsedRequirement 2020-02-14 11:52:53 +00:00
Pradyun Gedam
cdae7277ef
Merge pull request #7596 from uranusjr/6446-link-url-quoting
Fix incorrect quoting Link.url
2020-02-14 16:00:43 +05:30
Paul Moore
e2a57fd1e6 Refactor to reduce coupling.
* Make ParsedLine record the type of line
* Split handle_line to allow passing arguments only where needed
* Remove unneeded attributes from ParsedRequirement
2020-02-14 09:56:42 +00:00
Paul Moore
f2e49b3946 Use a new ParsedRequirement class to communicate between handle_line and parse_requirements 2020-02-13 10:39:17 +00:00
Pradyun Gedam
313740f6ee
Merge pull request #7593 from uranusjr/hg-under-git
Detect all registered VCS and choose inner-most
2020-02-08 17:34:31 +05:30
Paul Moore
6f154f5546
Merge pull request #7707 from pfmoore/refactor_options
Pass individual options to InstallRequirement rather than an options object
2020-02-07 14:22:10 +00:00
Paul Moore
a9f1d8562b Pass individual options to InstallRequirement rather than an options object 2020-02-06 16:05:11 +00:00
Chris Hunt
e7998a3617 Rename populate_requirement_set to get_requirements 2020-02-05 22:30:07 -05:00
Chris Hunt
de5ec7e884 Remove unused requirement_set argument 2020-02-05 22:30:07 -05:00
Chris Hunt
9c58aa7eb5 Do not use InstallRequirement in warn_deprecated_install_options
This only needed a list of requirements, so give it just that.
2020-02-05 22:30:07 -05:00
Chris Hunt
fd815bc1fa Pass in a plain list of InstallRequirement to Resolver.resolve
Further simplifies the Resolver interface, and will give us the
opportunity to remove any knowledge of RequirementSet from the
individual commands.
2020-02-05 22:30:05 -05:00
Chris Hunt
550ae907bd Parameterize check_supported_wheels to Resolver.resolve
This reduces our dependence on the input RequirementSet.
2020-02-05 22:29:46 -05:00
Chris Hunt
58c06299db Return a different RequirementSet from Resolver.resolve
This makes the resolver interface simpler by returning a brand new
RequirementSet vs mutating the one that was input to the function, and
will let us specialize RequirementSet for the different use cases.
2020-02-05 22:29:30 -05:00
Chris Hunt
98cd193727 Remove delete_marker_file writing in tests
Nothing checks for this file, so no need to write it.
2020-02-05 20:14:44 -05:00
Chris Hunt
8197a4bbc5 Do not write delete marker file to track source_dir delete preference
Previously we were writing a delete marker file which is checked in
InstallRequirement.remove_temporary_source which is only invoked if the
user did not pass --no-clean (and a PreviousBuildDirError was not
raised). Since our TempDirectory machinery now respects these conditions
we can just wrap our source directory in that instead of using this
ad-hoc mechanism for tracking our delete preference.

This will let us clean up a lot of dead code that only existed for this
use case.
2020-02-05 20:14:44 -05:00
Chris Hunt
b8c0d0175d Do not test unpack_http_url or unpack_file_url
The tests for unpack_{file,http}_url relies on these functions to both
retrieve and unpack. We want to move unpacking out, so call unpack_url
instead.
2020-02-04 21:49:40 -05:00
Chris Hunt
39d1c51fdb Globally-manage BuildEnvironment._temp_dir 2020-02-04 20:32:27 -05:00
Christopher Hunt
f537db5021
Merge pull request #7651 from chrahunt/refactor/wheel-builder-helper-2
Add new wheel builder test helper
2020-02-03 23:45:23 +08:00
Bhavam Vidyarthi
7534dccd6c
Removed tests/scripts folder with its contents (#7680) 2020-02-03 05:17:02 +08:00
Chris Hunt
667dc392e5 Remove unused futurewheel fixture 2020-01-31 19:33:51 -05:00
Chris Hunt
e83e134f5f Use wheel_builder for future wheel functional test 2020-01-31 19:33:48 -05:00
Chris Hunt
6d8a58f7e1 Add wheel builder test helper
As we introduce stricter metadata parsing, we will need to ensure that
the wheel files used in our tests are compliant (except in the specific
way that we're testing against).

Currently we have a large number of test cases relying on undocumented or
under-documented wheel files that have various inconsistencies
(incorrect name, missing fields) that are unrelated to the features
actually under test.

With a new wheel builder helper function, we will be able to replace all
of our instances of pre-built wheel test fixtures with dynamically-generated
files in code that are correct by default.
2020-01-31 19:30:19 -05:00
Chris Hunt
f2af7df453 Use tempdir_registry to control auto-deleted files globally
Next we can actually transition some files to be globally-managed that
are only deleted conditionally.
2020-01-29 23:04:26 -05:00
Chris Hunt
45991bcc1e Use explicit default value for TempDirectory delete flag
Now we can opt-in to globally-managed + globally-configured file
deletion for pre-existing directories by passing an explicit `None`.
2020-01-29 23:04:14 -05:00
Chris Hunt
dd8753cdee Mitigate Windows test failures due to PAX-format wheel release 2020-01-29 08:53:23 -05:00
Deepak Sharma
b242c3979a String formatting updated 2020-01-23 18:09:59 +05:30
Christopher Hunt
f1cd4cb48e
Merge pull request #7608 from uranusjr/global-cleanup
Delay TempDirectory.delete resolution to cleanup
2020-01-22 18:25:05 +08:00
Stéphane Bidoul (ACSONE)
0e1e0ef566 _should_cache does not depend on check_binary_allowed
_should_cache is only called by _get_cache_dir.

In pip install mode, _get_cache_dir is never called when
check_binary_allowed returns False because in that case
should_build_for_install_command has returned False before
and the build was skipped.

In pip wheel mode, check_binary_allowed always returns True
(because it is not passed to the build function).

So _should_cache can use _always_true for check_binary_allowed.

*Alternative*

Alternatively, we could have passed check_binary_allowed
to build in pip wheel mode. The only difference is that wheels built
locally from *legacy* packages would then not be cached,
when pip wheel is used with --no-binary.
2020-01-20 10:41:48 +01:00
Tzu-ping Chung
35377c995c Add test for tempdir registry lazy eval 2020-01-19 18:22:14 +07:00
Pradyun Gedam
f1cf84e2f8
Merge pull request #7542 from sbidoul/normalize-cache-dir-sbi
Eagerly normalize cache directory
2020-01-18 22:38:59 +05:30
Pradyun Gedam
8bc1024a13
Touch command may not be available on Windows (#7601) 2020-01-15 16:08:17 +00:00
Paul Moore
3288d902e6 Touch command may not be available on Windows 2020-01-15 15:14:22 +00:00
Tzu-ping Chung
2dc061d960 Normailze case in tests 2020-01-15 17:50:41 +08:00
Christopher Hunt
f2bb7c4e57
Merge pull request #7588 from uranusjr/reinstall-test
Delete a file to let --force-reinstall fix it
2020-01-15 11:48:27 +08:00
Tzu-ping Chung
8b1f4d80c1 Modify test to unify site_packages path usages 2020-01-14 21:56:23 +08:00
Tzu-ping Chung
d301cbeb4e Add marker to Mercurial test 2020-01-14 18:00:49 +08:00
Tzu-ping Chung
284352a42c Add test to verify freeze output 2020-01-14 17:54:54 +08:00
Tzu-ping Chung
e5c43ed6af Add tests for get_repository_root 2020-01-14 16:45:28 +08:00
Tzu-ping Chung
cdd7821d92 Fix incorrect quoting Link.url
Cherry-picked manually from atugushev:fix-issue-6446.

Co-Authored-By: Albert Tugushev <albert@tugushev.ru>
2020-01-14 16:12:11 +08:00
Christopher Hunt
cf722df4f9
Merge pull request #7581 from chrahunt/refactor/split-install-tests
Split relative requirement install tests
2020-01-14 01:40:29 +08:00
Pradyun Gedam
b411cdbdf5
Azure Pipelines: Test Windows on Python 3.8 (#7320) 2020-01-13 12:33:43 +00:00