Commit Graph

728 Commits

Author SHA1 Message Date
Frost Ming 7708cd8445 Pass lock options to outdated 2019-08-03 10:44:45 +08:00
John Vandenberg 2f5150ab29 test_install_without_dev: Replace pytz with tablib
pytz exists in the build environment, which will typically
be added to the PYTHONPATH when running the tests in rpmbuild.
The alternative is to create a virtualenv containing only the
pipenv dependencies, which is cumbersome to do when devendoring.
As the pytz library here is not critical to the logic of the
test method, replace it with tablib to reduce unintentionally
errors when packaging.

Continuation of https://github.com/pypa/pipenv/issues/3644
2019-07-11 13:33:02 +07:00
John Vandenberg 9869fcfffa test_update_locks: Replace requests with jdcal
Using requests in tests fails when pipenv is de-vendored.
In this test, using any package with multiple versions
in the local pypi data will suffice to show the functionality
does work, but not with requests, or any devendored package.

Continuation of https://github.com/pypa/pipenv/issues/3644
2019-07-11 13:33:02 +07:00
John Vandenberg e4d992b84c test_uninstall.py: Replace requests with Django 2019-07-11 13:33:01 +07:00
John Vandenberg 050d9b4c78 graph tests: Replace requests with tablib 0.13.0
These tests fail when using requests in a de-vendored installation
because requests is part of the pre-installed image.

tablib has fewer constraints on its dependencies, however its
dependency tree is complicated enough to approximately test
the same functionality, and allows the graph tests to pass
even when de-vendored.
2019-07-11 13:33:01 +07:00
John Vandenberg 8d12d8f7f9 Update tests/pypi to include tablib 0.13.0 2019-07-11 13:33:00 +07:00
John Vandenberg c79b291cbb Avoid using requests unnecessarily in tests
This replaces requests with tablib in test_include_editable_packages
as in a de-vendored environment the locking fails with requests.

Continuation of https://github.com/pypa/pipenv/issues/3644
2019-07-11 13:33:00 +07:00
Dan Ryan b105ea534b Fix test for formatting paths
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 14:47:39 -04:00
Dan Ryan e559b00a90 Fix xmlrpc implementation
Signed-off-by: Dan Ryan <dan@danryan.co>

fix xmlrpc implementation

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 02:12:55 -04:00
Dan Ryan 1630da82c0 Pin pytest<5
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 01:36:43 -04:00
Dan Ryan 8abaa06c23 Remove extraneous exception added to conftest.py
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 01:02:16 -04:00
Dan Ryan e57898ac58 Fix windows test failure and leaky session from xmlrpc call
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 23:51:10 -04:00
Dan Ryan 9c3ee2a72b Get rid of devpi
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 02:55:47 -04:00
Dan Ryan 5ac676711a Fix editable VCS dependency resolution
- Fixes #3809

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 02:06:43 -04:00
Dan Ryan 4b75c6490d Fix devpi server to work on windows
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 23:52:49 -04:00
Dan Ryan edbb6321f4 Add windows support to test devpi server
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 17:25:18 -04:00
Dan Ryan 83868c8f1a Cut over to devpi for tests and improve logging
- Verbose logs will now write gracefully to the terminal even while the
  spinner is running (i.e. during locking)
- This PR also cuts over to Devpi for a backing cache rather than a
  hacked httpbin instance
- Inclues a refactor of `pip_install` to deduplicate logic
- Attempts to switch back to relying on native editable installs in pip
  as the current implementation is broken on master (i.e. nothing is
  installed in the virtualenv)
- Fixes #3809

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 01:26:49 -04:00
Dan Ryan bd3720d3b1 Don't override PIP_NO_DEPS by default
- We used to override `PIP_NO_DEPS` by default when handling VCS or file
  dependencies
- This PR exempts VCS and file dependencies from that rule since we are
  able to resolve them in a pre-lock resolution step
