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

9043 commits

Author SHA1 Message Date
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
441b211048 Remove old comment from Resolver.resolve
This was moved to RequirementCommand.populate_requirement_set, so it's
no longer applicable in this context.
2020-02-05 21:08:58 -05:00
Christopher Hunt
b395c9f63b
Merge pull request #7696 from chrahunt/refactor/auto-cleanup-source-dir
Globally manage InstallRequirement.source_dir
2020-02-06 10:00:38 +08:00
Chris Hunt
85ab574dc1 Remove unused RequirementSet.reqs_to_cleanup 2020-02-05 20:16:05 -05:00
Chris Hunt
4a93045be1 Remove no-op RequirementSet.cleanup_files 2020-02-05 20:16:05 -05:00
Chris Hunt
5cca8f10b3 Remove InstallRequirement.remove_temporary_source
Since all directories are now globally-managed, we don't need to be
concerned with resetting the member values.

This will also let us remove several responsibilities from
RequirementSet, which will make integrating the new resolver easier.
2020-02-05 20:14:44 -05:00
Chris Hunt
efe663d476 Remove unused utils.marker_files 2020-02-05 20:14:44 -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
e6cc9e9351 Do not remove source directory in cleanup_temporary_source
Since nothing in our code writes the delete marker file, this block will
never execute.
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
470c39990e Wrap InstallRequirement.ensure_build_location in TempDirectory
Since we explicitly disable deletion this is a no-op, but we'll
parameterize the deletion soon.
2020-02-05 20:14:44 -05:00
Chris Hunt
c7cb3cd81d Calculate autodelete_unpacked earlier in prepare_linked_requirement
We want to use this value to determine whether a globally-managed
source_dir should delegate choosing deletion to the global tempdir
manager, so it needs to be above our call to
InstallRequirement.ensure_has_source_dir.
2020-02-05 20:14:44 -05:00
Xavier Fernandez
19665791fa
Merge pull request #7694 from chrahunt/refactor/move-up-file-unpacking
Move file unpacking out of lower level functions in operations.prepare
2020-02-05 23:08:25 +01:00
Xavier Fernandez
f97e88f8fc
Merge pull request #7697 from chrahunt/refactor/cleanup-wheel-cache-cleanup
Cleanup WheelCache cleanup
2020-02-05 22:57:14 +01:00
Chris Hunt
0410535ef2 Remove unused WheelCache.cleanup 2020-02-04 23:11:27 -05:00
Chris Hunt
77e9b79d0e Remove no-op calls to WheelCache.cleanup 2020-02-04 23:11:27 -05:00
Chris Hunt
eead579049 Remove no-op calls to WheelCache.cleanup 2020-02-04 23:11:27 -05:00
Chris Hunt
34df623016 Globally manage EphemWheelCache temp directory 2020-02-04 23:11:25 -05:00
Chris Hunt
63743fcc30 Make ephem-wheel-cache tempdir name globally accessible 2020-02-04 23:01:24 -05:00
Chris Hunt
4acc059cfd Remove unused argument 2020-02-04 21:55:42 -05:00
Chris Hunt
c825c53f76 Rename unpack_{file,http}_url since they no longer unpack 2020-02-04 21:55:12 -05:00
Chris Hunt
ada2f55f13 Inline file variable 2020-02-04 21:49:42 -05:00
Chris Hunt
135f2ac0ef Move unpacking into unpack_url 2020-02-04 21:49:42 -05:00
Chris Hunt
35a52c1397 Hold file in intermediate variable in unpack_url 2020-02-04 21:49:42 -05:00
Chris Hunt
71eaa4658f Return File from unpack_* functions
Since we need both the file path and content type to unpack, and we want
to move unpacking out of the lower-level functions, return all the
information needed so it's easier to move the unpacking out.
2020-02-04 21:49:42 -05:00
Chris Hunt
791725aad9 Move directory handling from unpack_file_url to unpack_url 2020-02-04 21:49:42 -05:00
Chris Hunt
395787bebc Inline link.file_path in unpack_file_url 2020-02-04 21:49:42 -05:00
Chris Hunt
062ccf9dba Use early-return style in unpack_url
This will make it easier to move directory handling up to unpack_url.
2020-02-04 21:49:42 -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
Christopher Hunt
34d97cff1e
Merge pull request #7677 from chrahunt/refactor/remove-req-set-cleanup
Globally manage and track some temp build directories
2020-02-05 10:07:13 +08:00
Chris Hunt
e800cb1604 Make BuildEnvironment._temp_dir a local variable 2020-02-04 20:32:58 -05:00
Chris Hunt
d99462a067 Remove unused BuildEnvironment.cleanup 2020-02-04 20:32:29 -05:00
Chris Hunt
39d1c51fdb Globally-manage BuildEnvironment._temp_dir 2020-02-04 20:32:27 -05:00
Chris Hunt
bdde27bfd8 Add BuildEnvironment._temp_dir to tempdir registry
Similar to the InstallRequirement temp build dir, now we'll be able to
refactor this to be globally managed.
2020-02-04 20:31:34 -05:00
Chris Hunt
c35cb7819b Globally-manage InstallRequirement._temp_build_dir
InstallRequirement.remove_temporary_source was already being called at
the end of processing (as part of RequirementSet.cleanup()), so this
doesn't change behavior - cleanup still happens right after the command
finishes.
2020-02-04 20:29:57 -05:00
Chris Hunt
2f4bfc3efc Add InstallRequirement._temp_build_dir to tempdir registry
Now we can refactor this to be globally managed, and it will have the
same behavior as it does currently (if there is any
PreviousBuildDirError it will not be cleaned up).
2020-02-04 20:29:26 -05:00
Chris Hunt
7068e58b6f Configure tempdir registry
This mirrors the current logic within the individual requirement-related
commands (install, wheel) for setting options.no_clean, which is used to
determine whether we need to delete directories.

