Commit Graph

1225 Commits

Author SHA1 Message Date
Ilan Schnell 8b4a4c469a add ability to install list of requirements - with example in simple.yml 2020-04-28 23:32:55 -05:00
Ilan Schnell c14c92d9cd simplify handle_request() - improve error checking 2020-04-28 23:15:57 -05:00
Pradyun Gedam 22bd8add95
Merge pull request #8095 from hugovk/pip-cache-dir2 2020-04-28 00:57:10 +05:30
Hugo 6b640d1254 Add test for 'pip cache dir 123' with too many arguments 2020-04-27 11:02:18 +03:00
Tzu-ping Chung 06d9ea0952 Mark local install as xfail 2020-04-27 14:36:59 +08:00
Tzu-ping Chung 0104adb037 Add failing test for explicit requirement extras 2020-04-26 16:39:31 +08:00
Paul Moore 04bf571521 Ensure root requirement name is canonicalised 2020-04-24 14:30:34 +01:00
Noah Gorny 8c28b8173a tests: commands: cache: Add no-cache-dir test case 2020-04-24 13:08:59 +03:00
Paul Moore d605530b44 Implement upgrade strategies for the new resolver 2020-04-24 11:08:06 +01:00
Ilan Schnell 8780a80c4d make flake8 happy 2020-04-22 18:23:24 -05:00
Ilan Schnell 1d1b7a674e simplify assertion for valid skip values 2020-04-22 17:57:20 -05:00
Ilan Schnell 05babbcb68 improve test name 2020-04-22 17:50:01 -05:00
Ilan Schnell 9ef15bc012 run tests with old and new resolver, and add ability to skip for either 2020-04-22 17:33:12 -05:00
Ilan Schnell 769ac3e59e Merge branch 'master' into test_skip 2020-04-22 15:27:08 -05:00
Ilan Schnell 07845f8c97 move yaml test files up one level 2020-04-22 15:23:35 -05:00
Ilan Schnell 2daedca9c4 add new_resolver option to handle_request() 2020-04-22 15:20:59 -05:00
Hugo cebac6aa6c Add 'pip cache dir' command to show the path to pip's cache directory 2020-04-20 11:48:36 +03:00
Tzu-ping Chung 4fb7687fa7 Add failing tests 2020-04-18 22:47:44 +08:00
Pradyun Gedam 97f639057e
Merge pull request #8014 from uranusjr/always-return-installed-candidate 2020-04-18 16:15:14 +05:30
Devesh Kumar Singh 22878a827b Added unit tests to verify correct normalization of package name 2020-04-18 11:03:56 +05:30
Phil Elson bdc886be40 Add xfail tests for case where specifications added as an extra are not honoured. 2020-04-16 05:17:01 +02:00
Paul Moore 2f3a1be118
Merge pull request #8033 from pfmoore/messages
Make message more user friendly when unable to resolve
2020-04-15 19:43:53 +01:00
Paul Moore 8c118c8f3a Fix the test to check for canonical name 2020-04-14 15:18:24 +01:00
Paul Moore ea391b2aab Merge with master 2020-04-14 11:27:10 +01:00
Pradyun Gedam 78f16daa27
Switch pip's use of pytoml -> toml 2020-04-14 13:07:17 +05:30
Pradyun Gedam f458573de6
Merge pull request #7882 from sbidoul/build-in-place-7555-sbi
Build local directories in place
2020-04-13 21:33:02 +05:30
Pradyun Gedam bdff935570
Merge pull request #6391 from duckinator/pip-cache
Add 'pip cache' command
2020-04-13 19:53:05 +05:30
Pradyun Gedam 92c9f8136a
Merge pull request #8004 from uranusjr/requires-python-error
New Resolver: Raise UnsupportedPythonVersion for Requires-Python mismatch
2020-04-13 19:42:51 +05:30
Pradyun Gedam 15f8a35e4b
Merge pull request #7887 from NoahGorny/pip-debug-print-vendored-versions
pip debug: Add versions of vendored libraries to output
2020-04-13 19:29:27 +05:30
Paul Moore 3642589903 Make message more user friendly when unable to resolve 2020-04-13 11:32:21 +01:00
Pradyun Gedam fc24a17899
Merge pull request #8022 from sbidoul/simplify-install-req-source-dir-sbi
Remove InstallRequirement source_dir parameter
2020-04-13 05:00:06 +05:30
Stéphane Bidoul 877e1ccc77
fix test_uninstall_console_scripts
This particular test checks which files are
created. Since we now build in place, expect the .egg-info directory to be created.
2020-04-12 12:00:58 +02:00
Stéphane Bidoul ace0c16531
fix test_entrypoints_work test
Since we now build in place, pip install
calls setup.py in place which in turn creates
fake_pkg.egg-info. Since in this test the package we are installing is in script.temp_path,
we must tell script to expect temporary
files to be created.
2020-04-12 12:00:57 +02:00
Stéphane Bidoul 873f1e6332
remove _copy_source_tree and friends 2020-04-12 12:00:57 +02:00
Stéphane Bidoul 076d1a8ed8
Fix tests that build fake InstallRequirements with source_dir 2020-04-12 11:39:09 +02:00
Noah Gorny bfd17cbd97 tests: functional: Add new test_debug vendored version test 2020-04-11 01:54:57 +03:00
Noah Gorny 4efd8af14b tests: functional: Add new cases to the simple test_debug 2020-04-11 01:54:57 +03:00
Pradyun Gedam 5c9e83a3aa
Merge pull request #8012 from deveshks/fix-comments-in-test-install
Fix incorrect comment in tests in test_install
2020-04-10 21:36:28 +05:30
Tzu-ping Chung d2028e9538 Implement RequiresPythonRequirement with context
This specialized class is able to carry more context information than
the previous implementation (which reuses ExplicitRequirement). Error
reports can thus provide better messages by introspecting.
2020-04-10 23:17:29 +08:00
Devesh Kumar Singh 528a193dda Fix incorrect comment in tests 2020-04-10 19:02:57 +05:30
Pradyun Gedam 81f1054865
Merge pull request #7873 from hroncok/no_copy_self
Prevent infinite recursion with pip wheel with $TMPDIR in $PWD
2020-04-10 18:56:31 +05:30
Tzu-ping Chung cfac6aebdd Always return an install candidate last if matches
This rewrites how a SpecifierRequirement generates candidates, so it

* Always return an AlreadyInstalledCandidate (as long as the version
  satisfies the specifier), even if PackageFinder does not return a
  candidate for the same version.
* Always put the AlreadyInstalledCandidate last, so it's preferred over
  LinkCandidate, preventing version changes if possible.
