Commit Graph

2791 Commits

Author SHA1 Message Date
Pradyun Gedam 4f6bef6eb4
Merge pull request #7792 from pradyunsg/misc/utils-tags
Rename pep425tags -> utils.compatibility_tags
2020-03-12 14:46:52 +05:30
Paul Moore 9b10b93503 Implement the resolvelib Requirement class 2020-03-11 11:37:56 +00:00
Pradyun Gedam 4d1932fcdd
Merge pull request #7826 from jaraco/bugfix/6973-format-method
Convert the remaining '%' formatters to '.format'.
2020-03-10 14:58:25 +05:30
Prashant Sharma 115a83698f
fix(tests/lib/path): Remove duplicate resolve method (#7837) 2020-03-09 23:29:27 +01:00
Jason R. Coombs fd288ab0e5 Merge remote-tracking branch 'origin/master' into bugfix/6973-format-method 2020-03-06 18:17:10 -05:00
Jason R. Coombs 6282a307dc 👹 Feed the hobgoblins (delint). 2020-03-06 12:43:10 -05:00
Jason R. Coombs 3511d3d493 Convert the remaining '%' formatters to '.format'. Fixes #6973. 2020-03-06 12:43:03 -05:00
Jason R. Coombs 2c0d691893 Skip svn tests if svnadmin is not available. Fixes #7823. 2020-03-06 04:09:48 -05:00
Xavier Fernandez 3ce1872aaf Actually test user_config_dir in TestUserConfigDir 2020-02-28 10:58:54 +01:00
Xavier Fernandez b42a069920 utils.appdirs: drop unused user_data_dir function
The vendored appdir's user_data_dir function is used inside
user_config_dir which is itself tested.
2020-02-28 10:58:54 +01:00
sinscary 716c9202ee Raise error if --user and --target arguments are used together 2020-02-27 12:22:56 +05:30
Pradyun Gedam 3fa356a772
Update references to pep425tags 2020-02-26 10:24:43 -08:00
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