Next, we'll add the actual directories to track and remove them from
being managed by other objects.
2020-02-04 20:22:39 -05:00
Chris Hunt
0b4ec28a39 Centralize addition of no_clean argument
We want to rely on --no-clean being a valid option for
RequirementCommand types, so move it to one place close to the code that
will depend on it.
2020-02-04 20:22:39 -05:00
Christopher Hunt
500b0dd562
Merge pull request #7692 from pradyunsg/misc/drop-debundling-news-fragment
Drop NEWS entry for a debundling change
2020-02-05 09:16:57 +08:00
Pradyun Gedam
0bf5fc85d8
Add a .vendor NEWS fragment 2020-02-04 18:50:38 +05:30
Pradyun Gedam
51ecf4de35
Drop NEWS entry for a debundling change 2020-02-04 16:08:40 +05:30
Pradyun Gedam
d41741fb6c
Merge pull request #7690 from lazka/vendored-debundled-appdirs-alias
Fix debundled support by add a missing entry for appdirs
2020-02-04 15:59:30 +05:30
Christoph Reiter
9be7454fd6 fix un-vendored support; add missing entry for appdirs
pip has started to use the vendored appdirs directly since #7501
but didn't add an alias for the unbundled case.

This adds the missing alias.
2020-02-04 10:49:40 +01: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
@Switch01
e6a29690d4 Update sphinx version to 2.3.1 2020-02-02 22:16:25 +01:00
Christopher Hunt
a635e0d216
Merge pull request #7665 from webknjaz/misc/nox-build-cleanup-suggestion
Suggest a way of cleaning dist if non-empty
2020-02-03 01:16:57 +08:00
Christian Clauss
f58ec8365b
NEWS.rst: Fix typos discovered by codespell (#7642)
https://github.com/codespell-project/codespell
2020-02-03 01:14:08 +08:00
Pradyun Gedam
37c75b671f
Merge pull request #7679 from pypa/no-more-bot
Stop suggesting use of the /request-review bot
2020-02-02 16:11:20 +05:30
Pradyun Gedam
e060970d51
Merge pull request #7675 from deepak1725/string-format2
Updated string_formatting to .format
2020-02-02 02:05:34 +05:30