2020-04-10 20:51:06 +08:00
Pradyun Gedam 9360793a6c
Merge pull request #7987 from deveshks/add-tests-for-pip-cmds-ignoring-cwd
Add unit tests for pip commands not using cwd
2020-04-10 14:29:06 +05:30
Paul Moore c7bde5bf88
Merge pull request #7990 from uranusjr/resolver-installed-2
New Resolver: Correctly uninstall existing distribution before installing
2020-04-09 20:58:17 +01:00
Pradyun Gedam ea1295b720
Merge pull request #7965 from deveshks/warn-on-invalid-index-url
Warn if an invalid URL is passed with --index-url
2020-04-09 17:15:47 +05:30
Pradyun Gedam c110953703
Merge pull request #7958 from ilanschnell/add-yaml-options
Add ability to run pip with options for yaml tests
2020-04-09 10:20:37 +05:30
Tzu-ping Chung be60eaaa4f Uninstall existing dist before reinstallation 2020-04-08 17:17:25 +08:00
Tzu-ping Chung e714b5cf84 Add failing tests for reinstall and upgrade 2020-04-08 17:16:47 +08:00
Devesh Kumar Singh fe6920bc2f Addressed review comments 2020-04-08 13:59:33 +05:30
Devesh Kumar Singh efd6dd28d0 Address review comments 2020-04-07 09:44:36 +05:30
Devesh Kumar Singh a73ad91c8b Running test_check for pkg_path 2020-04-07 09:06:13 +05:30
Devesh Kumar Singh ac65f136fd Add tests to verify --index-url behaviour 2020-04-06 20:19:11 +05:30
Devesh Kumar Singh 84baf2110f Fixed issue in test_freeze for failing test 2020-04-06 01:26:33 +05:30
Devesh Kumar Singh 29b4ec79ed Fixed issue in test_show for failing test 2020-04-06 00:27:30 +05:30
Devesh Kumar Singh 2324ae422e Add unit tests for pip commands not using cwd 2020-04-05 23:17:03 +05:30
Pradyun Gedam eb865b4e10
Merge pull request #7955 from deveshks/pip-list-not-contain-pkg-work-dir
Don't list packages in current directory
2020-04-05 21:13:14 +05:30
Devesh Kumar Singh feac595446 Don't use cwd in python -m pip command 2020-04-05 19:59:05 +05:30
Ilan Schnell 2b883d5d8a add ability to test uninstall - and simple uninstall test 2020-04-05 00:05:43 -05:00
Ilan Schnell 0c3bc448e1 always check for files in site-packages - add simple test for installing twice 2020-04-04 14:33:28 -05:00
Ilan Schnell a0fe4112d1 better naming in yaml-files: transaction -> response, install -> state 2020-04-04 14:00:16 -05:00
Tzu-ping Chung aaa82cddcc isort 2020-04-04 20:52:39 +08:00
Tzu-ping Chung 2430aba879 Implement editable candidate 2020-04-04 17:51:43 +08:00
Paul Moore 037791d170 Add a test demonstrating #7966 2020-04-03 11:18:44 +01:00
Tzu-ping Chung f061f3f691 Fetch install dist for a candidate if available
The candidate creation logic is further moved into the factory. The
factory would use pkg_resources.get_distribution() to find a matching
distribution for a givan InstallationCandidate. If found, the Candidate
would be created based on that found distribution, instead of the link.

--ignore-installed is implemented as to always use the link to create
candidates, even if an installed distribution is found.
2020-04-03 00:36:26 +08:00
Tzu-ping Chung 557f7670ea Typo in comment 2020-04-02 21:44:54 +08:00
Tzu-ping Chung 34c24f6e79 Switch to create_basic_wheel_for_package 2020-04-02 18:40:48 +08:00
Tzu-ping Chung 630339e577 Add new resolver test for Requires-Python 2020-04-02 18:36:08 +08:00
Ilan Schnell 3f2129e040 make flake8 happy 2020-04-02 00:34:55 -05:00
Ilan Schnell 4a0dd98534 add ability to run pip with options for yaml tests 2020-04-02 00:09:24 -05:00
Stéphane Bidoul 196706d305
Better freeze using direct_url.json 2020-04-01 22:57:00 +02:00
Stéphane Bidoul a0ed759fb3
Add direct_url support to InstallRequirement
pass it to install_wheel via install
2020-04-01 22:57:00 +02:00
Ellen Marie Dash b988417b4f [tests/functional/test_cache] Use os.path.join() instead of hard-coding the path separator. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 0c4eafad62 [tests/functional/test_cache] Fix test on Python 2.7. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash b7239f5dee [tests/functional/test_cache] Remove unused import. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 8858237903 [tests/functional/test_cache] Refactor list_matches_wheel() and remove_matches_wheel(). 2020-04-01 16:54:42 -04:00
Ellen Marie Dash a20b28d008 [tests/functional/test_cache] Split apart tests for `pip cache purge`. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash ba7c3ac9ec [tests/functional/test_cache] Add test `pip cache list` with an empty cache. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 32ce3bacbe [tests/functional/cache] Rewrite all of the pip cache {list,remove} tests. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash c6b5a52a5a [tests/functional/test_cache] Always call normcase on cache dir; fix line length problems. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 274b295bd8 [tests/functional/cache] Make fixtures feel less magical.
It bothered me that _whether or not a function had a certain argument_
dictated the contents of a directory. Pytest fixtures are inherently
kinda magical, but that was a bit much for me.
2020-04-01 16:54:42 -04:00
Ellen Marie Dash 6e425d8009 [tests/functional/cache] Refactor to be less redundant. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 8b518b258d [commands/cache] Make filenames more realistic in tests. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash f8b67c8bf1 [commands/cache] Fix test_cache_info test. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash d74895a224 [commands/cache] Normalize path in test. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 2d978309a2 [commands/cache] Minor clean-up.
- Consistently use singular 'cache' (not plural 'caches').
- Remove unnecessary uses of the word 'currently'.
- Use 'file(s)' instead of 'files', to account for case of only one file.
- Use .format() when appropriate.
- Minor cleanup of `pip cache`-related files in docs/.
2020-04-01 16:54:42 -04:00
Ellen Marie Dash 6fb1ee7a3d [commands/cache] fix linting error. 2020-04-01 16:54:04 -04:00
Ellen Marie Dash 50604be6c4 [commands/cache] Raise errors if wrong number of args.
Also add tests for purge_cache, since I apparently forgot those before.
2020-04-01 16:54:03 -04:00
Ellen Marie Dash b9b29b8c10 [commands/cache] fix 'pip cache info'; don't hide python/abi/platform tags. 2020-04-01 16:54:03 -04:00
Ellen Marie Dash b0e7b66326 [commands/cache] Refactor + fix linting failures. 2020-04-01 16:54:03 -04:00
Ellen Marie Dash 04c0b0e6eb Add 'pip cache' command. 2020-04-01 16:54:03 -04:00
Ilan Schnell 83ba23989d remove extra whitespace 2020-03-31 15:55:16 -05:00
Ilan Schnell 9de02c2b41 better naming of constant 2020-03-31 15:47:43 -05:00
Ilan Schnell 2a8f5705b2 combine yaml test functionality into single module 2020-03-31 15:35:29 -05:00
Pradyun Gedam 57cb941645
Merge pull request #7891 from deveshks/ignore-uninstall-error-if-easy-install-missing
Don't fail uninstallation if easy-install.pth doesn't exist
2020-03-30 21:42:38 +05:30
Devesh Kumar Singh 0d2954d726 Add test to ensure egg-link is removed after uninstall 2020-03-30 01:31:08 +05:30
Devesh Kumar Singh 0acfdcd719 Check for uninstalled package after deleting pth file 2020-03-28 11:07:52 +05:30
Devesh Kumar Singh bcb4009688 Add a test case for missing easy-install.pth fix 2020-03-28 02:14:29 +05:30
Tzu-ping Chung 79f2553228 Use set operations in tests for readability 2020-03-27 02:39:33 +08:00
Paul Moore fea9766fa2 Merge branch 'master' into new_resolver_extras 2020-03-26 15:49:43 +00:00
Paul Moore a68345e81c Warn if invalid extras are given 2020-03-26 14:53:24 +00:00
Paul Moore 7e97cf6426 Ignore invalid extras 2020-03-26 11:57:34 +00:00
Tzu-ping Chung 6d3a89c992 Add --no-deps test for the new resolver 2020-03-26 01:48:47 +08:00
Tzu-ping Chung 1a210d1c62 Improve utility to test installed env
Make assert_installed actually check the provided entries against the
pip --list output.

