Commit Graph

10510 Commits

Author SHA1 Message Date
Christopher Hunt cba5f11057
Merge pull request #8524 from chrahunt/remove-always-applicable-comments
Remove encouraging comments
2020-07-03 09:17:53 -04:00
Christopher Hunt 8097de5364
Merge pull request #8528 from chrahunt/simplify-get-entrypoints
Remove redundant entrypoint text normalization
2020-07-03 09:10:10 -04:00
Chris Hunt 8259528ed9 Simplify and optimize getting zip subdirs
Since we only care about the first path part, we can stop at 1 split. We
do not need a list, so the unnecessary conversion has been dropped.
2020-07-03 09:02:30 -04:00
Chris Hunt abed1d6d39 Set `data_dirs` closer to first use
Reducing the scope of variables reduces possible dependencies between
parts of this function, and will make it easier to extract this section
into its own function.
2020-07-03 09:00:07 -04:00
Chris Hunt 01e0d8befb Get data directories directly from zip
This reduces our dependence on the files being extracted to the
filesystem.

Compare the name extraction to the similar code in
`utils.wheel.wheel_dist_info_dir`.

We don't need to give `.data` directories the same strict
treatment (yet) because it isn't inconvenient if there happen
to be multiple of them in a single Wheel file.
2020-07-03 08:59:36 -04:00
Chris Hunt d93b8b3e53 Do not shadow outer variable in loop
`source` is provided as an argument to this function. Shadowing it can
lead to type errors if the intermediate types change.
2020-07-03 08:59:12 -04:00
Devesh Kumar Singh 245bcd0456 Check should_ignore in if condition and remove function creation 2020-07-03 12:27:13 +05:30
Devesh Kumar Singh d3295265e1 Assert spinner instead of if condition check 2020-07-03 12:27:13 +05:30
Devesh Kumar Singh da2448ca13 Assert proc.stdin and proc.stdout 2020-07-03 12:27:13 +05:30
Devesh Kumar Singh 59e19ea743 Update type of local_only and user_only to bool 2020-07-03 12:27:13 +05:30
Devesh Kumar Singh 126d1de990 Add news entry 2020-07-03 12:27:13 +05:30
Devesh Kumar Singh 7e05571117 Type annotations in pip._internal.utils.subprocess 2020-07-03 12:27:13 +05:30
Devesh Kumar Singh 940107d5ed Type annotations for pip._internal.operations.freeze 2020-07-03 12:27:13 +05:30
Devesh Kumar Singh 65e55e2540 Type annotations for pip._internal.operations.check 2020-07-03 12:27:13 +05:30
Stéphane Bidoul af3080f43e
Merge pull request #8525 from chrahunt/trivial-early-return
Add early return in fix_script
2020-07-03 08:42:36 +02:00
Chris Hunt 541ce8748a Remove redundant entrypoint text normalization
Currently we do processing in `get_entrypoints` so incoming text is more compatible
with `pkg_resources`. It turns out that `pkg_resources` is already doing the same normalization,
so we can omit it.

This simplifies `get_entrypoints`, opening the way for us to pass it a plain string instead
of a file path.
2020-07-02 21:50:11 -04:00
Chris Hunt 7c2fa59cd3 Add early return in fix_script
No behavior change, just making this function easier to refactor.
2020-07-02 20:57:51 -04:00
Chris Hunt 09d75b8a58 Remove encouraging comments
These comments are relevant to this function, since it is long
overdue for refactoring. This code isn't special in that regard, and we
should feel free to consider any piece of code eligible to be broken up
or put into a class. So we remove these comments in fairness to the rest
of the code, and to remove a distraction during upcoming code reviews.
2020-07-02 20:40:02 -04:00
Christopher Hunt 4645ecbdb0
Merge pull request #8447 from jku/use-valid-signals-on-py38
test server: Don't mask invalid signals on py38
2020-07-02 12:03:11 -04:00
Jussi Kukkonen 23ec070cf1
test server: use set of signals
This is what signal.pthread_sigmask() really wants and matches signal.valid_signals() output

