Stéphane Bidoul (ACSONE)
cf21401fd7
Make wheelbuilder.build return successes too
...
Also, pluralize variable names for readability and consistency with
similar variables in callers.
2019-12-26 21:43:57 +01:00
Christopher Hunt
0292938f89
Merge pull request #7501 from uranusjr/appdirs-patch
2019-12-24 23:30:55 +08:00
Tzu-ping Chung
c98c0ad79c
Default to /etc/xdg if XDG_CONFIG_DIRS if empty
2019-12-23 14:33:17 +08:00
Christopher Hunt
3f4bb75fa4
Merge pull request #7499 from chrahunt/feature/add-old-entrypoints
...
Add old pip entrypoints
2019-12-23 05:40:10 +08:00
Pradyun Gedam
c06874c471
Merge pull request #7490 from sbidoul/legacy-cache-bug-sbi
...
Fix cache bug with legacy cache entries
2019-12-21 07:27:46 +00:00
Tzu-ping Chung
2ccc5c055d
Match site_config_dirs for empty XDG_CONFIG_DIRS
2019-12-20 14:36:30 +08:00
Tzu-ping Chung
204887da03
Apply changes from bundled appdirs to vendored
...
* Convert Windows app data directory values to bytes on Python 2, so the
output type is consistent across platforms (pypa/pip#4000 )
* Also look in ~/.config for user config on macOS (pypa/pip#4100 )
* Remove pywin32 dependency, only use ctypes and winreg for directory
lookup on Windows (pypa/pip#2467 )
* Always use os.path.join() instead of os.sep.join() so cross-platform
tests work as expected (pypa/pip#3275 )
2019-12-19 17:15:03 +08:00
Chris Hunt
82a2651f93
Move pip._internal.main to cli submodule
...
Moving this out of the way gives us the flexibility to define wrappers
that will redirect requests to our old entrypoints to our new one.
2019-12-18 21:09:22 -05:00
Christopher Hunt
ab12706aaa
Merge pull request #7478 from chrahunt/refactor/make-functional-download-tests
...
Make unpack_* unit tests into functional tests
2019-12-17 07:55:29 +08:00
Stéphane Bidoul (ACSONE)
36ff884673
Fix WheelCache.get in presence of legacy cache keys
2019-12-15 23:43:36 +01:00
Stéphane Bidoul (ACSONE)
80bfba3302
Improve WheelCache.get test
2019-12-15 23:41:03 +01:00
Stéphane Bidoul (ACSONE)
9c74c0214a
Add failing test for legacy cache keys
2019-12-15 23:41:03 +01:00
Chris Hunt
c565d7a1b2
Switch to install_wheel in unit tests
...
Since it tests install_unpacked_wheel, the coverage should be the same.
2019-12-14 11:38:31 -05:00
Chris Hunt
9faa9aef29
Make download_http_url existing bad file test functional
...
Reduces coupling between tests and code.
2019-12-13 20:30:45 -05:00
Chris Hunt
d3920f299f
Make unpack_file_url existing bad file test functional
...
Reduces coupling between tests and code.
2019-12-13 20:30:45 -05:00
Chris Hunt
fe24c7fc16
Make unpack_file_url existing matching file test functional
...
Reduces coupling between tests and code.
2019-12-13 20:30:45 -05:00
Chris Hunt
30c2d979b0
Make unpack_file_url download test to functional
...
This and the next several changes will uncouple the tests from the
current implementation, allowing us to factor the actual file download
out of `unpack_file_url` and `unpack_http_url`.
2019-12-13 20:30:45 -05:00
Pradyun Gedam
8e7a87bf4b
Factor out pep517 wheel build function ( #7473 )
2019-12-13 04:26:44 +00:00
Christopher Hunt
d7eaede434
Revert "Add new option: pip wheel --save-wheel-names ( #6377 )" ( #7420 )
...
This reverts commit bcad1b1cb5
, reversing
changes made to f86490317a
.
As discussed, we should rethink the interface of this command output as
part of larger CLI usability review. In the interim, the same
functionality can be achieved using straightforward shell commands.
2019-12-13 07:57:05 +08:00
Stéphane Bidoul (ACSONE)
2eff06e7cc
Make WheelBuilder should_unpack argument explicit
2019-12-12 23:46:05 +01:00
Pradyun Gedam
ce5edd4841
Better workaround for cache poisoning ( #3025 , #7319 )
2019-12-12 11:28:57 +00:00
Chris Hunt
0457826bd0
Add global TempDirectory manager
...
In cases where there is not a clear scope, or where enforcing a scope
and passing a temp directory to callees creates unnecessary coupling
between components, this will let us tie the lifetime of temporary
directories to the lifetime of the application without using e.g.
atexit or finalizers.
This has the benefit of being easier to test and reason about.
2019-12-09 06:06:37 +08:00
Chris Hunt
24d2f1e719
Remove unused arguments
2019-12-05 20:29:43 -05:00
Chris Hunt
7db57478a2
Construct Downloader outside RequirementPreparer
...
Reduces RequirementPreparer responsibilities, and will let us get rid of
some constructor arguments.
2019-12-05 20:26:53 -05:00
Chris Hunt
762e4a0817
Move parse_content_disposition to network.download
2019-12-04 18:31:53 -05:00
Chris Hunt
32b0fc23ab
Move sanitize_content_filename to network.download
2019-12-04 18:31:53 -05:00
Chris Hunt
3fbc991f0c
Move _prepare_download to network.download
2019-12-04 18:31:53 -05:00
Chris Hunt
db766f3c95
Move helper mock classes to dedicated module
...
When we factor out tests these will be needed in both sets, and it's
easier to refactor tests later if we avoid creating a dependency between
test files.
2019-12-04 18:30:21 -05:00
Christopher Hunt
830e29e189
Move wheel to operations.install.wheel ( #7421 )
...
* Update documentation
For now just fixing the paths and adding a sub-package docstring.
2019-12-04 06:02:39 +08:00
Stéphane Bidoul (ACSONE)
824dca1060
Better support for unicode cache entries
2019-12-02 12:07:19 +01:00
Stéphane Bidoul (ACSONE)
66ba51ca7d
Use legacy cache entries when they exist.
...
Pip 20 changes the cache key format to include the
interpreter name. To avoid invalidating all existing caches,
we continue using existing cache entries that were computed
with the legacy algorithm. This should not regress issue #3025
because wheel cached in such legacy entries should have
the python implementation tag set.
2019-12-02 12:07:19 +01:00
Stéphane Bidoul (ACSONE)
c4ef6163e5
New cache key generation algorithm
...
Instead of building an URL-ish string that could be
complex to describe and reproduce, generate a dictionary that is
hashed with a simple algorithm.
2019-12-02 12:07:19 +01:00
Stéphane Bidoul (ACSONE)
e0165e7b30
Remove unused wheel_builder python_tag argument
2019-12-02 12:07:18 +01:00
Chris Hunt
b8c16a0dc8
Move Wheel tests
2019-12-02 11:52:51 +08:00
Chris Hunt
60f6ed9387
Move wheel.Wheel to models.wheel.Wheel
...
This aligns more closely with how the class is used and makes it easier
to move the rest of the wheel module to a dedicated module for
installation.
2019-12-02 11:52:51 +08:00
Chris Hunt
bf26185d55
Import Wheel in tests directly
2019-12-02 11:52:51 +08:00
Chris Hunt
1abf978e88
Move format_tag to pep425tags
...
This is a more appropriate place for the function, since it is more
related to tags than wheels, and will make it easier to refactor Wheel
into its own module.
2019-12-02 11:52:51 +08:00
Chris Hunt
b8f626ace6
Deprecate install-location-related options in --install-option
2019-11-30 17:42:48 -05:00
Chris Hunt
55a943e556
Add distutils args helpers
...
The utils.distutils_args.parse_args function can recognize distutils
arguments so we can deprecate their usage.
2019-11-30 17:39:56 -05:00
Christopher Hunt
5ba702894a
Remove old workaround for Debian Python patch ( #7401 )
2019-11-26 11:58:46 +08:00
Xavier Fernandez
db1a2754bb
Fix logging of cached response
...
Cached responses often (always ?) provide a length meaning they were
never logged as such.
2019-11-25 23:15:00 +01:00
Xavier Fernandez
95576102c5
Tweak format_size utility function to include a space ( #7399 )
2019-11-25 22:09:10 +01:00
Xavier Fernandez
8114003e62
Add basic tests for format_size
2019-11-25 14:53:23 +01:00
Chris Hunt
19806574e5
Move Downloader out of unpack_http_url
...
Reduces scope of session and progress_bar.
2019-11-21 19:11:46 -05:00
Chris Hunt
4be0a5445a
Move Downloader up out of _download_http_url
...
Reduces exposure of session and progress_bar.
2019-11-21 19:11:46 -05:00
mdebi
f6aaba9fd9
Warn if a path in PATH starts with tilde during install
2019-11-16 00:16:41 +01:00
Xavier Fernandez
9e1b1c7466
Merge pull request #7335 from sbidoul/subdirectory-cache-key-sbi
...
Include subdirectory URL fragments in cache keys
2019-11-15 23:14:16 +01:00
Christopher Hunt
6bc7a1c5ad
Merge pull request #7342 from chrahunt/refactor/simplify-tags
...
Make versions argument singular for pep425tags.get_supported()
2019-11-13 10:50:47 +08:00
Chris Hunt
7d27bff299
Make versions argument singular for pep425tags.get_supported()
...
This simplifies the interface of this function in preparation for
switching to packaging.tags.
2019-11-12 20:58:44 -05:00
Stéphane Bidoul (ACSONE)
613cc01c0b
Include subdirectory URL fragment in the cache key
2019-11-12 08:50:21 +01:00