- Fixes #3763

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-17 22:49:25 -04:00
Dan Ryan b4d6ea5236 Fix environment check
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-17 15:25:18 -04:00
Dan Ryan 8bb39a73e6 Check stderr instead of stdout for message and add required info back to outdated packages
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-17 02:04:55 -04:00
Dan Ryan 98f7f42742 Fix toml parsing and resolver comparisons
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-17 01:34:37 -04:00
Dan Ryan e7536ab1f6 Fix version comparisons in do_outdated
- Fix comparisons between post-release and non-post-release versions
- Update `pip_shims` to accommodate new pip versions
- Implement syntax changes in `environment.py` to account for new pip
  syntax
- Add `required` version output to `pipenv update --outdated`
- Add pipfile version pin information as well, if available

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-16 23:06:37 -04:00
Dan Ryan 2a0cc13f4e Merge branch 'master' into fix-several-general-options 2019-06-04 21:37:00 -04:00
Dan Ryan 06f3cae5e2 Merge branch 'master' into fix-queue 2019-06-04 03:23:27 -04:00
Dan Ryan b5643760e3 Fix test comparisons
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-04 02:08:05 -04:00
Dan Ryan 1525f88676 Don't use tablib for keep_outdated test due to osx failure
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-04 01:39:03 -04:00
Dan Ryan 359906c669 Update tests to resolve some transient resolution issues
Signed-off-by: Dan Ryan <dan@danryan.co>

probably need to sync submodules for this to work

Signed-off-by: Dan Ryan <dan@danryan.co>

Update to new version of artifacts

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix windows failure

Signed-off-by: Dan Ryan <dan@danryan.co>

Update azure-pipelines.yml for Azure Pipelines

Update lockfile test for windows

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix scandir test

Signed-off-by: Dan Ryan <dan@danryan.co>

Update azure test steps

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix virtualenv test

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix python discovery when nothing is supplied

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix cli ensure_project call

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix run in virtualenv test

Signed-off-by: Dan Ryan <dan@danryan.co>

Show why virtualenv test failed if it did

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix python interpreter discovery

Signed-off-by: Dan Ryan <dan@danryan.co>

scale down lock test modifications and increase error logging

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix spinner bugs on windows and python discovery

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix pythonfinder search algorithm to dodge false paths on win

Signed-off-by: Dan Ryan <dan@danryan.co>

use pipenv directly

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-03 22:01:07 -04:00
Dan Ryan 401c7c1746 Move test artifacts to submodule
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-03 22:00:18 -04:00
jxltom 7f2eaf7d50 Fix tests 2019-05-28 10:34:09 +08:00
Gleb Kozyrev 403a65105c Test sync --sequential processing every pip install result 2019-05-27 19:42:18 -04:00
Dan Ryan 57cba47669 Merge branch 'master' into fix-several-general-options 2019-05-27 19:08:20 -04:00
Dan Ryan f0e3bbaa79 parent 8ae44bc90b
author Dan Ryan <dan@danryan.co> 1554074378 -0400
committer Dan Ryan <dan@danryan.co> 1558982736 -0400
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCgAdFiEEb6jpcpb+5zzDideCsyDQTvvOpJUFAlzsMFAACgkQsyDQTvvO
 pJWZmRAAtge5wdprlLnKdWUYK5USZb7Uk3zJHi9UIvnO7nKP6UA/L2D/5nxZitvx
 pZI7cGG+8sLp2yZNtQZdW6LNM1jmRXgzdMLYQh/5zo5gbj6KLOw7erh0FU3L3uM6
 wNBNM135Eqt7b+4a4C5TEK2UjwRxBHAsF+3ZzUy+UJQqgQEKxFVxW4gC4yxpfMtL
 jipE8ludwuOIM88ZJapmLpv2R6adQTxWZedTlmczdsy2/WKGHTCCpWs96PBbntdI
 pVBmoXfMhgZi+IuGR3iBYU0qS97vjJ8Te9tQZAaB9JGSqv3hHDWo1ht/rrG2RXzp
 3i0Cf2vG4035EUh56VYE9FCC9m6Vu3U9iIR34BZG9K5+lDP7pmJmjT+GymEgMP0N
 GoP3LYUO+dJjMjaUEMsC6QIi6DAots3uk4lxIw3wcA4Im/N/i5xafsRj1Eu3UdBL
 wBDKMz/FQjH+tD+mnvTlzaxD5vdhhCdBu1gK59rjNMlzg8hz6EF61QbHCaQHd4UI
 VOGIa8ThLlLI3addxzq/McceAc+OsLJ9hm06jkjvvoIuKrHyE3DybdbYQC7uEwyw
 2AvVuMDCPcciYQnkJhNTKmGvPcUDYD7cF91GKcUJKdPdyzDCeFEo5SUTKnLV4Cj2
 VD2sdVUk4jnmYfE4pCFvHKYooxQDMKQk/VCKl1c9QHL9/ijCx+o=
 =b+H1
 -----END PGP SIGNATURE-----