Co-authored-by: Christopher Hunt <chrahunt@gmail.com>
2020-07-02 18:00:29 +03:00
Xavier Fernandez 09f9b0030d
Merge pull request #8096 from deveshks/list-config-files
Add option to list config files with pip config
2020-07-02 15:01:35 +02:00
Pradyun Gedam e774eccf46
Merge pull request #8343 from uranusjr/entrypoint-unicode 2020-06-30 14:33:24 +00:00
Pradyun Gedam 0b23b772d5
Merge pull request #8411 from McSinyx/refactor-prepare-linked-req 2020-06-30 13:41:11 +00:00
Pradyun Gedam 18431be48f
Merge pull request #8467 from McSinyx/lazy-wheel 2020-06-30 13:39:04 +00:00
Pradyun Gedam 93b0683d65
Merge pull request #8470 from deveshks/remove-always-unzip 2020-06-30 13:33:30 +00:00
Nguyễn Gia Phong da9c7c7f69 Lint src/pip/_vendor/README.rst 2020-06-30 13:20:32 +07:00
Pradyun Gedam 17608c43d1
Merge pull request #8465 from deveshks/collector-debug-to-warn 2020-06-29 18:28:10 +00:00
Pradyun Gedam 9e7087645a
Merge pull request #8332 from McSinyx/vendor-license-compat 2020-06-29 18:27:25 +00:00
Devesh Kumar Singh 6c899ed0c8 Update warning message to specify HTTP request 2020-06-29 22:20:11 +05:30
Pradyun Gedam ecda6650ff
Apply suggestions from code review
Co-authored-by: Xavier Fernandez <xav.fernandez@gmail.com>
2020-06-29 16:31:52 +00:00
Nguyễn Gia Phong dd3a3b5eb7 Parallelize network operations in pip list 2020-06-29 15:48:41 +07:00
Pradyun Gedam 3a22663ab2
Merge pull request #8320 from McSinyx/pools 2020-06-29 07:54:14 +00:00
Devesh Kumar Singh 46790a4f3c Improve warning message for invalid vcs schemes 2020-06-28 16:23:07 +05:30
Devesh Kumar Singh 8d7af2da8d Add news entry 2020-06-28 16:23:07 +05:30
Devesh Kumar Singh 499e112275 Add unit tests to check vcs and archive url with invalid scheme 2020-06-28 16:23:07 +05:30
Devesh Kumar Singh 51f4c03221 Warn if package url is a vcs or an archive url with invalid scheme 2020-06-28 16:23:07 +05:30
Devesh Kumar Singh 056f119ca9 Add test to verify global config file path 2020-06-28 16:22:01 +05:30
Devesh Kumar Singh 6e62481568 Add unit tests for pip config debug 2020-06-28 16:22:01 +05:30
Devesh Kumar Singh f0f692e8e9 Add env and env var values 2020-06-28 16:22:00 +05:30
Devesh Kumar Singh 2fcad8ffa7 Rename subcommand from list-files to debug 2020-06-28 16:22:00 +05:30
Devesh Kumar Singh b9d19a64d7 List values per configuration file 2020-06-28 16:22:00 +05:30
Devesh Kumar Singh 7a8f374c39 Add option to list config files with pip config 2020-06-28 16:22:00 +05:30
Stéphane Bidoul 69a811cec6
Merge pull request #8337 from deveshks/mypy/pip/internal
Complete type annotations in "pip._internal.wheel_builder"
2020-06-27 10:55:59 +02:00
Devesh Kumar Singh 504759bfe5 Add removal news entry 2020-06-27 01:07:34 +05:30
Xavier Fernandez 9a3c082070
Merge pull request #8182 from deveshks/no-input-tests
Enable --no-input option by adding docs and tests
2020-06-26 21:29:19 +02:00
Pradyun Gedam 4abb40e201
Merge pull request #8462 from pfmoore/nr_nonlocal_compatible_wheel_path
Test is checking the old resolver's broken behaviour
2020-06-26 16:34:16 +00:00
Tzu-ping Chung ec7324fba0 Tidy up link collector constructor imports
make_link_collector() was in self_outdated_check, a module responsible
for checking whether the currently-running pip is outdated, but is
imported by things that has nothing to do with this outdated check. Move
the function to be a class method in LinkCollector so the module
hierarchy makes more sense.
2020-06-26 17:31:28 +08:00
Nguyễn Gia Phong 25a25a0975 Test network.lazy_wheel.dist_from_wheel_url 2020-06-26 15:15:28 +07:00
Nguyễn Gia Phong e1438d06b5 Rename and wrap LazyZipOverHTTP 2020-06-26 15:15:28 +07:00
Nguyễn Gia Phong 3eb85a0619 Draft lazy zip over HTTP 2020-06-26 15:15:28 +07:00