Add assert_not_installed to check for the reverse.
2020-03-26 01:47:22 +08:00
Paul Moore 653bac26c9 Add a test to validate if extras are respected 2020-03-25 12:27:23 +00:00
Paul Moore 0b1306bbf0 I must remember to run lint locally before pushing :-( 2020-03-20 11:12:38 +00:00
Paul Moore 89f4f16e3e Add some functional tests for the new resolver 2020-03-20 11:00:07 +00:00
Miro Hrončok eb070d2372 Avoid a test dependency on a C compiler, skip the test on Windows 2020-03-19 23:50:41 +01:00
Miro Hrončok 98aa09cf88 Prevent infinite recursion with pip wheel with $TMPDIR in $PWD
During a build of extension module within `pip wheel` the source directory is
recursively copied in a temporary directory.

See https://github.com/pypa/pip/issues/7555

When the temporary directory is inside the source directory
(for example by setting `TMPDIR=$PWD/tmp`) this caused an infinite recursion
that ended in:

    [Errno 36] File name too long

We prevent that buy never copying the target to the target in _copy_source_tree.

Fixes https://github.com/pypa/pip/issues/7872
2020-03-19 18:07:56 +01:00
Paul Moore cec27c747c Added an end-to-end install test of the new resolver 2020-03-18 14:54:29 +00:00
Pradyun Gedam 4f6bef6eb4
Merge pull request #7792 from pradyunsg/misc/utils-tags
Rename pep425tags -> utils.compatibility_tags
2020-03-12 14:46:52 +05:30
Jason R. Coombs 6282a307dc 👹 Feed the hobgoblins (delint). 2020-03-06 12:43:10 -05:00
Jason R. Coombs 3511d3d493 Convert the remaining '%' formatters to '.format'. Fixes #6973. 2020-03-06 12:43:03 -05:00
sinscary 716c9202ee Raise error if --user and --target arguments are used together 2020-02-27 12:22:56 +05:30
Pradyun Gedam 3fa356a772
Update references to pep425tags 2020-02-26 10:24:43 -08:00
Pradyun Gedam e648e00dc0
pip is spelt all-lowercase 2020-02-18 10:55:16 +05:30
Pradyun Gedam 313740f6ee
Merge pull request #7593 from uranusjr/hg-under-git
Detect all registered VCS and choose inner-most
2020-02-08 17:34:31 +05:30
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 667dc392e5 Remove unused futurewheel fixture 2020-01-31 19:33:51 -05:00
Chris Hunt e83e134f5f Use wheel_builder for future wheel functional test 2020-01-31 19:33:48 -05:00
Chris Hunt dd8753cdee Mitigate Windows test failures due to PAX-format wheel release 2020-01-29 08:53:23 -05:00
Deepak Sharma b242c3979a String formatting updated 2020-01-23 18:09:59 +05:30
Pradyun Gedam 8bc1024a13
Touch command may not be available on Windows (#7601) 2020-01-15 16:08:17 +00:00
Paul Moore 3288d902e6 Touch command may not be available on Windows 2020-01-15 15:14:22 +00:00
Tzu-ping Chung 2dc061d960 Normailze case in tests 2020-01-15 17:50:41 +08:00
Christopher Hunt f2bb7c4e57
Merge pull request #7588 from uranusjr/reinstall-test
Delete a file to let --force-reinstall fix it
2020-01-15 11:48:27 +08:00
Tzu-ping Chung 8b1f4d80c1 Modify test to unify site_packages path usages 2020-01-14 21:56:23 +08:00
Tzu-ping Chung d301cbeb4e Add marker to Mercurial test 2020-01-14 18:00:49 +08:00
Tzu-ping Chung 284352a42c Add test to verify freeze output 2020-01-14 17:54:54 +08:00
Tzu-ping Chung e5c43ed6af Add tests for get_repository_root 2020-01-14 16:45:28 +08:00
Christopher Hunt cf722df4f9
Merge pull request #7581 from chrahunt/refactor/split-install-tests
Split relative requirement install tests
2020-01-14 01:40:29 +08:00
Tzu-ping Chung 2d3f2cdba5 Delete a file to let --force-reinstall fix it 2020-01-13 18:04:52 +08:00
Christopher Hunt 7e65a5a40f
Merge pull request #7578 from uranusjr/test-uppercase-console-scripts
Add test for uppercase script name
2020-01-13 09:42:38 +08:00
Tzu-ping Chung 8e72502118 Add test for uppercase script name 2020-01-12 17:16:52 +08:00
Tzu-ping Chung 4def73ca3a Refactor test to remove unneeded network dep 2020-01-12 17:12:08 +08:00
Tzu-ping Chung 10022df906 Rename test to make its intention clearer 2020-01-12 17:03:28 +08:00
Chris Hunt e53d10db01 Remove unnecessary uninstall
Since a new temporary script path is used for each test, no need to do
uninstall.
2020-01-11 19:39:12 -05:00
Chris Hunt f89013daa4 Parametrize editable for relative install tests 2020-01-11 19:37:10 -05:00
Chris Hunt 2801de5825 Parametrize long relative install tests
This lets us make better use of parallelization and will let us remove
the unnecessary uninstallation from these individual tests.
2020-01-11 19:32:44 -05:00
Pradyun Gedam 4ee779f79e
Drop no longer valid tests 2020-01-07 12:25:11 +05:30
Pradyun Gedam d9d801f818
Drop no-suffix checks for pip-from-PATH 2020-01-06 19:29:56 +05:30
Chris Hunt 33043ba22f Use pkg_resources.Distribution derived from wheel directly
We now extract all metadata files from the wheel directly into memory
and make them available to the wrapping pkg_resources.Distribution via
the DictMetadata introduced earlier.
2020-01-05 10:57:14 -05:00
Christopher Hunt c3ab0a0b13
Merge pull request #7552 from chrahunt/refactor/cleanup-wheel-install-tests
Make wheel install test packages more explicit
2020-01-05 08:46:07 +08:00
Chris Hunt b58205ea01 Use valid wheel for functional download tests
Previously we were copying an existing wheel to a file with a
different distribution name. When using stricter metadata parsing this
would fail, so now we use a more conformant dummy wheel function.
2020-01-04 23:08:43 +01:00
Chris Hunt f9bf1a7004 Make explicit argument for git commit --allow-empty 2020-01-03 19:19:18 -05:00
Chris Hunt f5684ed7ae Use shared_data fixture in wheel install tests
shared_data avoids copying the entire data directory, so use it in cases
where we know pip won't have any opportunity to edit the data files
(where we're passing tmpdir for --find-links).
2020-01-03 18:25:02 -05:00
Chris Hunt d468da2796 Explicitly copy required packages to tmpdir for wheel install tests
Any test using --find-links data.packages is potentially using several
packages. By copying specifically the packages we need, we can more
easily see the packages that each test depends on and avoid using the
`data` fixture.
2020-01-03 18:23:48 -05:00
Chris Hunt 4e5d854456 Normalize --find-links argument format in wheel install tests 2020-01-03 17:58:40 -05:00
Chris Hunt 7af9371176 Remove redundant expect_error=False in tests
This is the default, so there is no need to specify it explicitly.
2020-01-03 14:25:36 +01:00
Stéphane Bidoul (ACSONE) c93acfb20b
Test legacy clean not attempt after PEP 517 build failure 2020-01-02 12:14:03 +01:00
Christopher Hunt 8c888a2287
Simplify getting info directories for wheel installation (#7526)
* Edit subdirs of top-level instead of checking in each directory

Previously, we were checking whether the top of the relative path ended
with .data. Now, we do not recurse into those directories, so there's no
need to check every time.

* Store info_dir in separate variable

Instead of working with a list everywhere, we use the single info_dir.

* Separate variables for info_dir and the destination path
* Use destination .dist-info dir only when needed

By initially storing just the name of the folder we ensure our code is
agnostic to the destination, so it'll be easier to install from a zip
later.

* Use os.listdir instead of os.walk for wheel dir population

Since we only execute any code when basedir == '', we only need the
top-level directories.

* Inline data_dirs calculation
* Inline info_dirs calculation
2019-12-30 23:59:23 +08:00
Chris Hunt 93900e1199 Only check for .dist-info directories at the top-level
Previously we were restricting to a single .dist-info directory anywhere
in the unpacked wheel directory. That was incorrect since only a
top-level .dist-info directory indicates a contained "package". Now we
limit our restriction to top-level .dist-info directories.
2019-12-28 15:49:08 -05:00
Stéphane Bidoul (ACSONE) 1ee270a8d4
Check that the cache is writable in _main()
This avoid code duplication (for the wheel and http
cache) and repeated warnings.
2019-12-28 13:04:54 +01:00
Stéphane Bidoul (ACSONE) 865539bdad
Test that pip wheel succeeds when cache dir is not writeable 2019-12-28 13:04:40 +01:00
Christopher Hunt 92da786643
Merge pull request #7494 from chrahunt/refactor/wheel-metadata-retrieval
Only allow one top-level .dist-info directory in wheels
2019-12-23 05:41:30 +08:00
Chris Hunt e5495cf6a1 Raise UnsupportedWheel when .dist-info doesn't match name
This aligns with the previous behavior that would have enforced the
found .dist-info directory starting with the name of the package.

We raise UnsupportedWheel because it looks better in output than the
AssertionError (which includes traceback).
2019-12-21 21:27:49 -05:00
Chris Hunt 0d865d8fe3 Add test for multiple .dist-info in wheel 2019-12-21 10:51:57 -05:00
Chris Hunt 38585adaec Add warning when using old console script wrappers
We use sys.stderr instead of our `deprecated` helper because logging is
not set up at the time this is executed.
2019-12-20 22:01:25 -05:00
Chris Hunt 241679e6c2 Setup old entrypoints in pip module
This should make everything "just work" with respect to combinations of
PATH, sys.path, and multiple Python installs. Later we can add a warning
here to help guide users to better understanding.
2019-12-19 21:20:51 -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
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
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 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
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) 178cd3f244
Better workaround for cache poisoning #3025
Make sure ``pip wheel`` never outputs pure python wheels with a
python implementation tag. Better fix/workaround for
`#3025 <https://github.com/pypa/pip/issues/3025>`_ by
using a per-implementation wheel cache instead of caching pure python
wheels with an implementation tag in their name.

Fixes #7296
2019-12-02 12:07:18 +01:00
Chris Hunt b8f626ace6 Deprecate install-location-related options in --install-option 2019-11-30 17:42:48 -05:00
Paul Moore 4f6a965f14
Merge pull request #7394 from takluyver/i6599
Fix building packages with backend-path in pyproject.toml
2019-11-25 21:40:33 +00:00
Chris Hunt 8d38b37052 Ignore WARNING emitted by setuptools during test 2019-11-23 16:17:35 -05:00
Thomas Kluyver 59550aaec3 Add an integration test of installing a project with a local PEP 517 backend 2019-11-23 18:45:09 +00:00
Thomas Kluyver 400cf8d71e Add a test combining local PEP 517 backend with external dependency 2019-11-23 16:57:24 +00:00
Thomas Kluyver edc525add9 Remove leftover debugging code 2019-11-23 16:53:01 +00:00
Thomas Kluyver 81f6ba3fc1 Default None instead of [] 2019-11-23 16:52:24 +00:00
Thomas Kluyver dd7b1ee5c3 Fix building packages with backend-path in pyproject.toml
Closes gh-6599
2019-11-23 14:38:27 +00:00
Chris Hunt 1daa8b2fd9 Add mock server wrapper and replace network calls in a test 2019-11-17 17:36:36 -05:00
Chris Hunt bf7ad4a2a1 Remove unnecessary wrapping of tests
The cited issue https://bugs.python.org/issue3210 is fixed in all the
versions of Python that we test against.
2019-11-17 16:12:17 -05:00
Christopher Hunt db4da4737c
Merge pull request #7359 from torsava/master
Mark 6 tests as network tests
2019-11-18 04:15:03 +08:00
Tomas Orsava e521228129 Mark 6 tests as network tests
=================================== FAILURES ===================================
_______________________________ test_freeze_path _______________________________
tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path0')
script = <tests.lib.PipTestEnvironment object at 0x7fe950a4caf0>
data = <tests.lib.TestData object at 0x7fe950a4cc10>
    def test_freeze_path(tmpdir, script, data):
        """
        Test freeze with --path.
        """
>       script.pip('install', '--find-links', data.find_links,
                   '--target', tmpdir, 'simple==2.0')
tests/functional/test_freeze.py:712:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/__init__.py:593: in run
    _check_stderr(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7fe6435ef280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n"
allow_stderr_warning = False, allow_stderr_error = False
    def _check_stderr(
        stderr, allow_stderr_warning, allow_stderr_error,
    ):
        """
        Check the given stderr for logged warnings and errors.

        :param stderr: stderr output as a string.
        :param allow_stderr_warning: whether a logged warning (or deprecation
            message) is allowed. Must be True if allow_stderr_error is True.
        :param allow_stderr_error: whether a logged error is allowed.
        """
        assert not (allow_stderr_error and not allow_stderr_warning)

        lines = stderr.splitlines()
        for line in lines:
            # First check for logging errors, which we don't allow during
            # tests even if allow_stderr_error=True (since a logging error
            # would signal a bug in pip's code).
            #    Unlike errors logged with logger.error(), these errors are
            # sent directly to stderr and so bypass any configured log formatter.
            # The "--- Logging error ---" string is used in Python 3.4+, and
            # "Logged from file " is used in Python 2.
            if (line.startswith('--- Logging error ---') or
                    line.startswith('Logged from file ')):
                reason = 'stderr has a logging error, which is never allowed'
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
                raise RuntimeError(msg)
            if allow_stderr_error:
                continue

            if line.startswith('ERROR: '):
                reason = (
                    'stderr has an unexpected error '
                    '(pass allow_stderr_error=True to permit this)'
                )
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
                raise RuntimeError(msg)
            if allow_stderr_warning:
                continue

            if (line.startswith('WARNING: ') or
                    line.startswith(DEPRECATION_MSG_PREFIX)):
                reason = (
                    'stderr has an unexpected warning '
                    '(pass allow_stderr_warning=True to permit this)'
                )
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
>               raise RuntimeError(msg)
E               RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
E                Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364c850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/"
E                Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364c850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364cdc0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364cf70>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe6435ef130>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe6435ef280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
tests/lib/__init__.py:404: RuntimeError
________________________ test_freeze_path_exclude_user _________________________
tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_exclude_user0')
script = <tests.lib.PipTestEnvironment object at 0x7fe950ec8fa0>
data = <tests.lib.TestData object at 0x7fe950ec8a30>
    def test_freeze_path_exclude_user(tmpdir, script, data):
        """
        Test freeze with --path and make sure packages from --user are not picked
        up.
        """
        script.pip_install_local('--find-links', data.find_links,
                                 '--user', 'simple2')
>       script.pip('install', '--find-links', data.find_links,
                   '--target', tmpdir, 'simple==1.0')
tests/functional/test_freeze.py:728:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/__init__.py:593: in run
    _check_stderr(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f87ae751310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n"
allow_stderr_warning = False, allow_stderr_error = False
    def _check_stderr(
        stderr, allow_stderr_warning, allow_stderr_error,
    ):
        """
        Check the given stderr for logged warnings and errors.

        :param stderr: stderr output as a string.
        :param allow_stderr_warning: whether a logged warning (or deprecation
            message) is allowed. Must be True if allow_stderr_error is True.
        :param allow_stderr_error: whether a logged error is allowed.
        """
        assert not (allow_stderr_error and not allow_stderr_warning)

        lines = stderr.splitlines()
        for line in lines:
            # First check for logging errors, which we don't allow during
            # tests even if allow_stderr_error=True (since a logging error
            # would signal a bug in pip's code).
            #    Unlike errors logged with logger.error(), these errors are
            # sent directly to stderr and so bypass any configured log formatter.
            # The "--- Logging error ---" string is used in Python 3.4+, and
            # "Logged from file " is used in Python 2.
            if (line.startswith('--- Logging error ---') or
                    line.startswith('Logged from file ')):
                reason = 'stderr has a logging error, which is never allowed'
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
                raise RuntimeError(msg)
            if allow_stderr_error:
                continue

            if line.startswith('ERROR: '):
                reason = (
                    'stderr has an unexpected error '
                    '(pass allow_stderr_error=True to permit this)'
                )
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
                raise RuntimeError(msg)
            if allow_stderr_warning:
                continue

            if (line.startswith('WARNING: ') or
                    line.startswith(DEPRECATION_MSG_PREFIX)):
                reason = (
                    'stderr has an unexpected warning '
                    '(pass allow_stderr_warning=True to permit this)'
                )
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
>               raise RuntimeError(msg)
E               RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
E                Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7aa8e0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/"
E                Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7aa8e0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7aae50>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae751040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7511c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae751310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
tests/lib/__init__.py:404: RuntimeError
__________________________ test_freeze_path_multiple ___________________________
tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_multiple0')
script = <tests.lib.PipTestEnvironment object at 0x7fe950b43fd0>
data = <tests.lib.TestData object at 0x7fe950b43df0>
    def test_freeze_path_multiple(tmpdir, script, data):
        """
        Test freeze with multiple --path arguments.
        """
        path1 = tmpdir / "path1"
        os.mkdir(path1)
        path2 = tmpdir / "path2"
        os.mkdir(path2)
>       script.pip('install', '--find-links', data.find_links,
                   '--target', path1, 'simple==2.0')
tests/functional/test_freeze.py:750:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/__init__.py:593: in run
    _check_stderr(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f07e6253280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n"
allow_stderr_warning = False, allow_stderr_error = False
    def _check_stderr(
        stderr, allow_stderr_warning, allow_stderr_error,
    ):
        """
        Check the given stderr for logged warnings and errors.

        :param stderr: stderr output as a string.
        :param allow_stderr_warning: whether a logged warning (or deprecation
            message) is allowed. Must be True if allow_stderr_error is True.
        :param allow_stderr_error: whether a logged error is allowed.
        """
        assert not (allow_stderr_error and not allow_stderr_warning)

        lines = stderr.splitlines()
        for line in lines:
            # First check for logging errors, which we don't allow during
            # tests even if allow_stderr_error=True (since a logging error
            # would signal a bug in pip's code).
            #    Unlike errors logged with logger.error(), these errors are
            # sent directly to stderr and so bypass any configured log formatter.
            # The "--- Logging error ---" string is used in Python 3.4+, and
            # "Logged from file " is used in Python 2.
            if (line.startswith('--- Logging error ---') or
                    line.startswith('Logged from file ')):
                reason = 'stderr has a logging error, which is never allowed'
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
                raise RuntimeError(msg)
            if allow_stderr_error:
                continue

            if line.startswith('ERROR: '):
                reason = (
                    'stderr has an unexpected error '
                    '(pass allow_stderr_error=True to permit this)'
                )
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
                raise RuntimeError(msg)
            if allow_stderr_warning:
                continue

            if (line.startswith('WARNING: ') or
                    line.startswith(DEPRECATION_MSG_PREFIX)):
                reason = (
                    'stderr has an unexpected warning '
                    '(pass allow_stderr_warning=True to permit this)'
                )
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
>               raise RuntimeError(msg)
E               RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
E                Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62ae850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/"
E                Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62ae850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62aedc0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62aef70>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e6253130>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
E               WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e6253280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
tests/lib/__init__.py:404: RuntimeError
_________________ test_install_no_binary_builds_pep_517_wheel __________________
script = <tests.lib.PipTestEnvironment object at 0x7fe9509f4e20>
data = <tests.lib.TestData object at 0x7fe9509f4640>, with_wheel = None
    def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel):
        to_install = data.packages.joinpath('pep517_setup_and_pyproject')
>       res = script.pip(
            'install', '--no-binary=:all:', '-f', data.find_links, to_install
        )
tests/functional/test_install.py:1279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.lib.PipTestEnvironment object at 0x7fe9509f4e20>
args = ('python', '-m', 'pip', 'install', '--no-binary=:all:', '-f', ...)
kw = {'expect_stderr': True}
cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/scratch')
run_from = None, allow_stderr_error = False, allow_stderr_warning = False
expect_error = None
    def run(self, *args, **kw):
        """
        :param allow_stderr_error: whether a logged error is allowed in
            stderr.  Passing True for this argument implies
            `allow_stderr_warning` since warnings are weaker than errors.
        :param allow_stderr_warning: whether a logged warning (or
            deprecation message) is allowed in stderr.
        :param expect_error: if False (the default), asserts that the command
            exits with 0.  Otherwise, asserts that the command exits with a
            non-zero exit code.  Passing True also implies allow_stderr_error
            and allow_stderr_warning.
        :param expect_stderr: whether to allow warnings in stderr (equivalent
            to `allow_stderr_warning`).  This argument is an abbreviated
            version of `allow_stderr_warning` and is also kept for backwards
            compatibility.
        """
        if self.verbose:
            print('>> running %s %s' % (args, kw))

        cwd = kw.pop('cwd', None)
        run_from = kw.pop('run_from', None)
        assert not cwd or not run_from, "Don't use run_from; it's going away"
        cwd = cwd or run_from or self.cwd
        if sys.platform == 'win32':
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
            args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]

        # Remove `allow_stderr_error` and `allow_stderr_warning` before
        # calling run() because PipTestEnvironment doesn't support them.
        allow_stderr_error = kw.pop('allow_stderr_error', None)
        allow_stderr_warning = kw.pop('allow_stderr_warning', None)

        # Propagate default values.
        expect_error = kw.get('expect_error')
        if expect_error:
            # Then default to allowing logged errors.
            if allow_stderr_error is not None and not allow_stderr_error:
                raise RuntimeError(
                    'cannot pass allow_stderr_error=False with '
                    'expect_error=True'
                )
            allow_stderr_error = True

        elif kw.get('expect_stderr'):
            # Then default to allowing logged warnings.
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'expect_stderr=True'
                )
            allow_stderr_warning = True

        if allow_stderr_error:
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'allow_stderr_error=True'
                )

        # Default values if not set.
        if allow_stderr_error is None:
            allow_stderr_error = False
        if allow_stderr_warning is None:
            allow_stderr_warning = allow_stderr_error

        # Pass expect_stderr=True to allow any stderr.  We do this because
        # we do our checking of stderr further on in check_stderr().
        kw['expect_stderr'] = True
>       result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
E       AssertionError: Script returned code: 1
tests/lib/__init__.py:586: AssertionError
----------------------------- Captured stdout call -----------------------------
Script result: python -m pip install --no-binary=:all: -f file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject
  return code: 1
-- stderr: --------------------
  ERROR: Command errored out with exit status 1:
   command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools
       cwd: None
  Complete output (28 lines):
  Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234ef1e50>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e92040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e921c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e92340>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e924c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
  Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/setuptools-0.9.6.tar.gz
      ERROR: Command errored out with exit status 1:
       command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"'; __file__='"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pip-egg-info
           cwd: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/
      Complete output (15 lines):
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/__init__.py", line 2, in <module>
          from setuptools.extension import Extension, Library
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/extension.py", line 5, in <module>
          from setuptools.dist import _get_unpatched
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/dist.py", line 7, in <module>
          from setuptools.command.install import install
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/__init__.py", line 8, in <module>
          from setuptools.command import install_scripts
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/install_scripts.py", line 3, in <module>
          from pkg_resources import Distribution, PathMetadata, ensure_directory
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pkg_resources.py", line 1545, in <module>
          register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
      AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools Check the logs for full command output.
-- stdout: --------------------
Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages
Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
_______________________ test_config_file_override_stack ________________________
script = <tests.lib.PipTestEnvironment object at 0x7fe950d9b7f0>
virtualenv = <VirtualEnvironment /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/venv>
    def test_config_file_override_stack(script, virtualenv):
        """
        Test config files (global, overriding a global config with a
        local, overriding all with a command line flag).

        """
        fd, config_file = tempfile.mkstemp('-pip.cfg', 'test-')
        try:
>           _test_config_file_override_stack(script, virtualenv, config_file)
tests/functional/test_install_config.py:144:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/functional/test_install_config.py:172: in _test_config_file_override_stack
    result = script.pip(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.lib.PipTestEnvironment object at 0x7fe950d9b7f0>
args = ('python', '-m', 'pip', 'install', '-vvv', '--index-url', ...)
kw = {'expect_stderr': True}
cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/scratch')
run_from = None, allow_stderr_error = False, allow_stderr_warning = False
expect_error = None
    def run(self, *args, **kw):
        """
        :param allow_stderr_error: whether a logged error is allowed in
            stderr.  Passing True for this argument implies
            `allow_stderr_warning` since warnings are weaker than errors.
        :param allow_stderr_warning: whether a logged warning (or
            deprecation message) is allowed in stderr.
        :param expect_error: if False (the default), asserts that the command
            exits with 0.  Otherwise, asserts that the command exits with a
            non-zero exit code.  Passing True also implies allow_stderr_error
            and allow_stderr_warning.
        :param expect_stderr: whether to allow warnings in stderr (equivalent
            to `allow_stderr_warning`).  This argument is an abbreviated
            version of `allow_stderr_warning` and is also kept for backwards
            compatibility.
        """
        if self.verbose:
            print('>> running %s %s' % (args, kw))

        cwd = kw.pop('cwd', None)
        run_from = kw.pop('run_from', None)
        assert not cwd or not run_from, "Don't use run_from; it's going away"
        cwd = cwd or run_from or self.cwd
        if sys.platform == 'win32':
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
            args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]

        # Remove `allow_stderr_error` and `allow_stderr_warning` before
        # calling run() because PipTestEnvironment doesn't support them.
        allow_stderr_error = kw.pop('allow_stderr_error', None)
        allow_stderr_warning = kw.pop('allow_stderr_warning', None)

        # Propagate default values.
        expect_error = kw.get('expect_error')
        if expect_error:
            # Then default to allowing logged errors.
            if allow_stderr_error is not None and not allow_stderr_error:
                raise RuntimeError(
                    'cannot pass allow_stderr_error=False with '
                    'expect_error=True'
                )
            allow_stderr_error = True

        elif kw.get('expect_stderr'):
            # Then default to allowing logged warnings.
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'expect_stderr=True'
                )
            allow_stderr_warning = True

        if allow_stderr_error:
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'allow_stderr_error=True'
                )

        # Default values if not set.
        if allow_stderr_error is None:
            allow_stderr_error = False
        if allow_stderr_warning is None:
            allow_stderr_warning = allow_stderr_error

        # Pass expect_stderr=True to allow any stderr.  We do this because
        # we do our checking of stderr further on in check_stderr().
        kw['expect_stderr'] = True