Ensure resolver doesn't compare editable specifiers

- Don't compare versions of editable dependencies when updating using
  `--keep-outdated` -- editable dependencies will now be updated to
  the latest version
- Ensure we don't drop markers from the lockfile when versions are not
  updated
- Fixes #3656
- Fixes #3659

Signed-off-by: Dan Ryan <dan@danryan.co>

Add future import for print function

Signed-off-by: Dan Ryan <dan@danryan.co>

Handle all possible markers in lockfiles

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix json import

Signed-off-by: Dan Ryan <dan@danryan.co>

point to correct reference for lockfile

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix marker merging errors

Signed-off-by: Dan Ryan <dan@danryan.co>

Prevent automatically setting `editable=True`

- Fixes #3647

Signed-off-by: Dan Ryan <dan@danryan.co>

Add new feature toggle for VCS dependency resolution

- Fixes #3577

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix syntax error

Signed-off-by: Dan Ryan <dan@danryan.co>

Use string for environment

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix class name resolution for py27

Signed-off-by: Dan Ryan <dan@danryan.co>

Write json files as unicode

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix resolution with env var

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-27 17:44:41 -04:00
Dan Ryan d1c086afbb Merge branch 'master' into master 2019-05-26 17:22:04 -04:00
Dan Ryan 7d0b0f6632 Merge branch 'master' into conftest-checks-ignore-KeyboardInterrupt 2019-05-26 17:05:53 -04:00
frostming bc37beaef4 cleanup 2019-05-20 16:42:18 +08:00
frostming 457a42a69c exclude venv folders 2019-05-20 16:04:58 +08:00
frostming e6b2f6463a add news entry 2019-05-20 12:45:09 +08:00
Dan Ryan d8dbb8314f Merge branch 'master' into fix-several-general-options 2019-05-19 22:01:20 -04:00
Dan Ryan a1973f42ff Merge branch 'master' into bugfix/check_unused 2019-05-19 22:00:56 -04:00
Dan Ryan c23e57b482 Fix test and pipeline definitions
- Update extras name in pipelines
- fix windows virtualenv calls
- don't write debug info during virtualenv creation and just move on
- Generalize some pipelines
- Use quotes around evaluated statements in pipeline
- Fix envvar references
- Update vistir:
  - fix stream wrapper on windows
  - fix ICACLS permissions handler
  - fix path normalization function
- Update azure venv creation script
- Fix vendoring script

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-18 23:22:53 -04:00
Dan Ryan d8e66c7fce Add future imports to tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-16 00:52:10 -04:00
Dan Ryan 210495992b Fix marker formatting in keep outdated test
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-15 21:36:06 -04:00
Dan Ryan 102b682284 Fix keep_outdated markers
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-15 21:27:51 -04:00
Dan Ryan b7de7c1cdf Fix marker formatting and inclusion
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-15 20:43:31 -04:00
Dan Ryan e3bf42e57e Merge remote-tracking branch 'origin/master' into update-vendored-deps 2019-05-15 20:39:44 -04:00
frostming 1384a25a38 make check unused work 2019-05-14 09:54:18 +08:00
Unknown 88e30d8fd2 Add smoke test for --three argument 2019-05-07 10:48:22 +08:00
jxltom dfec732860 Add test for pipenv --clear 2019-05-07 09:19:25 +08:00
Miro Hrončok 6152199752 Pytest 4: Update to get_closest_marker
See https://docs.pytest.org/en/latest/mark.html#update-marker-code
2019-05-03 12:23:33 +02:00
Dan Ryan ff4c8b0d5c Update vendored deps
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-04-18 13:50:48 -04:00