Commit Graph

2229 Commits

Author SHA1 Message Date
Chris Jerdonek a8510bc5e6
Merge pull request #6638 from cjerdonek/debug-command
Add a "pip debug" command
2019-07-02 02:00:02 -07:00
Chris Hunt ec73d72fd3 Remove unused incompatible functions from tests.lib.Path. 2019-07-01 10:23:03 +02:00
Chris Jerdonek ba2c382511
Merge pull request #6660 from cjerdonek/rename-egg-info-matches
Rename _egg_info_matches()
2019-06-30 15:00:49 -07:00
Chris Jerdonek 2f1be4e6ec Rename index.py's _egg_info_matches(egg_info, canonical_name). 2019-06-30 12:51:09 -07:00
Chris Jerdonek 449d268b5a
Merge pull request #6661 from cjerdonek/add-selection-prefs-class
Add a SelectionPreferences class
2019-06-30 00:52:15 -07:00
Chris Hunt 66e68273c8 Add assert in assert_paths_equal. 2019-06-29 21:07:50 -04:00
Chris Jerdonek ae79b5bf5c Add a SelectionPreferences class. 2019-06-28 11:14:55 -07:00
Chris Jerdonek 32dcaa60fd
Merge pull request #6657 from cjerdonek/issue-782-unicode-test-windows
Fix #782: Unskip test_install_package_that_emits_unicode() on Windows
2019-06-28 01:57:56 -07:00
Chris Jerdonek 28fbdfd551 Unskip test_install_package_that_emits_unicode() on Windows. 2019-06-28 00:54:56 -07:00
Chris Jerdonek d3b3f16871 Support yanked reasons with non-ascii characters. 2019-06-27 22:53:58 -07:00
Chris Jerdonek 8af3f21a57 Filter out yanked links earlier when allow_yanked=False. 2019-06-27 19:50:25 -07:00
Chris Jerdonek d67acca760 Add "pip debug" command. 2019-06-27 03:18:42 -07:00
Chris Jerdonek 9eab3526a8 Improve error message formatting when a subprocess command errors out. 2019-06-27 03:05:06 -07:00
Chris Jerdonek fc46a18563
Merge pull request #6647 from cjerdonek/issue-6633-yanked-releases
Add support for "yanked" files (PEP 592)
2019-06-27 00:52:11 -07:00
Ian Wienand 0dbab23df9 Add SHA256 hash of .whl as info output (#5908)
* Add SHA256 hash of .whl as info output

Currently I'm trying to debug some issues with what appear to be
corrupt wheels.  It would be very useful to see what pip thought the
state of things was as it wrote the wheel output; if a final corrupt
distributed file is then different to what pip has saved in its build
logs, you know the problem is somewhere after pip but before
distribution.

Currently we get a log of the initial creation, then the stamp when it
gets moved in the final output location, e.g.:

 creating '/tmp/pip-wheel-71CpBe/foo-1.2.3-py2.py3-none-any.whl
 ...
 Stored in directory: /opt/wheel/workspace

A lot happens in between this, so my suggestion is we add the final
output file and it's hash before the "Stored in directory:", e.g. you
now see:

 Building wheels for collected packages: simple
   Running setup.py bdist_wheel for simple: started
   Running setup.py bdist_wheel for simple: finished with status 'done'
   Finished: simple-3.0-py3-none-any.whl sha256=39005a57a6327972575072af82e11d0817439fe6a069381f6f2a123a8c0bf1cf
   Stored in directory: /tmp/pytest-of-iwienand/pytest-18/test_pip_wheel_success0/workspace/scratch
 Successfully built simple

Despite the hash being fairly important for things like
--require-hashes, AFAICS the final hash is not put in the logs at all
currently, so I think this is generically helpful.

* Reword wheel hash details output

This rewords the output to be more like the form of the preceding
messages.  Additionally the size is added, since we have calculated it
anyway.  The output will now look like:

 Collecting simple==3.0
 Building wheels for collected packages: simple
   Building wheel for simple (setup.py): started
   Building wheel for simple (setup.py): finished with status 'done'
   Created wheel for simple: filename=simple-3.0-py3-none-any.whl size=1138 sha256=2a980a802c9d38a24d29aded2dc2df2b080e58370902e5fdf950090ff67aec10
   Stored in directory: /tmp/pytest-of-iwienand/pytest-0/test_pip_wheel_success0/workspace/scratch
 Successfully built simple
2019-06-26 02:44:43 -07:00
Chris Jerdonek a447be4785 Update PackageFinder to support "yanked" files (PEP 592). 2019-06-26 02:32:40 -07:00
Chris Jerdonek 8666bb1a5d Start parsing the "data-yanked" attribute. 2019-06-25 03:34:42 -07:00
Chris Jerdonek fdde0b483e Add Link.yanked_reason. 2019-06-25 03:34:38 -07:00
Chris Jerdonek bfa976f3f1
Merge pull request #6635 from cjerdonek/link-parsed-attribute
Parse the url when creating a Link object
2019-06-23 22:39:14 -07:00
Chris Jerdonek a36064954f Add TargetPython.format_given(). 2019-06-23 09:28:58 -07:00
Chris Jerdonek 36430e2a43
Merge pull request #6639 from sbidoul/imp_looks_like_hash-sbi
Be stricter in identiying git commit hashes
2019-06-23 08:49:11 -07:00
Stéphane Bidoul (ACSONE) 28fa08688c Be stricter in identiying git commit hashes 2019-06-23 12:00:57 +02:00
Chris Jerdonek 0ed518f0dc Fix an edge case where Link.filename can leak auth information. 2019-06-22 16:44:13 -07:00
Chris Jerdonek b6077c5227 Move the existing Link tests to test_link.py. 2019-06-22 16:44:13 -07:00
Chris Jerdonek 0e741ef9bf Parse the url when creating a Link object. 2019-06-22 16:44:07 -07:00
Chris Jerdonek cab7316e2b Change PackageFinder.create() to accept a SearchScope object. 2019-06-21 14:41:49 -07:00
Chris Jerdonek 7d08bb37a5 Add SearchScope class. 2019-06-18 00:47:10 -07:00
Christopher Hunt 26cdedd618 Add milliseconds to --log entry timestamps. (#6621)
Resolves #6587.
2019-06-17 14:50:41 -07:00
Chris Jerdonek 6ac468e4fd
Merge pull request #6613 from cjerdonek/requirements-file-error
Improve the error message for invalid requirements files in certain situations
2019-06-16 20:09:24 -07:00
Chris Jerdonek e5a730a89f Improve the error message when reading a bad requirements file. 2019-06-15 10:47:24 -07:00
johnthagen 3407ccdeb6 Move Subversion arg unit tests from functional folder to unit test folder 2019-06-15 08:04:03 -04:00
Chris Jerdonek c0bda1b906 Log when adding a trusted host from a file. 2019-06-14 01:14:36 -07:00
Chris Jerdonek d72758394d Fully support --trusted-host inside requirements files. 2019-06-13 01:21:05 -07:00
Laszlo Kiss-Kollar a240a98701 Add `--path` option to `pip list`
This makes `pip list` consistent with `pip freeze` which also supports
listing packages in arbitrary file paths.
2019-06-12 16:10:06 +02:00
Chris Jerdonek 4c1ccaec73 Store PackageFinder.trusted_hosts instead of secure_origins. 2019-06-12 02:18:23 -07:00
Chris Jerdonek 210dab7470 Add make_test_finder() helper function. 2019-06-11 19:18:56 -07:00
Chris Jerdonek 93769d0a9c
Merge pull request #6591 from cjerdonek/target-python-class
Add a TargetPython class.
2019-06-11 19:03:13 -07:00
Chris Jerdonek b8d693c71e Add a TargetPython class. 2019-06-11 18:19:20 -07:00
Chris Jerdonek 5776ddd058
Merge pull request #6418 from gzpan123/master
FIX #6413 pip install <url> allow directory traversal
2019-06-11 01:11:42 -07:00
gzpan123 a4c735b14a FIX #6413 pip install <url> allow directory traversal 2019-06-11 00:22:29 -07:00
Chris Jerdonek 4bb225d486 Allow dotted version strings for --python-version. 2019-06-08 19:59:09 -07:00
Chris Jerdonek 8dbf88dff7 Update pip-download to respect --python-version. 2019-06-06 13:20:29 -07:00
Chris Jerdonek e6b1070e14 Add normalize_version_info() with tests. 2019-06-06 13:20:26 -07:00
Chris Jerdonek 99228e503a Import path_to_url() from utils/misc.py instead of download.py. 2019-06-03 02:31:40 -07:00
Chris Jerdonek ce46f8524e
Merge pull request #6545 from cjerdonek/vcs-imports
Remove from pip/_internal/__init__.py the vcs module imports
2019-06-03 02:10:43 -07:00
Chris Jerdonek 5c89643d3d Remove importing from vcs in pip/_internal/__init__.py.
This also renames the current vcs/__init__.py to vcs/versioncontrol.py.
2019-06-03 01:18:36 -07:00
Chris Jerdonek 798d814629 Change PackageFinder to use Tuple[int, ...] instead of List[str] for --python-version. 2019-05-28 03:05:14 -07:00
László Kiss Kollár 929fefdbae Add --path to pip freeze to support --target installations (#6450)
* Add support for --path in pip freeze
2019-05-28 02:28:18 -07:00
Pradyun Gedam 24e9e4aa37
Display install instructions for pre-releases (#5921) 2019-05-27 16:38:17 -04:00
Pradyun Gedam a1ad4b7c41
Improve deprecation warnings (#6549) 2019-05-27 16:33:45 -04:00
Pradyun Gedam 995ef743ec
Add tests for the deprecated helper 2019-05-27 13:57:31 -04:00
Chris Jerdonek 2d450936c6 Move path_to_url() from download.py to misc.py. 2019-05-26 22:51:00 -07:00
Chris Jerdonek 30855ff9b7
Merge pull request #6542 from cjerdonek/issue-5082-missing-metadata-error
Improve error message if METADATA or PKG-INFO metadata is None
2019-05-26 16:17:22 -07:00
Chris Jerdonek 6178f9681b
Merge pull request #6540 from cjerdonek/issue-6121-incompatible-wheel-message
Improve the debug log message when installing an incompatible wheel
2019-05-26 14:10:09 -07:00
Chris Jerdonek cd5bd2cd52 Improve error message if METADATA or PKG-INFO metadata is None. 2019-05-26 12:35:07 -07:00
Chris Jerdonek a9a9cfd98c Improve the debug log message when installing an incompatible wheel. 2019-05-25 23:59:32 -07:00
Chris Jerdonek f44344f122
Merge pull request #6515 from johnthagen/svn-interactive-final
Properly support interactive Subversion client
2019-05-25 14:47:51 -07:00
Chris Jerdonek 98a77a9317
Merge pull request #6538 from cjerdonek/issue-6513-freeze-requirement-error
Include more details in a pip freeze warning message
2019-05-25 11:17:23 -07:00
Pradyun Gedam c197b11816
Move Resolver to a legacy_resolve module (#6535) 2019-05-25 13:36:29 -04:00
johnthagen 920b95fe49 Add test with non-trivial RevOptions input 2019-05-25 13:36:03 -04:00
johnthagen ae03f49bd5 Fold obtain and export tests into TestSubversionArgs TestCase 2019-05-25 13:31:03 -04:00
Pradyun Gedam 287aa4b7bf
Merge pull request #6008 from jaraco/bugfix/4106-distutils-option-error-target-prefix-conflict
Prevent distutils option error target prefix conflict
2019-05-25 13:29:49 -04:00
johnthagen c90e632f35 Simplify test method names 2019-05-25 13:23:43 -04:00
johnthagen 8de73a130e Use bare strings in test assertion 2019-05-25 13:22:53 -04:00
Pradyun Gedam d5c4fcc39c
Rename test_{resolve -> legacy_resolve}.py 2019-05-25 12:44:45 -04:00
Pradyun Gedam b05c66722e
Move Resolver to a legacy_resolve module 2019-05-25 12:35:31 -04:00
Pradyun Gedam 77da032c91
Make _check_dist_requires_python() parallel _check_link_requires_python(), and add more complete tests (#6528) 2019-05-25 12:09:25 -04:00
Chris Jerdonek 7c42f0ed8e Include more details in a pip freeze warning message. 2019-05-25 00:31:44 -07:00
Chris Jerdonek f82ea77217 Simplify the _check_dist_requires_python() call site. 2019-05-24 21:33:12 -07:00
Chris Jerdonek ba53909375
Merge pull request #6522 from theacodes/add-pip-ci
Check for explicit PIP_IS_CI environment variable to report automated installs to Warehouse.
2019-05-24 13:57:09 -07:00
Thea Flowers 03ad0421ee Check for explicit ``PIP_IS_CI`` environment variable to report automated installs to Warehouse. 2019-05-24 13:01:04 -07:00
johnthagen a4aff3b7ff Use a TestCase to remove some duplication across similar tests 2019-05-24 07:32:43 -04:00
Chris Jerdonek cc70cf5ba3 Move check_dist_requires_python() to resolve.py. 2019-05-23 22:58:10 -07:00
johnthagen 128730f3a1 Add tests for fetch_new, switch, and update 2019-05-23 07:50:46 -04:00
johnthagen b9c8394098 Fix PEP8 error 2019-05-23 07:37:37 -04:00
johnthagen 6c5da6bcfa Remove unnecessary pytest.mark.network from tests that use mocked svn invocation 2019-05-23 07:27:10 -04:00
Chris Jerdonek eeb74aeb29
Merge pull request #6518 from cjerdonek/issue-6371-ignore-requires-python
Fix #6371: make pip install respect --ignore-requires-python
2019-05-22 22:38:20 -07:00
Chris Jerdonek 5528d353d2 Add some tests of CandidateEvaluator.evaluate_link(). 2019-05-22 21:34:45 -07:00
Chris Jerdonek ad2b07898d Fix pip-install to respect --ignore-requires-python. 2019-05-22 21:34:41 -07:00
Andreas Lutro 9eccfae10d redact passwords in output when using --find-links (#6489) 2019-05-22 23:33:41 +02:00
johnthagen fcbefc01e1
Merge branch 'master' into svn-interactive-final 2019-05-22 14:49:29 -04:00
Chris Jerdonek 7e142bae64 Refactor out _check_link_requires_python(), and test. 2019-05-22 09:07:14 -07:00
Chris Jerdonek 4f6488cbb4 Add some tests for check_requires_python(). 2019-05-22 09:05:37 -07:00
Chris Jerdonek b554c15b91
Merge pull request #6514 from cjerdonek/candidate-evaluator-pre-releases
Add allow_all_prereleases to CandidateEvaluator's constructor
2019-05-22 08:54:59 -07:00
johnthagen 1361456113 Explain why use_interactive is set to False in unit tests 2019-05-21 06:57:18 -04:00
johnthagen 3cab748c6e Set use_interactive=False to avoid having to mock 2019-05-20 12:45:19 -04:00
johnthagen 9c85436573 Fix tests 2019-05-20 08:28:24 -04:00
Chris Jerdonek 07ce2ab2b7
Merge pull request #6439 from johnthagen/svn-interactive
Subversion interactive support
2019-05-19 15:27:36 -07:00
Chris Jerdonek 7995e2d5a9 Move get_install_candidate() to PackageFinder. 2019-05-19 11:03:47 -07:00
Chris Jerdonek 1875a8e3f6
Merge pull request #6511 from cjerdonek/package-finder-create-function
Simplify PackageFinder's constructor by accepting a CandidateEvaluator
2019-05-19 09:39:32 -07:00
Chris Jerdonek 10ae49d932 Add py_version_info to CandidateEvaluator's constructor. 2019-05-18 22:40:08 +02:00
johnthagen a83a78ef4d Add Subversion interactive support. 2019-05-18 13:34:45 -07:00
Chris Jerdonek cad71a7117 Add PackageFinder.create(), and simplify PackageFinder(). 2019-05-17 11:55:21 -07:00
Xavier Fernandez 6387867288
Merge pull request #6491 from DavidBord/fix-5963-fail-elegantly-incorrect-config
fix-5963: fail elegantly
2019-05-13 22:04:01 +02:00
Chris Jerdonek bc8857d6ff
Merge pull request #6484 from cjerdonek/simplify-evaluate-link
Simplify CandidateEvaluator.evaluate_link()
2019-05-12 16:13:36 -04:00
David Bordeynik ce0b3c4d7c fix-5963: assert error message 2019-05-12 22:28:45 +03:00
Chris Jerdonek c54e50f50b Simplify CandidateEvaluator.evaluate_link(). 2019-05-12 15:21:14 -04:00
Chris Jerdonek 53c5293517
Merge pull request #6474 from cjerdonek/logging-errors-during-tests
Don't allow logging errors during tests even if allow_stderr_error=True
2019-05-10 11:13:32 -04:00
Donald Stufft 3596ad5cd8
Merge pull request #5952 from zooba/issue-5948
Fixes #5948 Adds keyring support
2019-05-10 08:13:55 -04:00
David Bordeynik 8f330a5959 fix-5963: fail elegantly on missing name or section in config set / unset 2019-05-09 20:33:30 +03:00