>       result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
E       AssertionError: Script returned code: 1
tests/lib/__init__.py:586: AssertionError
----------------------------- Captured stdout call -----------------------------
Script result: python -m pip install -vvv --index-url https://pypi.org/simple/ INITools
  return code: 1
-- stderr: --------------------
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3d8b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3da60>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3dbe0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3dd60>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f966900f490>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
ERROR: Could not find a version that satisfies the requirement INITools (from versions: none)
ERROR: No matching distribution found for INITools
-- stdout: --------------------
Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-ephem-wheel-cache-6gj33ens
Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc
Created requirements tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc'
Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-install-_91mh3df
Looking in indexes: https://pypi.org/simple/
1 location(s) to search for versions of INITools:
* https://pypi.org/simple/initools/
Getting page https://pypi.org/simple/initools/
Found index url https://pypi.org/simple/
Looking up "https://pypi.org/simple/initools/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
Incremented Retry for (url='/simple/initools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
Starting new HTTPS connection (2): pypi.org:443
Incremented Retry for (url='/simple/initools/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
Starting new HTTPS connection (3): pypi.org:443
Incremented Retry for (url='/simple/initools/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
Starting new HTTPS connection (4): pypi.org:443
Incremented Retry for (url='/simple/initools/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
Starting new HTTPS connection (5): pypi.org:443
Incremented Retry for (url='/simple/initools/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
Starting new HTTPS connection (6): pypi.org:443
Could not fetch URL https://pypi.org/simple/initools/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/initools/ (Caused by NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c15b50>: Failed to establish a new connection: [Errno -2] Name or service not known')) - skipping
Given no hashes to check 0 links for project 'INITools': discarding no candidates
Cleaning up...
Removed build tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc'
Exception information:
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
    status = self.run(options, args)
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 401, in run
    resolver.resolve(requirement_set)
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 202, in resolve
    self._resolve_one(requirement_set, req)
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 368, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 314, in _get_abstract_dist_for
    req.populate_link(self.finder, upgrade_allowed, self.require_hashes)
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 226, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/index.py", line 905, in find_requirement
    raise DistributionNotFound(
pip._internal.exceptions.DistributionNotFound: No matching distribution found for INITools
_______________________ test_no_upgrade_unless_requested _______________________
script = <tests.lib.PipTestEnvironment object at 0x7fe950d86070>
    def test_no_upgrade_unless_requested(script):
        """
        No upgrade if not specifically requested.

        """
>       script.pip('install', 'INITools==0.1')
tests/functional/test_install_upgrade.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.lib.PipTestEnvironment object at 0x7fe950d86070>
args = ('python', '-m', 'pip', 'install', 'INITools==0.1')
kw = {'expect_stderr': True}
cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_no_upgrade_unless_request0/workspace/scratch')
run_from = None, allow_stderr_error = False, allow_stderr_warning = False
expect_error = None
    def run(self, *args, **kw):
        """
        :param allow_stderr_error: whether a logged error is allowed in
            stderr.  Passing True for this argument implies
            `allow_stderr_warning` since warnings are weaker than errors.
        :param allow_stderr_warning: whether a logged warning (or
            deprecation message) is allowed in stderr.
        :param expect_error: if False (the default), asserts that the command
            exits with 0.  Otherwise, asserts that the command exits with a
            non-zero exit code.  Passing True also implies allow_stderr_error
            and allow_stderr_warning.
        :param expect_stderr: whether to allow warnings in stderr (equivalent
            to `allow_stderr_warning`).  This argument is an abbreviated
            version of `allow_stderr_warning` and is also kept for backwards
            compatibility.
        """
        if self.verbose:
            print('>> running %s %s' % (args, kw))

        cwd = kw.pop('cwd', None)
        run_from = kw.pop('run_from', None)
        assert not cwd or not run_from, "Don't use run_from; it's going away"
        cwd = cwd or run_from or self.cwd
        if sys.platform == 'win32':
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
            args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]

        # Remove `allow_stderr_error` and `allow_stderr_warning` before
        # calling run() because PipTestEnvironment doesn't support them.
        allow_stderr_error = kw.pop('allow_stderr_error', None)
        allow_stderr_warning = kw.pop('allow_stderr_warning', None)

        # Propagate default values.
        expect_error = kw.get('expect_error')
        if expect_error:
            # Then default to allowing logged errors.
            if allow_stderr_error is not None and not allow_stderr_error:
                raise RuntimeError(
                    'cannot pass allow_stderr_error=False with '
                    'expect_error=True'
                )
            allow_stderr_error = True

        elif kw.get('expect_stderr'):
            # Then default to allowing logged warnings.
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'expect_stderr=True'
                )
            allow_stderr_warning = True

        if allow_stderr_error:
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'allow_stderr_error=True'
                )

        # Default values if not set.
        if allow_stderr_error is None:
            allow_stderr_error = False
        if allow_stderr_warning is None:
            allow_stderr_warning = allow_stderr_error

        # Pass expect_stderr=True to allow any stderr.  We do this because
        # we do our checking of stderr further on in check_stderr().
        kw['expect_stderr'] = True
>       result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
E       AssertionError: Script returned code: 1
tests/lib/__init__.py:586: AssertionError
----------------------------- Captured stdout call -----------------------------
Script result: python -m pip install INITools==0.1
  return code: 1
-- stderr: --------------------
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36700>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36c40>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36dc0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36f40>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66be48100>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
ERROR: Could not find a version that satisfies the requirement INITools==0.1 (from versions: none)
ERROR: No matching distribution found for INITools==0.1
2019-11-15 20:10:01 +01:00
Chris Hunt d4f2c9f962 Remove interpreter-specific major version tag
As mentioned in https://snarky.ca/the-challenges-in-designing-a-library-for-pep-425/
this tag doesn't make much sense + it impedes our usage of
packaging.tags.

In terms of backwards-compatibility, we attest to try to match
compatible wheels as best as possible, and this tag doesn't represent
that.
2019-11-15 00:20:58 -05:00
Hanjun Kim 0363420239
update test condition 2019-11-12 20:03:01 +09:00
Chris Jerdonek bab1e4f8a1 Change CollectedLinks to store project_urls. 2019-11-10 21:27:00 -05:00
Chris Hunt 9775387e41 Move unit test to functional test for implicit hash checking 2019-11-09 16:30:44 -05:00
Pradyun Gedam 8981895b5e
Skip all failing tests when using venv
Our isolation logic for venv isn't correct and that is causing these
tests to fail. The culprits for this are:

  tests/lib/venv.py::VirtualEnvironment.user_site_packages
  tests/lib/venv.py::VirtualEnvironment.sitecustomize

Both these together are supposed to create an environment to isolate the
tests. However, they were written for virtualenv and make assumptions
that are not true for environments created with venv. Until we can fix
VirtualEnvironment to properly isolate the test from the underlying test
environment when using venv, these tests will continue to fail.

This is blocking an important bugfix for users facing issues with since
pip is installing packages into `--user` when run in a venv, even when
`--user` isn't visible from that environment.

As a temporary band-aid for this problem, I'm skipping these tests to
unblock us from shipping the bugfix for the aforementioned issue.

The test isolation logic should be fixed to work for venv. Once such a
fix is made, this commit should be reverted.
2019-11-05 23:02:45 +05:30
Christopher Hunt e79fa0e8a2
Merge pull request #6851 from sbidoul/pip6640-sbi
Cache wheels built from immutable VCS requirements
2019-11-04 08:32:11 +08:00
Christopher Hunt 5b77910715
Merge pull request #7289 from chrahunt/bugfix/send-client-cert
Send client certificate when using --trusted-host
2019-11-04 08:30:28 +08:00
Chris Hunt d9854794fa Add failing test for missing client cert when using --trusted-host 2019-11-03 17:05:58 -05:00
Stéphane Bidoul (ACSONE) 9cad519521
Cache wheels built from immutable Git requirements
Cache wheels that are built from Git requirements
that contain an immutable revision (i.e. a sha).
2019-11-03 22:54:33 +01:00
Stéphane Bidoul (ACSONE) f5eba4f726
Add tests for git sha wheel caching 2019-11-03 22:54:33 +01:00
Stéphane Bidoul (ACSONE) ba60397dd4
Make pip wheel cache what it built
Just like pip install.
2019-11-03 22:08:42 +01:00
Christopher Hunt 39d16b6ca8
Merge pull request #7276 from chrahunt/refactor/shared-test-scripts
Share script fixtures across tests
2019-11-02 23:45:48 +08:00
Stéphane Bidoul (ACSONE) 18a58815a1
Refactor _get_used_vcs_backend 2019-11-01 12:53:54 +01:00
Chris Hunt 0c4625b2ba Use another shared script in pip list tests 2019-10-30 02:16:23 -04:00
Chris Hunt 6cd9852626 Use shared script in pip list tests 2019-10-30 01:55:32 -04:00
Chris Hunt 1f9028851d Make shared script with launchers installed 2019-10-30 01:54:57 -04:00
Chris Hunt ab6b17b2a6 Refactor autocomplete test helper to use shared script 2019-10-30 01:53:48 -04:00
Chris Hunt cc73b2b933 Use shared autocomplete_script for tests 2019-10-30 01:53:45 -04:00
Thomas Kluyver f92efc022b Test that setting user in the config file works 2019-10-27 10:09:15 +00:00
Pradyun Gedam c729a84b48
Merge pull request #7002 from takluyver/install-user-fallback
Default to --user install in certain conditions
2019-10-22 08:44:06 +05:30
Pradyun Gedam bcad1b1cb5
Add new option: pip wheel --save-wheel-names (#6377) 2019-10-19 11:03:15 +05:30
Christopher Hunt 24c9daaaa9
Merge pull request #6857 from abs51295/fix-pip-freeze
Canonicalize FrozenRequirement name for correct comparison
2019-10-17 20:08:23 -04:00
Pradyun Gedam 2e9f89ef8f
Fix PEP 517 builds for packages without setup.py (#6606) 2019-10-17 22:18:03 +05:30
Christopher Hunt 7c755a571d
Merge pull request #7216 from NeilBotelho/debug-ca-info
Display CA information in pip debug
2019-10-17 04:29:41 -04:00
Neil Botelho 144611ca1e Show cert config value first
Move the cert config show_value statement to before the
REQUESTS_CA_BUNDLE statement. Removed lines used for testing.
2019-10-17 12:31:49 +05:30
Pradyun Gedam 33d7d65da1
Update test to verify that full URL is not printed 2019-10-16 12:26:10 +05:30
Harsh Vardhan 0e6ac42c93 Add need_svn decorator for tests which require svn
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
2019-10-15 17:22:16 +05:30
Neil Botelho e2a6fea7fa Add CA cert info to debug, and corresponding tests
Added CA cert information to debug.py
Made the corresponding changes to tests/functional/test_debug.py
2019-10-15 14:54:34 +05:30
Pradyun Gedam 1c3f31ce14
Merge pull request #7072 from TonyBeswick/master
Fix pip freeze not showing correct entry for mercurial packages that use subdirectories.
2019-10-12 18:23:20 +05:30
Sebastian Jordan e3089c5bff Merge remote-tracking branch 'origin/master' into issue-6222 2019-10-11 19:23:45 +02:00
Christopher Hunt f3f396fd79
Merge pull request #7102 from mayeut/manylinux2014
Add manylinux2014 support
2019-10-10 18:07:51 -04:00
Pachwenko f84d9c810b
update global install option test 2019-10-10 07:56:38 -05:00
mayeut 62d84a5aae
Add manylinux2014 support
Per PEP 599:
https://www.python.org/dev/peps/pep-0599/
2019-10-09 22:09:28 +02:00
Thomas Kluyver 4a4f1ca1cf Relax failing tests due to changing site-packages mtime 2019-10-09 13:54:46 +01:00
TonyBeswick bcbaee7aa5
Merge branch 'master' into master 2019-10-08 18:39:08 +13:00
tbeswick c6906f1a38 - Abstracted out common `get_subdirectory()` code in `Git` and `Mercurial`, adding `get_repo_root_dir()` for the vcs specific code.
- Reverted behaviour of `Git.controls_location()` and `Mercurial.controls_location()` to call the vcs command if the base `VersionControl.controls_location()` doesn't detect the vcs directory.
- Added `log_failed_cmd` argument `VcsSupport.run_command()` to allow vcs commands to be tried without logging errors if they aren't present.
- Corrected indentation.
- Removed `expect_stderr=True` in `test_freeze_mercurial_clone_srcdir` as its not required.
2019-10-08 18:15:22 +13:00
Pradyun Gedam 37bc629551
Rename tests.lib.path.Path.{abspath -> resolve()} 2019-10-07 18:01:06 +05:30
Pradyun Gedam 732da2dae0
Remove tests.lib.path.Path.__sub__ (#7151) 2019-10-07 17:52:19 +05:30
Pradyun Gedam 3ff9061c4e
Fix a copy-paste error 2019-10-07 15:12:33 +05:30
Pradyun Gedam 7d72b3e034
Update uses of path subtraction to os.path.relpath 2019-10-07 12:38:22 +05:30
Chris Hunt f805f328d4 Align interface of tests.lib.path.Path.mkdir with pathlib.Path.mkdir. 2019-10-06 21:55:10 -04:00
Christopher Hunt 5a997b7509
Merge pull request #7065 from chrahunt/pr-5955
Explicit support for hg+file
2019-10-06 09:39:42 -04:00
Sebastian Jordan 6a2d2dbb81 Merge branch 'master' of https://github.com/pypa/pip into issue-6222 2019-10-03 08:36:19 +02:00
Pradyun Gedam b20fd061c4
Allow errors in YAML test outputs 2019-10-01 11:24:21 +05:30
Pradyun Gedam 617c94e57b
Show output in YAML test failures 2019-10-01 11:21:21 +05:30
Pradyun Gedam ff041cc5b0
Merge branch 'master' into master 2019-09-30 21:33:34 +05:30
Pradyun Gedam 2bb8ee6ae3
Sort imports for the greater good 2019-09-28 18:16:34 +05:30
Pradyun Gedam 3a77de3c7d
Split tests for different functionality 2019-09-28 18:16:34 +05:30
Pradyun Gedam e670f90219
Generate temporary file in a fixture 2019-09-28 18:16:34 +05:30
Pradyun Gedam f3c1519160
Improve name and docstring 2019-09-28 18:15:13 +05:30
Albert Tugushev e41c5f868c Address review comments
Fix typos.

Co-Authored-By: Christopher Hunt <chrahunt@gmail.com>
2019-09-28 01:07:48 +03:00
Albert Tugushev 1a3b84060d Add functional tests for 'yanked' files 2019-09-28 01:07:48 +03:00
Christopher Hunt 3b7d2eee5e
Merge pull request #7061 from chrahunt/refactor/move-code-out-of-init
Move code out of pip._internal.__init__
2019-09-26 13:36:35 -04:00
Patrik Kopkan 9a2181a087 Add new option: pip wheel --save-wheel-names 2019-09-25 13:39:34 +02:00
Sebastian Jordan 58eb90ff80 Fix code layout problems in test_install.py 2019-09-25 06:39:03 +02:00
Sebastian Jordan be6e198875 Implement functional test for installing PEP 517 packages with --no-binary :all: 2019-09-25 06:32:18 +02:00
tbeswick 657a7cb0c2 - Added missing argument to run_command: on_returncode='ignore'
- fixed lint errors.
2019-09-24 21:05:30 +12:00
tbeswick 356c6d2059 fixed typo 2019-09-24 16:33:39 +12:00
Tony Beswick 73a6342d55 Added unit test for Mercurial to check for correct behaviour when either the source or setup.py is located in a subdirectory of the repo root. 2019-09-24 12:28:40 +12:00
Chris Hunt 05964ead48 Address previous review comments 2019-09-22 11:10:25 -04:00
Adam Tse 4022ac277f :fixed whitespace 2019-09-22 11:04:23 -04:00
Adam Tse 3f98ee4250 Explicit support and tests for `hg+file` scheme for `pip install`. 2019-09-22 11:04:23 -04:00
Chris Hunt b0eed267a6 Remove autocomplete import from pip._internal.__init__ 2019-09-21 15:27:47 -04:00
Chris Jerdonek 188ec6ff4e Don't pass "/trunk" when calling local_checkout() with svn. 2019-09-21 03:29:34 -07:00
Chris Jerdonek d7709fa106 Assert that initools_dir doesn't already exist. 2019-09-21 02:31:32 -07:00
Chris Jerdonek 1ca61e14ba Assert that repo_url_path doesn't exist. 2019-09-21 02:31:25 -07:00
Christopher Hunt b1bc41b2c3
Merge pull request #6914 from sbidoul/pip6892-sbi
uninstall: remove symlinks created by flit install --symlink
2019-09-17 21:14:28 -04:00
Chris Jerdonek 9a765b8cab Change local_checkout() to accept tmpdir. 2019-09-13 21:41:32 -07:00
Pradyun Gedam ceaf514189
Drop support for EOL Python 3.4 (2) (#6782)
Merge pull request #6782 from hugovk/rm-3.4
2019-09-10 09:28:11 +05:30
Hugo 2b94acb9d8 Rename for clarity 2019-09-09 20:43:09 +03:00
Hugo 0f7921e120 Add a @non_python2_only skipif 2019-09-08 20:03:13 +03:00