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
Tzu-ping Chung
2472a6e51d
Fix path in _vendor/README.rst to match reality
2019-12-18 13:23:15 +01:00
Pradyun Gedam
b375580132
Move logic for legacy installs to dedicated module
2019-12-18 16:11:12 +05:30
Pradyun Gedam
2e41be817a
Clarify that editable_legacy does editable installs
2019-12-18 15:47:45 +05:30
Pradyun Gedam
d613433ad8
Merge pull request #7492 from pradyunsg/refactor/expand-metadata-generation-arguments
...
Expand arguments to metadata generation functions
2019-12-18 09:40:14 +00:00
Pradyun Gedam
75f7f06ca7
Move assertions to calling functions
2019-12-18 11:53:34 +05:30
Christopher Hunt
2a48286178
Merge pull request #7484 from sbidoul/wheel-builder-disentangle-3-sbi
...
Add missing error logging in WheelBuilder
2019-12-18 13:12:54 +08: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)
2a1fb915e2
Remove useless pass statement
...
Co-Authored-By: Christopher Hunt <chrahunt@gmail.com>
2019-12-16 17:44:34 +01:00
Stéphane Bidoul (ACSONE)
74c2837adf
Simplify handling of cache candidate directories
2019-12-16 17:39:25 +01:00
Pradyun Gedam
350a5986c9
Expand the arguments for modern metadata generation
2019-12-16 17:26:17 +05:30
Pradyun Gedam
00bc7d1727
Expand the arguments for legacy metadata generation
2019-12-16 17:26:17 +05:30
Pradyun Gedam
17428d9eab
Add an InstallRequirement._generate_metadata method
2019-12-16 17:26:12 +05:30
Stéphane Bidoul (ACSONE)
45222a2b36
ensure cache dir is present before building
2019-12-15 23:56:20 +01: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
Pradyun Gedam
b2fcaac533
Merge pull request #7485 from pradyunsg/vendoring/switch-to-dedicated-tool
...
Switch to a dedicated tool for vendoring pip's dependencies
2019-12-15 17:19:07 +00:00
Pradyun Gedam
6929cc6d6b
Address review comments
...
These were all nitpicks but hey, that's good news. :)
2019-12-15 21:22:04 +05:30
Christopher Hunt
d6491fe666
Merge pull request #7483 from chrahunt/refactor/install-packed-wheel
...
Add downloaded/local archive path to InstallRequirement
2019-12-15 23:50:36 +08:00
Pradyun Gedam
618b2d8393
📰
2019-12-15 12:34:35 +05:30
victorvpaulo
81805a5776
Add option to silence warnings related to deprecation of Python versions ( #6739 )
...
* Add option to silence warnings related to deprecation of Python versions
* Move skip_if_python2 and skip_if_not_python2 decorator declaratios to test/lib/__init__.py and use them in test_warning.py
* Add tests to ensure that python version deprecation warning is shown correctly and can be silenced by a flag.
* Add new test to ensure that --no-python-version-warning flag does nothing if python version is not 2
2019-12-15 09:59:34 +08:00
Pradyun Gedam
53aaa3e40b
Drop invoke task for vendoring dependencies
...
This is no longer needed, since `vendoring` does what we need here.
2019-12-15 04:02:17 +05:30
Pradyun Gedam
248f6b2fc6
Switch tox -e vendoring, to use vendoring
2019-12-15 04:02:12 +05:30
Pradyun Gedam
cdee9e2c33
Add configuration for using vendoring
2019-12-15 04:00:07 +05:30
Stéphane Bidoul (ACSONE)
2f125342e0
Remove now redundant ensure_dir
...
Since _build_one ensure the output dir is
present and does proper error logging,
we can remove ensure_dir from build(), further
simplifying that method.
2019-12-14 23:01:58 +01:00
Stéphane Bidoul (ACSONE)
5de1d51610
Ensure output directory is present inside _build_one
2019-12-14 23:01:58 +01:00
Stéphane Bidoul (ACSONE)
f60d15ca87
Add missing error report
...
Use the same error message as in WheelBuilder.build(),
include the exception in the message.
2019-12-14 23:01:58 +01:00
Christopher Hunt
9573c2b6c6
Merge pull request #7476 from sbidoul/wheel-builder-disentangle-2-sbi
...
Some more trivial refactorings in WheelBuilder
2019-12-15 05:28:47 +08:00
Chris Hunt
11472e1b12
Switch to install_wheel in InstallRequirement
...
This removes one of usages of the overloaded `source_dir` member.
We know the local_file_path must be set at this point because it is set
in the only 3 places that wheels are added to InstallRequirement.
2019-12-14 12:15:33 -05:00
Chris Hunt
327c295554
Keep path to downloaded archive on InstallRequirement
...
Now we'll be able to transition other parts of the code to use
pre-existing archives directly instead of relying on unpacked sources.
2019-12-14 11:59:42 -05: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
3f912ad48e
Add function to install directly from wheel files
...
This will help us avoid some complicated directory-changing logic in
WheelBuilder.
2019-12-14 11:38:31 -05:00
Christopher Hunt
fedde5fa2c
Do not cleanup archive download tempdir immediately ( #7479 )
...
* Do not cleanup download tempdir immediately
The previous logic forced us to handle populating the download directory
in this function right next to the download and hash checking. By
extending the lifetime of the directory we can more easily separate the
code.
This also allows for additional optimizations later: by using metadata
from wheels directly instead of unpacking them, we can avoid extracting
wheels unnecessarily. Unpacked files can be easily 3x larger than the
archives themselves, so this should reduce disk utilization and general
IO significantly.
2019-12-14 23:19:25 +08:00
Stéphane Bidoul (ACSONE)
510970968f
Remove unused WheelBuilder attribute
...
Remnant of a reverted feature.
2019-12-14 12:47:23 +01:00
Stéphane Bidoul (ACSONE)
c0d05dc6a3
Make _collect_buildset a standalone function
2019-12-14 12:47:23 +01:00
Stéphane Bidoul (ACSONE)
b9faa61c8f
Remove incorrect os.path.join in WheelBuilder
...
The join is done in _build_one_inside_env.
The bug as undetected because the cache directory is absolute most of
the time.
2019-12-14 12:47:23 +01:00
Stéphane Bidoul (ACSONE)
32cabbf716
Add test for pip wheel with non-absolute cache dir
2019-12-14 12:47:14 +01: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
d30f406c37
Check file actually used against hashes
...
This makes the behavior of this function easier to test, since we can
use a different file to distinguish the already-downloaded case from the
existing-file-hash-failed case.
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
Chris Hunt
50efb55072
Add tests.lib.path.Path.read_bytes
...
To be used in some upcoming tests.
2019-12-13 20:30:45 -05:00
Stéphane Bidoul (ACSONE)
98f6ff8661
Rename output_dir to cache_dir in WheelBuilder for clarity
2019-12-13 22:01:54 +01:00
Stéphane Bidoul (ACSONE)
9e737fe511
Extract buildset collection from WheelBuilder.build
...
Towards splitting the build method in two
for pip wheel and pip install cases.
2019-12-13 21:42:06 +01:00
Pradyun Gedam
b9bdad23bc
Do not depend on cached download for copying downloaded file ( #7474 )
2019-12-13 10:19:56 +00:00
Pradyun Gedam
b44c217aa9
Remove disallow_untyped_defs=False for some modules ( #7475 )
2019-12-13 10:02:50 +00:00
Maxim Kurnikov
3cb30385d8
remove disallow_untyped_defs=False for more modules
2019-12-13 10:22:21 +03:00